Made sure the constructor for insts use ExtMachInst rather than MachInst, since other...
authorGabe Black <gblack@eecs.umich.edu>
Mon, 16 Oct 2006 19:52:14 +0000 (15:52 -0400)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 16 Oct 2006 19:52:14 +0000 (15:52 -0400)
src/arch/sparc/isa/base.isa:
src/arch/sparc/isa/formats/micro.isa:
    Switch MachInst to ExtMachInst so that the EXT_ASI field is available to the instructions.
src/arch/sparc/utility.hh:
    Made sure EXT_ASI was set to the appropriate ASI value whether or not the asi register was used.

--HG--
extra : convert_revision : cc4363dfe7da81969959cec9d5ad48528edeb8ce

src/arch/sparc/isa/base.isa
src/arch/sparc/isa/formats/micro.isa
src/arch/sparc/utility.hh

index b518265aa30fac95c8fd9995cab40bf7e7dd70cd..a4c022411d00e83ccd5eb6e803fe57c4fdb9f266 100644 (file)
@@ -77,7 +77,7 @@ output header {{
           protected:
             // Constructor.
             SparcStaticInst(const char *mnem,
-                 MachInst _machInst, OpClass __opClass)
+                 ExtMachInst _machInst, OpClass __opClass)
                     : StaticInst(mnem, _machInst, __opClass)
                 {
                 }
index 320603a6a76d038c307bbee3696b4c91dce639ce..82d7fb4cb78ccca104cbd85f430cd7479d23b2d6 100644 (file)
@@ -34,7 +34,7 @@ output header {{
             const uint32_t numMicroOps;
 
             //Constructor.
-            SparcMacroInst(const char *mnem, MachInst _machInst,
+            SparcMacroInst(const char *mnem, ExtMachInst _machInst,
                     OpClass __opClass, uint32_t _numMicroOps)
                         : SparcStaticInst(mnem, _machInst, __opClass),
                         numMicroOps(_numMicroOps)
@@ -68,7 +68,7 @@ output header {{
           protected:
             //Constructor.
             SparcMicroInst(const char *mnem,
-                    MachInst _machInst, OpClass __opClass)
+                    ExtMachInst _machInst, OpClass __opClass)
                         : SparcStaticInst(mnem, _machInst, __opClass)
             {
                 flags[IsMicroOp] = true;
@@ -80,7 +80,7 @@ output header {{
           protected:
             //Constructor.
             SparcDelayedMicroInst(const char *mnem,
-                    MachInst _machInst, OpClass __opClass)
+                    ExtMachInst _machInst, OpClass __opClass)
                         : SparcMicroInst(mnem, _machInst, __opClass)
             {
                 flags[IsDelayedCommit] = true;
index 796b6ba4c74aba7a9516521106e42afdff8ea615..23fddf0e98f5b1964c288745922664a211f45558 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "arch/sparc/isa_traits.hh"
 #include "base/misc.hh"
+#include "base/bitfield.hh"
 #include "cpu/thread_context.hh"
 
 namespace SparcISA
@@ -47,6 +48,9 @@ namespace SparcISA
         if(inst & (1 << 13))
             emi |= (static_cast<ExtMachInst>(xc->readMiscReg(MISCREG_ASI))
                     << (sizeof(MachInst) * 8));
+        else
+            emi |= (static_cast<ExtMachInst>(bits(inst, 12, 5))
+                    << (sizeof(MachInst) * 8));
         return emi;
     }