diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/faults.cc | 5 | ||||
-rw-r--r-- | src/sim/insttracer.hh | 20 | ||||
-rw-r--r-- | src/sim/syscall_emul.cc | 4 | ||||
-rw-r--r-- | src/sim/syscall_emul.hh | 4 |
4 files changed, 13 insertions, 20 deletions
diff --git a/src/sim/faults.cc b/src/sim/faults.cc index 78b9fb0a4..fbe8fb32a 100644 --- a/src/sim/faults.cc +++ b/src/sim/faults.cc @@ -40,13 +40,12 @@ #if !FULL_SYSTEM void FaultBase::invoke(ThreadContext * tc, StaticInstPtr inst) { - panic("fault (%s) detected @ PC %p", name(), tc->readPC()); + panic("fault (%s) detected @ PC %s", name(), tc->pcState()); } #else void FaultBase::invoke(ThreadContext * tc, StaticInstPtr inst) { - DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), tc->readPC()); - + DPRINTF(Fault, "Fault %s at PC: %s\n", name(), tc->pcState()); assert(!tc->misspeculating()); } #endif diff --git a/src/sim/insttracer.hh b/src/sim/insttracer.hh index 845f4ed99..1ff67d2cb 100644 --- a/src/sim/insttracer.hh +++ b/src/sim/insttracer.hh @@ -54,9 +54,8 @@ class InstRecord // need to make this ref-counted so it doesn't go away before we // dump the record StaticInstPtr staticInst; - Addr PC; + TheISA::PCState pc; StaticInstPtr macroStaticInst; - MicroPC upc; bool misspeculating; bool predicate; @@ -90,12 +89,11 @@ class InstRecord public: InstRecord(Tick _when, ThreadContext *_thread, const StaticInstPtr _staticInst, - Addr _pc, bool spec, - const StaticInstPtr _macroStaticInst = NULL, - MicroPC _upc = 0) + TheISA::PCState _pc, bool spec, + const StaticInstPtr _macroStaticInst = NULL) : when(_when), thread(_thread), - staticInst(_staticInst), PC(_pc), - macroStaticInst(_macroStaticInst), upc(_upc), + staticInst(_staticInst), pc(_pc), + macroStaticInst(_macroStaticInst), misspeculating(spec), predicate(true) { data_status = DataInvalid; @@ -137,9 +135,8 @@ class InstRecord Tick getWhen() { return when; } ThreadContext *getThread() { return thread; } StaticInstPtr getStaticInst() { return staticInst; } - Addr getPC() { return PC; } + TheISA::PCState getPCState() { return pc; } StaticInstPtr getMacroStaticInst() { return macroStaticInst; } - MicroPC getUPC() { return upc; } bool getMisspeculating() { return misspeculating; } Addr getAddr() { return addr; } @@ -167,9 +164,8 @@ class InstTracer : public SimObject virtual InstRecord * getInstRecord(Tick when, ThreadContext *tc, - const StaticInstPtr staticInst, Addr pc, - const StaticInstPtr macroStaticInst = NULL, - MicroPC _upc = 0) = 0; + const StaticInstPtr staticInst, TheISA::PCState pc, + const StaticInstPtr macroStaticInst = NULL) = 0; }; diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 207c07309..60bb59790 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -824,9 +824,7 @@ cloneFunc(SyscallDesc *desc, int callnum, LiveProcess *process, ctc->setIntReg(TheISA::SyscallPseudoReturnReg, 1); #endif - ctc->setPC(tc->readNextPC()); - ctc->setNextPC(tc->readNextPC() + sizeof(TheISA::MachInst)); - ctc->setNextNPC(tc->readNextNPC() + sizeof(TheISA::MachInst)); + ctc->pcState(tc->nextInstAddr()); ctc->activate(); diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index eaec57ef5..f2847b2e5 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -512,8 +512,8 @@ ioctlFunc(SyscallDesc *desc, int callnum, LiveProcess *process, return -ENOTTY; default: - fatal("Unsupported ioctl call: ioctl(%d, 0x%x, ...) @ 0x%llx\n", - fd, req, tc->readPC()); + fatal("Unsupported ioctl call: ioctl(%d, 0x%x, ...) @ \n", + fd, req, tc->pcState()); } } |