Changed all syscalls to use syscall return object.
[gem5.git] / arch / alpha / ev5.cc
index aa52916b929c131cd583cfee375747963f4b6549..2e32da53147b9c8ea993405c092d975a741a8f72 100644 (file)
@@ -15,9 +15,7 @@
 
 #ifdef FULL_SYSTEM
 
-#ifndef SYSTEM_EV5
-#error This code is only valid for EV5 systems
-#endif
+using namespace EV5;
 
 ////////////////////////////////////////////////////////////////////////
 //
@@ -96,7 +94,7 @@ AlphaISA::initIPRs(RegFile *regs)
     uint64_t *ipr = regs->ipr;
 
     bzero((char *)ipr, NumInternalProcRegs * sizeof(InternalProcReg));
-    ipr[IPR_PAL_BASE] = PAL_BASE;
+    ipr[IPR_PAL_BASE] = PalBase;
     ipr[IPR_MCSR] = 0x6;
 }
 
@@ -176,16 +174,16 @@ ExecContext::ev5_trap(Fault fault)
     AlphaISA::InternalProcReg *ipr = regs.ipr;
 
     // exception restart address
-    if (fault != Interrupt_Fault || !PC_PAL(regs.pc))
+    if (fault != Interrupt_Fault || !inPalMode())
         ipr[AlphaISA::IPR_EXC_ADDR] = regs.pc;
 
     if (fault == Pal_Fault || fault == Arithmetic_Fault /* ||
-        fault == Interrupt_Fault && !PC_PAL(regs.pc) */) {
+        fault == Interrupt_Fault && !inPalMode() */) {
         // traps...  skip faulting instruction
         ipr[AlphaISA::IPR_EXC_ADDR] += 4;
     }
 
-    if (!PC_PAL(regs.pc))
+    if (!inPalMode())
         AlphaISA::swap_palshadow(&regs, true);
 
     regs.pc = ipr[AlphaISA::IPR_PAL_BASE] + AlphaISA::fault_addr[fault];
@@ -225,7 +223,7 @@ ExecContext::hwrei()
 {
     uint64_t *ipr = regs.ipr;
 
-    if (!PC_PAL(regs.pc))
+    if (!inPalMode())
         return Unimplemented_Opcode_Fault;
 
     setNextPC(ipr[AlphaISA::IPR_EXC_ADDR]);