From 1a737644032be8d95a381e3661b740c2b4f78bba Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Wed, 23 Jun 2010 22:09:49 -0400 Subject: [PATCH] inorder: squash from memory stall this applies to multithreading models which would like to squash a thread on memory stall --- src/cpu/inorder/resources/fetch_seq_unit.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cpu/inorder/resources/fetch_seq_unit.cc b/src/cpu/inorder/resources/fetch_seq_unit.cc index 03663881c..0d22226a5 100644 --- a/src/cpu/inorder/resources/fetch_seq_unit.cc +++ b/src/cpu/inorder/resources/fetch_seq_unit.cc @@ -228,7 +228,11 @@ FetchSeqUnit::squash(DynInstPtr inst, int squash_stage, tid, squash_stage); InstSeqNum done_seq_num = inst->bdelaySeqNum; - Addr new_PC = inst->readPredTarg(); + + // Handles the case where we are squashing because of something that is + // not a branch...like a memory stall + Addr new_PC = (inst->isControl()) ? + inst->readPredTarg() : inst->readPC() + instSize; if (squashSeqNum[tid] <= done_seq_num && lastSquashCycle[tid] == curTick) { -- 2.30.2