From d0e4cdc9c36466a3dbef8c9f9f509cce8f1a6c34 Mon Sep 17 00:00:00 2001 From: Giacomo Gabrielli Date: Tue, 23 Oct 2018 13:51:52 +0100 Subject: cpu: Add a memory access predicate This changeset introduces a new predicate to guard memory accesses. The most immediate use for this is to allow proper handling of predicated-false vector contiguous loads and predicated-false micro-ops of vector gather loads (added in separate changesets). Change-Id: Ice6894fe150faec2f2f7ab796a00c99ac843810a Signed-off-by: Giacomo Gabrielli Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17991 Tested-by: kokoro Reviewed-by: Bradley Wang Reviewed-by: Nikos Nikoleris Maintainer: Nikos Nikoleris --- src/cpu/o3/lsq_unit_impl.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/cpu/o3') diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh index 62402bf4f..9323e8634 100644 --- a/src/cpu/o3/lsq_unit_impl.hh +++ b/src/cpu/o3/lsq_unit_impl.hh @@ -542,6 +542,16 @@ LSQUnit::executeLoad(const DynInstPtr &inst) load_fault = inst->initiateAcc(); + if (!inst->readMemAccPredicate()) { + assert(load_fault == NoFault); + assert(inst->readPredicate()); + inst->setExecuted(); + inst->completeAcc(nullptr); + iewStage->instToCommit(inst); + iewStage->activityThisCycle(); + return NoFault; + } + if (inst->isTranslationDelayed() && load_fault == NoFault) return load_fault; -- cgit v1.2.3