cpu-o3: Clear current macro-op in fetch if squashing after last micro-op (#1047)

Fix #1042. Clear the current fetch macro-op if the instruction
initiating the squash is the last micro-op in its macro-op.

Change-Id: I77f60334771277e47f19573d4067b3a7bc5488b2
This commit is contained in:
Nicholas Mosier
2024-04-25 11:14:58 -07:00
committed by GitHub
parent 66decb2e93
commit 51d546cb06

View File

@@ -691,7 +691,8 @@ Fetch::doSquash(const PCStateBase &new_pc, const DynInstPtr squashInst,
set(pc[tid], new_pc);
fetchOffset[tid] = 0;
if (squashInst && squashInst->pcState().instAddr() == new_pc.instAddr())
if (squashInst && squashInst->pcState().instAddr() == new_pc.instAddr() &&
!squashInst->isLastMicroop())
macroop[tid] = squashInst->macroop;
else
macroop[tid] = NULL;