diff options
Diffstat (limited to 'src/cpu/inorder/resources/execution_unit.cc')
-rw-r--r-- | src/cpu/inorder/resources/execution_unit.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/cpu/inorder/resources/execution_unit.cc b/src/cpu/inorder/resources/execution_unit.cc index 6b89c8230..77ab21b21 100644 --- a/src/cpu/inorder/resources/execution_unit.cc +++ b/src/cpu/inorder/resources/execution_unit.cc @@ -89,6 +89,8 @@ ExecutionUnit::execute(int slot_num) DynInstPtr inst = reqs[slot_num]->inst; Fault fault = NoFault; Tick cur_tick = curTick(); + unsigned stage_num = exec_req->getStageNum(); + ThreadID tid = inst->readTid(); #if TRACING_ON InstSeqNum seq_num = inst->seqNum; #endif @@ -149,13 +151,10 @@ ExecutionUnit::execute(int slot_num) assert(inst->isControl()); // Set up Squash Generated By this Misprediction - unsigned stage_num = exec_req->getStageNum(); - ThreadID tid = inst->readTid(); TheISA::PCState pc = inst->pcState(); TheISA::advancePC(pc, inst->staticInst); inst->setPredTarg(pc); inst->setSquashInfo(stage_num); - setupSquash(inst, stage_num, tid); DPRINTF(InOrderExecute, "[tid:%i]: [sn:%i] Squashing from " @@ -210,6 +209,15 @@ ExecutionUnit::execute(int slot_num) seq_num, (inst->resultType(0) == InOrderDynInst::Float) ? inst->readFloatResult(0) : inst->readIntResult(0)); + +#if !FULL_SYSTEM + // The Syscall might change the PC, so conservatively + // squash everything behing it + if (inst->isSyscall()) { + inst->setSquashInfo(stage_num); + setupSquash(inst, stage_num, tid); + } +#endif } else { DPRINTF(InOrderExecute, "[tid:%i]: [sn:%i]: had a %s " "fault.\n", inst->readTid(), seq_num, fault->name()); |