summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/cpu.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:41 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:41 -0400
commit8c0def8d0347e9a7b84f21895c5cbd94eba9a09a (patch)
tree4b3e65bde6e55cdf9c1512c247cb52ce8a9adb08 /src/cpu/inorder/cpu.cc
parent5ef0b7a9db3c6ec4ca191c2e9381719e1e694873 (diff)
downloadgem5-8c0def8d0347e9a7b84f21895c5cbd94eba9a09a.tar.xz
inorder: use trapPending flag to manage traps
Diffstat (limited to 'src/cpu/inorder/cpu.cc')
-rw-r--r--src/cpu/inorder/cpu.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc
index 365b2f18a..158489f86 100644
--- a/src/cpu/inorder/cpu.cc
+++ b/src/cpu/inorder/cpu.cc
@@ -149,6 +149,7 @@ InOrderCPU::CPUEvent::process()
DPRINTF(InOrderCPU, "Trapping CPU\n");
cpu->trap(fault, tid, inst);
cpu->resPool->trap(fault, tid, inst);
+ cpu->trapPending[tid] = false;
break;
#if !FULL_SYSTEM
@@ -359,6 +360,8 @@ InOrderCPU::InOrderCPU(Params *params)
dummyTrapInst[tid]->setTid(tid);
#endif
+ trapPending[tid] = false;
+
}
dummyReqInst = new InOrderDynInst(this, NULL, 0, 0, 0);
@@ -698,8 +701,8 @@ InOrderCPU::tick()
++numCycles;
+ checkForInterrupts();
bool pipes_idle = true;
-
//Tick each of the stages
for (int stNum=NumStages - 1; stNum >= 0 ; stNum--) {
pipelineStage[stNum]->tick();
@@ -707,8 +710,6 @@ InOrderCPU::tick()
pipes_idle = pipes_idle && pipelineStage[stNum]->idle;
}
- checkForInterrupts();
-
if (pipes_idle)
idleCycles++;
else
@@ -902,6 +903,7 @@ void
InOrderCPU::trapContext(Fault fault, ThreadID tid, DynInstPtr inst, int delay)
{
scheduleCpuEvent(Trap, fault, tid, inst, delay);
+ trapPending[tid] = true;
}
void