From b8e21a2d32f2485c74ccd5587719d87a2da237fc Mon Sep 17 00:00:00 2001 From: Minje Jun <77132288+jjuninho@users.noreply.github.com> Date: Sat, 15 Jun 2024 02:12:26 +0900 Subject: [PATCH] cpu-o3: Do not set Executed on load instruction to be replayed (#1182) A load instruction can be replayed when 1) it's strictly ordered or 2) it falls into load-store forwarding mismatch. Case 1 was considered in executeLoad function but the case 2 wasn't. It causes the case-2 replayed load instruction to violate the assertion condition "assert(!load_inst->isExecuted())" in LSQUnit::read. This commit fixes the problem by adding consideration of the case 2 in LSQUnit::executeLoad. Co-authored-by: Minje Jun --- src/cpu/o3/lsq_unit.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cpu/o3/lsq_unit.cc b/src/cpu/o3/lsq_unit.cc index 68fd464627..a00c8c7d06 100644 --- a/src/cpu/o3/lsq_unit.cc +++ b/src/cpu/o3/lsq_unit.cc @@ -611,6 +611,12 @@ LSQUnit::executeLoad(const DynInstPtr &inst) if (inst->isTranslationDelayed() && load_fault == NoFault) return load_fault; + // Partial Store-to-Load Forwarding condition marks the load to be + // reissued during LSQUnit::read(). In this case we shouldn't notify + // iewStage that the instruction is ready for commit. + if (!inst->isIssued() && !inst->effAddrValid()) + return load_fault; + if (load_fault != NoFault && inst->translationCompleted() && inst->savedRequest->isPartialFault() && !inst->savedRequest->isComplete()) {