From: Giacomo Travaglini Date: Wed, 8 Nov 2017 11:24:58 +0000 (+0000) Subject: cpu: MinorCPU handling IsSquashAfter flag X-Git-Tag: v19.0.0.0~2330 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c208d94cac1f89a04a5adb242327fa9fd13d70e;p=gem5.git cpu: MinorCPU handling IsSquashAfter flag MinorCPU was not handling IsSquashAfter flagged instructions. The behaviour was to force a branch (hence enforcing refetching) for SerializeAfter instructions only. This has now been extended to SquashAfter in order to correctly support ISB barrier instruction behaviour. Change-Id: Ie525b23350b0de121372d3b98b433e36b097d5c4 Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/5702 Reviewed-by: Gabe Black Maintainer: Andreas Sandberg --- diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc index a38a7677a..7b76ca2e1 100644 --- a/src/cpu/minor/execute.cc +++ b/src/cpu/minor/execute.cc @@ -219,13 +219,14 @@ Execute::tryToBranch(MinorDynInstPtr inst, Fault fault, BranchData &branch) const TheISA::PCState &pc_before = inst->pc; TheISA::PCState target = thread->pcState(); - /* Force a branch for SerializeAfter instructions at the end of micro-op - * sequence when we're not suspended */ + /* Force a branch for SerializeAfter/SquashAfter instructions + * at the end of micro-op sequence when we're not suspended */ bool force_branch = thread->status() != ThreadContext::Suspended && !inst->isFault() && inst->isLastOpInInst() && (inst->staticInst->isSerializeAfter() || - inst->staticInst->isIprAccess()); + inst->staticInst->isSquashAfter() || + inst->staticInst->isIprAccess()); DPRINTF(Branch, "tryToBranch before: %s after: %s%s\n", pc_before, target, (force_branch ? " (forcing)" : ""));