diff options
Diffstat (limited to 'cpu/exec_context.hh')
-rw-r--r-- | cpu/exec_context.hh | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh index 7e195af23..7e905e7d3 100644 --- a/cpu/exec_context.hh +++ b/cpu/exec_context.hh @@ -35,6 +35,7 @@ #include "sim/host.hh" #include "sim/serialize.hh" #include "arch/isa_traits.hh" +//#include "arch/isa_registers.hh" #include "sim/byteswap.hh" // forward declaration: see functional_memory.hh @@ -66,6 +67,11 @@ namespace Kernel { class Binning; class Statistics; } class ExecContext { + protected: + typedef TheISA::RegFile RegFile; + typedef TheISA::Addr Addr; + typedef TheISA::MachInst MachInst; + typedef TheISA::MiscRegFile MiscRegFile; public: enum Status { @@ -431,15 +437,15 @@ class ExecContext void trap(Fault * fault); #if !FULL_SYSTEM - IntReg getSyscallArg(int i) + TheISA::IntReg getSyscallArg(int i) { - return regs.intRegFile[ArgumentReg0 + i]; + return regs.intRegFile[TheISA::ArgumentReg0 + i]; } // used to shift args for indirect syscall - void setSyscallArg(int i, IntReg val) + void setSyscallArg(int i, TheISA::IntReg val) { - regs.intRegFile[ArgumentReg0 + i] = val; + regs.intRegFile[TheISA::ArgumentReg0 + i] = val; } void setSyscallReturn(SyscallReturn return_value) @@ -451,11 +457,11 @@ class ExecContext if (return_value.successful()) { // no error regs.intRegFile[RegA3] = 0; - regs.intRegFile[ReturnValueReg] = return_value.value(); + regs.intRegFile[TheISA::ReturnValueReg] = return_value.value(); } else { // got an error, return details - regs.intRegFile[RegA3] = (IntReg) -1; - regs.intRegFile[ReturnValueReg] = -return_value.value(); + regs.intRegFile[RegA3] = (TheISA::IntReg) -1; + regs.intRegFile[TheISA::ReturnValueReg] = -return_value.value(); } } |