union Result {
uint64_t integer;
- float fp;
+// float fp;
double dbl;
};
/** Returns whether the instruction was predicted taken or not. */
bool predTaken()
-#if THE_ISA == ALPHA_ISA
- { return predPC != (PC + sizeof(MachInst)); }
-#else
+#if ISA_HAS_DELAY_SLOT
{ return predPC != (nextPC + sizeof(MachInst)); }
+#else
+ { return predPC != (PC + sizeof(MachInst)); }
#endif
/** Returns whether the instruction mispredicted. */
bool mispredicted()
-#if THE_ISA == ALPHA_ISA
- { return predPC != nextPC; }
-#else
+#if ISA_HAS_DELAY_SLOT
{ return predPC != nextNPC; }
+#else
+ { return predPC != nextPC; }
#endif
//
// Instruction types. Forward checks to StaticInst object.
uint64_t readIntResult() { return instResult.integer; }
/** Returns the result of a floating point instruction. */
- float readFloatResult() { return instResult.fp; }
+ float readFloatResult() { return (float)instResult.dbl; }
/** Returns the result of a floating point (double) instruction. */
double readDoubleResult() { return instResult.dbl; }
void setFloatReg(const StaticInst *si, int idx, FloatReg val, int width)
{
if (width == 32)
- instResult.fp = val;
+ instResult.dbl = (double)val;
else if (width == 64)
instResult.dbl = val;
else
/** Records an fp register being set to a value. */
void setFloatReg(const StaticInst *si, int idx, FloatReg val)
{
- instResult.fp = val;
+// instResult.fp = val;
+ instResult.dbl = (double)val;
}
/** Records an fp register being set to an integer value. */