fp.isa (4172:141705d83494) fp.isa (4394:dbaff14bb974)
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

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

187 ss << ",";
188 printReg(ss, _destRegIdx[0]);
189 }
190
191 return ss.str();
192 }
193
194 const int AlphaFP::alphaToC99RoundingMode[] = {
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

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

187 ss << ",";
188 printReg(ss, _destRegIdx[0]);
189 }
190
191 return ss.str();
192 }
193
194 const int AlphaFP::alphaToC99RoundingMode[] = {
195 FE_TOWARDZERO, // Chopped
196 FE_DOWNWARD, // Minus_Infinity
197 FE_TONEAREST, // Normal
198 FE_UPWARD // Dynamic in inst, Plus_Infinity in FPCR
195 M5_FE_TOWARDZERO, // Chopped
196 M5_FE_DOWNWARD, // Minus_Infinity
197 M5_FE_TONEAREST, // Normal
198 M5_FE_UPWARD // Dynamic in inst, Plus_Infinity in FPCR
199 };
200
201 const char *AlphaFP::roundingModeSuffix[] = { "c", "m", "", "d" };
202 // mark invalid trapping modes, but don't fail on them, because
203 // you could decode anything on a misspeculated path
204 const char *AlphaFP::fpTrappingModeSuffix[] =
205 { "", "u", "INVTM2", "INVTM3", "INVTM4", "su", "INVTM6", "sui" };
206 const char *AlphaFP::intTrappingModeSuffix[] =

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

223
224 %(fp_enable_check)s;
225 %(op_decl)s;
226 %(op_rd)s;
227#if USE_FENV
228 if (roundingMode == Normal) {
229 %(code)s;
230 } else {
199 };
200
201 const char *AlphaFP::roundingModeSuffix[] = { "c", "m", "", "d" };
202 // mark invalid trapping modes, but don't fail on them, because
203 // you could decode anything on a misspeculated path
204 const char *AlphaFP::fpTrappingModeSuffix[] =
205 { "", "u", "INVTM2", "INVTM3", "INVTM4", "su", "INVTM6", "sui" };
206 const char *AlphaFP::intTrappingModeSuffix[] =

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

223
224 %(fp_enable_check)s;
225 %(op_decl)s;
226 %(op_rd)s;
227#if USE_FENV
228 if (roundingMode == Normal) {
229 %(code)s;
230 } else {
231 fesetround(getC99RoundingMode(
231 m5_fesetround(getC99RoundingMode(
232 xc->readMiscRegNoEffect(AlphaISA::MISCREG_FPCR)));
233 %(code)s;
232 xc->readMiscRegNoEffect(AlphaISA::MISCREG_FPCR)));
233 %(code)s;
234 fesetround(FE_TONEAREST);
234 m5_fesetround(M5_FE_TONEAREST);
235 }
236#else
237 if (roundingMode != Normal && !warnedOnRounding) {
238 warn("%s: non-standard rounding mode not supported",
239 generateDisassembly(0, NULL));
240 warnedOnRounding = true;
241 }
242 %(code)s;

--- 70 unchanged lines hidden ---
235 }
236#else
237 if (roundingMode != Normal && !warnedOnRounding) {
238 warn("%s: non-standard rounding mode not supported",
239 generateDisassembly(0, NULL));
240 warnedOnRounding = true;
241 }
242 %(code)s;

--- 70 unchanged lines hidden ---