From 51d546cb06fee62080ce2eb1d1b6f5b0efe38c62 Mon Sep 17 00:00:00 2001 From: Nicholas Mosier Date: Thu, 25 Apr 2024 11:14:58 -0700 Subject: [PATCH] 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 --- src/cpu/o3/fetch.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpu/o3/fetch.cc b/src/cpu/o3/fetch.cc index 8cd84cbf05..452545e871 100644 --- a/src/cpu/o3/fetch.cc +++ b/src/cpu/o3/fetch.cc @@ -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;