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/cpu.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/cpu.cc')
-rw-r--r-- | src/cpu/inorder/cpu.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc index ce3796528..2e3b0188b 100644 --- a/src/cpu/inorder/cpu.cc +++ b/src/cpu/inorder/cpu.cc @@ -1272,6 +1272,24 @@ InOrderCPU::addInst(DynInstPtr inst) return --(instList[tid].end()); } +InOrderCPU::ListIt +InOrderCPU::findInst(InstSeqNum seq_num, ThreadID tid) +{ + ListIt it = instList[tid].begin(); + ListIt end = instList[tid].end(); + + while (it != end) { + if ((*it)->seqNum == seq_num) + return it; + else if ((*it)->seqNum > seq_num) + break; + + it++; + } + + return instList[tid].end(); +} + void InOrderCPU::updateContextSwitchStats() { |