recognized 32 & 64 bit unsigned integer types and set the width appropriately
authorKorey Sewell <ksewell@umich.edu>
Fri, 5 May 2006 00:49:24 +0000 (20:49 -0400)
committerKorey Sewell <ksewell@umich.edu>
Fri, 5 May 2006 00:49:24 +0000 (20:49 -0400)
arch/mips/isa_traits.hh:
    debug statements to be taken out real soon like...

--HG--
extra : convert_revision : 4e9abcb99c991db93328d01d7606a2bb942b29ee

arch/isa_parser.py
arch/mips/isa_traits.hh

index 83620a9f166d428311a011aadb1e5e7142aa31e0..a92c85c3f2ab24d355501d7ba52a46e16e376b91 100755 (executable)
@@ -1226,6 +1226,10 @@ class FloatRegOperand(Operand):
             width = 64;
         else:
             func = 'readFloatRegBits'
+            if (self.ctype == 'uint32_t'):
+                width = 32;
+            elif (self.ctype == 'uint64_t'):
+                width = 64;
             if (self.size != self.dflt_size):
                 bit_select = 1
         if width:
@@ -1251,6 +1255,9 @@ class FloatRegOperand(Operand):
         elif (self.ctype == 'double'):
             width = 64
             func = 'setFloatReg'
+        elif (self.ctype == 'uint32_t'):
+            func = 'setFloatRegBits'
+            width = 32
         elif (self.ctype == 'uint64_t'):
             func = 'setFloatRegBits'
             width = 64
index 671d36b878c3f2e295f1b5dddf6e0d7a2e67dbe6..105d4c283e2009cf8404c83c0edea622a1561f38 100644 (file)
@@ -226,14 +226,20 @@ namespace MipsISA
 
         double readReg(int floatReg, int width)
         {
+            using namespace std;
+
             switch(width)
             {
               case SingleWidth:
                 void *float_ptr = &regs[floatReg];
+                cout << "reading as float, reg." << floatReg << ": " << *(float *) float_ptr << endl;
+                cout << "reading as uint32_t, reg." << floatReg << ": " << *(uint32_t *) float_ptr << endl;
                 return *(float *) float_ptr;
 
               case DoubleWidth:
                 void *double_ptr = &regs[floatReg];
+                cout << "reading as double, reg." << floatReg <<": " << *(double *) double_ptr << endl;
+                cout << "reading as uint64_t, reg." << floatReg << hex << ": 0x" << *(uint64_t *) float_ptr << endl;
                 return *(double *) double_ptr;
 
               default: