fp.isa (9918:2c7219e2d999) fp.isa (10196:be0e1724eb39)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2003-2005 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37// BasicOperateWithNopCheck.
38//
39
40output exec {{
41 /// Check "FP enabled" machine status bit. Called when executing any FP
42 /// instruction in full-system mode.
43 /// @retval Full-system mode: NoFault if FP is enabled, FenFault
44 /// if not. Non-full-system mode: always returns NoFault.
1// -*- mode:c++ -*-
2
3// Copyright (c) 2003-2005 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37// BasicOperateWithNopCheck.
38//
39
40output exec {{
41 /// Check "FP enabled" machine status bit. Called when executing any FP
42 /// instruction in full-system mode.
43 /// @retval Full-system mode: NoFault if FP is enabled, FenFault
44 /// if not. Non-full-system mode: always returns NoFault.
45 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc)
45 inline Fault checkFpEnableFault(CPU_EXEC_CONTEXT *xc)
46 {
47 Fault fault = NoFault; // dummy... this ipr access should not fault
48 if (FullSystem && !ICSR_FPE(xc->readMiscReg(IPR_ICSR))) {
49 fault = new FloatEnableFault;
50 }
51 return fault;
52 }
53}};

--- 144 unchanged lines hidden (view full) ---

198 { "", "u", "INVTM2", "INVTM3", "INVTM4", "su", "INVTM6", "sui" };
199 const char *AlphaFP::intTrappingModeSuffix[] =
200 { "", "v", "INVTM2", "INVTM3", "INVTM4", "sv", "INVTM6", "svi" };
201}};
202
203// FP instruction class execute method template. Handles non-standard
204// rounding modes.
205def template FloatingPointExecute {{
46 {
47 Fault fault = NoFault; // dummy... this ipr access should not fault
48 if (FullSystem && !ICSR_FPE(xc->readMiscReg(IPR_ICSR))) {
49 fault = new FloatEnableFault;
50 }
51 return fault;
52 }
53}};

--- 144 unchanged lines hidden (view full) ---

198 { "", "u", "INVTM2", "INVTM3", "INVTM4", "su", "INVTM6", "sui" };
199 const char *AlphaFP::intTrappingModeSuffix[] =
200 { "", "v", "INVTM2", "INVTM3", "INVTM4", "sv", "INVTM6", "svi" };
201}};
202
203// FP instruction class execute method template. Handles non-standard
204// rounding modes.
205def template FloatingPointExecute {{
206 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
206 Fault %(class_name)s::execute(CPU_EXEC_CONTEXT *xc,
207 Trace::InstRecord *traceData) const
208 {
209 if (trappingMode != Imprecise && !warnedOnTrapping) {
210 warn("%s: non-standard trapping mode not supported",
211 generateDisassembly(0, NULL));
212 warnedOnTrapping = true;
213 }
214

--- 27 unchanged lines hidden (view full) ---

242 return fault;
243 }
244}};
245
246// FP instruction class execute method template where no dynamic
247// rounding mode control is needed. Like BasicExecute, but includes
248// check & warning for non-standard trapping mode.
249def template FPFixedRoundingExecute {{
207 Trace::InstRecord *traceData) const
208 {
209 if (trappingMode != Imprecise && !warnedOnTrapping) {
210 warn("%s: non-standard trapping mode not supported",
211 generateDisassembly(0, NULL));
212 warnedOnTrapping = true;
213 }
214

--- 27 unchanged lines hidden (view full) ---

242 return fault;
243 }
244}};
245
246// FP instruction class execute method template where no dynamic
247// rounding mode control is needed. Like BasicExecute, but includes
248// check & warning for non-standard trapping mode.
249def template FPFixedRoundingExecute {{
250 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
250 Fault %(class_name)s::execute(CPU_EXEC_CONTEXT *xc,
251 Trace::InstRecord *traceData) const
252 {
253 if (trappingMode != Imprecise && !warnedOnTrapping) {
254 warn("%s: non-standard trapping mode not supported",
255 generateDisassembly(0, NULL));
256 warnedOnTrapping = true;
257 }
258

--- 47 unchanged lines hidden ---
251 Trace::InstRecord *traceData) const
252 {
253 if (trappingMode != Imprecise && !warnedOnTrapping) {
254 warn("%s: non-standard trapping mode not supported",
255 generateDisassembly(0, NULL));
256 warnedOnTrapping = true;
257 }
258

--- 47 unchanged lines hidden ---