arch: teach ISA parser how to split code across files
[gem5.git] / src / arch / sparc / isa / base.isa
index d38df1c25714c0aa0f19eb7aa6daae527c350b06..3c95c26383a090ac6af520330d8902b5a63e5ee7 100644 (file)
@@ -290,7 +290,7 @@ output decoder {{
             const int MaxLocal = 24;
             const int MaxInput = 32;
             const int MaxMicroReg = 40;
-            if (reg < FP_Base_DepTag) {
+            if (reg < FP_Reg_Base) {
                 // If we used a register from the next or previous window,
                 // take out the offset.
                 while (reg >= MaxMicroReg)
@@ -335,10 +335,10 @@ output decoder {{
                         break;
                     }
                 }
-            } else if (reg < Ctrl_Base_DepTag) {
-                ccprintf(os, "%%f%d", reg - FP_Base_DepTag);
+            } else if (reg < Misc_Reg_Base) {
+                ccprintf(os, "%%f%d", reg - FP_Reg_Base);
             } else {
-                switch (reg - Ctrl_Base_DepTag) {
+                switch (reg - Misc_Reg_Base) {
                   case MISCREG_ASI:
                     ccprintf(os, "%%asi");
                     break;
@@ -430,7 +430,7 @@ output decoder {{
                     ccprintf(os, "%%fsr");
                     break;
                   default:
-                    ccprintf(os, "%%ctrl%d", reg - Ctrl_Base_DepTag);
+                    ccprintf(os, "%%ctrl%d", reg - Misc_Reg_Base);
                 }
             }
         }
@@ -564,11 +564,11 @@ output exec {{
     /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled
     /// if not.  Non-full-system mode: always returns NoFault.
     static inline Fault
-    checkFpEnableFault(%(CPU_exec_context)s *xc)
+    checkFpEnableFault(CPU_EXEC_CONTEXT *xc)
     {
         if (FullSystem) {
-            if (xc->readMiscReg(MISCREG_PSTATE) & PSTATE::pef &&
-                xc->readMiscReg(MISCREG_FPRS) & 0x4) {
+            PSTATE pstate = xc->readMiscReg(MISCREG_PSTATE);
+            if (pstate.pef && xc->readMiscReg(MISCREG_FPRS) & 0x4) {
                 return NoFault;
             } else {
                 return new FpDisabled;