From: Gabe Black Date: Wed, 2 Jun 2010 17:58:12 +0000 (-0500) Subject: Simple CPU: Make the FloatRegs trace flag do something. X-Git-Tag: stable_2012_02_02~1152 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d149e43c41cdb739d75101a2e600fc090820a762;p=gem5.git Simple CPU: Make the FloatRegs trace flag do something. --- diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index 2d28607b4..74f01bfba 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -272,14 +272,20 @@ class SimpleThread : public ThreadState { int flatIndex = isa.flattenFloatIndex(reg_idx); assert(flatIndex < TheISA::NumFloatRegs); - return floatRegs.f[flatIndex]; + FloatReg regVal = floatRegs.f[flatIndex]; + DPRINTF(FloatRegs, "Reading float reg %d as %f, %#x.\n", + reg_idx, regVal, floatRegs.i[flatIndex]); + return regVal; } FloatRegBits readFloatRegBits(int reg_idx) { int flatIndex = isa.flattenFloatIndex(reg_idx); assert(flatIndex < TheISA::NumFloatRegs); - return floatRegs.i[flatIndex]; + FloatRegBits regVal = floatRegs.i[flatIndex]; + DPRINTF(FloatRegs, "Reading float reg %d bits as %#x, %f.\n", + reg_idx, regVal, floatRegs.f[flatIndex]); + return regVal; } void setIntReg(int reg_idx, uint64_t val) @@ -295,6 +301,8 @@ class SimpleThread : public ThreadState int flatIndex = isa.flattenFloatIndex(reg_idx); assert(flatIndex < TheISA::NumFloatRegs); floatRegs.f[flatIndex] = val; + DPRINTF(FloatRegs, "Setting float reg %d to %f, %#x.\n", + reg_idx, val, floatRegs.i[flatIndex]); } void setFloatRegBits(int reg_idx, FloatRegBits val) @@ -302,6 +310,8 @@ class SimpleThread : public ThreadState int flatIndex = isa.flattenFloatIndex(reg_idx); assert(flatIndex < TheISA::NumFloatRegs); floatRegs.i[flatIndex] = val; + DPRINTF(FloatRegs, "Setting float reg %d bits to %#x, %#f.\n", + reg_idx, val, floatRegs.f[flatIndex]); } uint64_t readPC()