summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2019-04-22 10:29:53 +0800
committerIru Cai <mytbk920423@gmail.com>2019-04-22 10:29:53 +0800
commit470c013495c95af03d70998540d9d2e282a6ba18 (patch)
tree342dd2b96e4055a9f4c09e005d02f0be1d45a70f /src/cpu
parent92d9c897f1ad3d08a8c225b1fd57eebfd47087d1 (diff)
downloadgem5-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.
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/o3/lsq_unit_impl.hh6
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;
}