From fe63e05867125d3899788bc4c72e677d195ae264 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Mon, 22 Apr 2019 10:29:53 +0800 Subject: fix the violation checking for IFT+fence When using IFT, fenceDelay means the load is deferred, but some load can be between fences and executed, so fenceDelayed instructions should be checked. --- src/cpu/o3/lsq_unit_impl.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh index 9d71c2093..164a768bb 100644 --- a/src/cpu/o3/lsq_unit_impl.hh +++ b/src/cpu/o3/lsq_unit_impl.hh @@ -543,7 +543,7 @@ LSQUnit::checkSnoop(PacketPtr pkt) // Check that this snoop didn't just invalidate our lock flag // [InvisiSpec] also make sure the instruction has been sent out // otherwise, we cause unneccessary squash - if (ld_inst->effAddrValid() && !ld_inst->fenceDelay() + if (ld_inst->effAddrValid() && (useIFT || !ld_inst->fenceDelay()) && (load_addr_low == invalidate_addr || load_addr_high == invalidate_addr) && ld_inst->memReqFlags & Request::LLSC) @@ -564,7 +564,7 @@ LSQUnit::checkSnoop(PacketPtr pkt) // [SafeSpce] check snoop violation when the load has // been sent out; otherwise, unneccessary squash if (!ld_inst->effAddrValid() || ld_inst->strictlyOrdered() - || ld_inst->fenceDelay()) { + || (!useIFT && ld_inst->fenceDelay()) ) { incrLdIdx(load_idx); continue; } @@ -742,7 +742,7 @@ LSQUnit::checkViolations(int load_idx, const DynInstPtr &inst) // [InvisiSpec] no need to check violation for unsent load // otherwise, unneccessary squash if (!ld_inst->effAddrValid() || ld_inst->strictlyOrdered() - || ld_inst->fenceDelay()) { + || (!useIFT && ld_inst->fenceDelay()) ) { incrLdIdx(load_idx); continue; } -- cgit v1.2.3