diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:35 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:35 -0400 |
commit | b195da9345c00c2961558f80715660c0c0a629fc (patch) | |
tree | 0e3c2dee853e7aa46db1a592b62a9d7934c00c69 /src/cpu/inorder/resource.cc | |
parent | d5d4e47f76ec254b89c6b884f5fcbf340d4fed49 (diff) | |
download | gem5-b195da9345c00c2961558f80715660c0c0a629fc.tar.xz |
inorder: use setupSquash for misspeculation
implement a clean interface to handle branch misprediction and eventually all pipeline
flushing
Diffstat (limited to 'src/cpu/inorder/resource.cc')
-rw-r--r-- | src/cpu/inorder/resource.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc index cad5cfb09..23d33afbe 100644 --- a/src/cpu/inorder/resource.cc +++ b/src/cpu/inorder/resource.cc @@ -35,6 +35,7 @@ #include "base/str.hh" #include "cpu/inorder/cpu.hh" #include "cpu/inorder/resource.hh" +#include "cpu/inorder/resource_pool.hh" #include "debug/RefCount.hh" #include "debug/ResReqCount.hh" #include "debug/Resource.hh" @@ -287,6 +288,18 @@ Resource::deactivateThread(ThreadID tid) } void +Resource::setupSquash(DynInstPtr inst, int stage_num, ThreadID tid) +{ + assert(inst->isControl() && "Function Assumes Squash From A Branch"); + + // Squash In Pipeline Stage + cpu->pipelineStage[stage_num]->squashDueToBranch(inst, tid); + + // Schedule Squash Through-out Resource Pool + cpu->resPool->scheduleEvent( + (InOrderCPU::CPUEventType)ResourcePool::SquashAll, inst, 0); +} +void Resource::squash(DynInstPtr inst, int stage_num, InstSeqNum squash_seq_num, ThreadID tid) { |