diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-04-22 10:29:53 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-04-22 10:29:53 +0800 |
commit | 470c013495c95af03d70998540d9d2e282a6ba18 (patch) | |
tree | 342dd2b96e4055a9f4c09e005d02f0be1d45a70f | |
parent | 92d9c897f1ad3d08a8c225b1fd57eebfd47087d1 (diff) | |
download | gem5-470c013495c95af03d70998540d9d2e282a6ba18.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; } |