fix comparing fp registers between legion and m5
authorAli Saidi <saidi@eecs.umich.edu>
Sun, 28 Jan 2007 20:30:14 +0000 (15:30 -0500)
committerAli Saidi <saidi@eecs.umich.edu>
Sun, 28 Jan 2007 20:30:14 +0000 (15:30 -0500)
make fp writes also chatty with the Sparc traceflag

src/arch/sparc/floatregfile.cc:
    make fp writes also chatty with the Sparc traceflag
src/cpu/exetrace.cc:
    fix comparing fp registers between legion and m5

--HG--
extra : convert_revision : f3703afae56249f137451262bc1b6919d465e714

src/arch/sparc/floatregfile.cc
src/cpu/exetrace.cc

index 1bb78c67b71dc393a086950cbb84a9e5808d001a..6f04ca82922f05aeb63cbb63ecbe5b6c8797ea5b 100644 (file)
@@ -137,10 +137,12 @@ Fault FloatRegFile::setReg(int floatReg, const FloatReg &val, int width)
       case SingleWidth:
         result32 = gtoh((uint32_t)val);
         memcpy(regSpace + 4 * floatReg, &result32, sizeof(result32));
+        DPRINTF(Sparc, "Write FP64 register %d = 0x%x\n", floatReg, result32);
         break;
       case DoubleWidth:
         result64 = gtoh((uint64_t)val);
         memcpy(regSpace + 4 * floatReg, &result64, sizeof(result64));
+        DPRINTF(Sparc, "Write FP64 register %d = 0x%x\n", floatReg, result64);
         break;
       case QuadWidth:
         panic("Quad width FP not implemented.");
@@ -163,10 +165,12 @@ Fault FloatRegFile::setRegBits(int floatReg, const FloatRegBits &val, int width)
       case SingleWidth:
         result32 = gtoh((uint32_t)val);
         memcpy(regSpace + 4 * floatReg, &result32, sizeof(result32));
+        DPRINTF(Sparc, "Write FP64 bits register %d = 0x%x\n", floatReg, result32);
         break;
       case DoubleWidth:
         result64 = gtoh((uint64_t)val);
         memcpy(regSpace + 4 * floatReg, &result64, sizeof(result64));
+        DPRINTF(Sparc, "Write FP64 bits register %d = 0x%x\n", floatReg, result64);
         break;
       case QuadWidth:
         panic("Quad width FP not implemented.");
index 9ea90681c26c2891e8c36bbc95f20044cb72f7f0..ea68c7976ab5e64935e7df20bc3b7d8206aa2ade 100644 (file)
@@ -362,7 +362,7 @@ Trace::InstRecord::dump(ostream &outs)
                         }
                     }
                     for (int i = 0; i < TheISA::NumFloatRegs/2; i++) {
-                        if (thread->readFloatRegBits(i,FloatRegFile::DoubleWidth) != shared_data->fpregs[i]) {
+                        if (thread->readFloatRegBits(i*2,FloatRegFile::DoubleWidth) != shared_data->fpregs[i]) {
                             diffFpRegs = true;
                         }
                     }