diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-04-22 10:29:53 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-05-31 16:03:29 +0800 |
commit | fe63e05867125d3899788bc4c72e677d195ae264 (patch) | |
tree | dd5da80d4b5af3e09e4278f93e40ab84aca1e501 | |
parent | da6088fd7636c82e644da3655015e734048418a5 (diff) | |
download | gem5-fe63e05867125d3899788bc4c72e677d195ae264.tar.xz |
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.
-rw-r--r-- | src/cpu/o3/lsq_unit_impl.hh | 6 |
1 files 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<Impl>::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<Impl>::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<Impl>::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; } |