Fixes to the isa description.
authorGabe Black <gblack@eecs.umich.edu>
Thu, 23 Nov 2006 05:36:42 +0000 (00:36 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 23 Nov 2006 05:36:42 +0000 (00:36 -0500)
src/arch/sparc/isa/base.isa:
    Fix a constant.
src/arch/sparc/isa/decoder.isa:
    Made carry calculation more consistent.
src/arch/sparc/isa/operands.isa:
    Use the right constant.

--HG--
extra : convert_revision : 25b3a09ff20d4b8e1a95ee8a983d14ef3cfe73bb

src/arch/sparc/isa/base.isa
src/arch/sparc/isa/decoder.isa
src/arch/sparc/isa/operands.isa

index aa24c75bef75bd396ddfb2485ca6619b29e67da9..4a806bfd0bf474730626ac963a5335512917f421 100644 (file)
@@ -205,7 +205,7 @@ output decoder {{
             else if(reg < MaxMicroReg)
                 ccprintf(os, "%%u%d", reg - MaxInput);
             else {
-                ccprintf(os, "%%f%d", reg - FP_Base_DepTag);
+                ccprintf(os, "%%f%d", reg - MaxMicroReg);
             }
         }
 
index 2c8e59a1d469317013ade41ef4a478f75b294925..4e09e2e59dc9a39a2971360ec850de18a094f520 100644 (file)
@@ -307,7 +307,7 @@ decode OP default Unknown::unknown()
                 int64_t resTemp, val2 = Rs2_or_imm13;
                 Rd = resTemp = Rs1 + val2;
                 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>);}},
-                {{((Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31)}},
+                {{((Rs1<31:0> + val2<31:0>)<32:0>)}},
                 {{overflow}},
                 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}},
                 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}}
@@ -316,7 +316,7 @@ decode OP default Unknown::unknown()
                 int64_t resTemp, val2 = Rs2_or_imm13;
                 Rd = resTemp = Rs1 + val2;
                 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>);}},
-                {{(Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31}},
+                {{(Rs1<31:0> + val2<31:0>)<32:0>}},
                 {{overflow}},
                 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}},
                 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}}
@@ -327,7 +327,7 @@ decode OP default Unknown::unknown()
                 int32_t overflow = Rs1<1:0> || val2<1:0> ||
                         (Rs1<31:> == val2<31:> && val2<31:> != Rd<31:>);
                 if(overflow) fault = new TagOverflow;}},
-                {{((Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31)}},
+                {{((Rs1<31:0> + val2<31:0>)<32:0>)}},
                 {{overflow}},
                 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}},
                 {{Rs1<63:> == val2<63:> && val2<63:> != Rd<63:>}}
@@ -337,7 +337,7 @@ decode OP default Unknown::unknown()
                 Rd = resTemp = Rs1 + val2;
                 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>);
                 if(overflow) fault = new TagOverflow;}},
-                {{((Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31)}},
+                {{((Rs1<31:0> + val2<31:0>)<32:0>)}},
                 {{overflow}},
                 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}},
                 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}}
@@ -347,13 +347,12 @@ decode OP default Unknown::unknown()
                 int32_t multiplier = Rs1<31:0>;
                 int32_t savedLSB = Rs1<0:>;
                 multiplier = multiplier<31:1> |
-                    ((Ccr<3:3>
-                    ^ Ccr<1:1>) << 32);
+                    ((Ccr<3:3> ^ Ccr<1:1>) << 32);
                 if(!Y<0:>)
                     multiplicand = 0;
                 Rd = resTemp = multiplicand + multiplier;
                 Y = Y<31:1> | (savedLSB << 31);}},
-                {{((multiplicand & 0xFFFFFFFF + multiplier & 0xFFFFFFFF) >> 31)}},
+                {{((multiplicand<31:0> + multiplier<31:0>)<32:0>)}},
                 {{multiplicand<31:> == multiplier<31:> && multiplier<31:> != resTemp<31:>}},
                 {{((multiplicand >> 1) + (multiplier >> 1) + (multiplicand & multiplier & 0x1))<63:>}},
                 {{multiplicand<63:> == multiplier<63:> && multiplier<63:> != resTemp<63:>}}
index 2d200f568b48d0aba7d4eb9ee060d103a0fc001a..80ed7362cb9be17114dbe9b884a0047b57d57d22 100644 (file)
@@ -61,7 +61,7 @@ def operands {{
     'RdHigh':          ('IntReg', 'udw', 'RD | 1', 'IsInteger', 3),
     'Rs1':             ('IntReg', 'udw', 'RS1', 'IsInteger', 4),
     'Rs2':             ('IntReg', 'udw', 'RS2', 'IsInteger', 5),
-    'uReg0':           ('IntReg', 'udw', 'NumRegularIntRegs+0', 'IsInteger', 6),
+    'uReg0':           ('IntReg', 'udw', 'NumIntArchRegs', 'IsInteger', 6),
     'Frds':            ('FloatReg', 'sf', 'RD', 'IsFloating', 10),
     'Frd':             ('FloatReg', 'df', 'dfpr(RD)', 'IsFloating', 10),
     # Each Frd_N refers to the Nth double precision register from Frd.