周耀阳 has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/38935 )
Change subject: cpu-o3: Fix lsq unit address limit overflow
......................................................................
cpu-o3: Fix lsq unit address limit overflow
Change-Id: I036e0fc7fe421d8536a6d627f0f76ff5c609bbc7
---
M src/cpu/o3/lsq_unit.hh
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh
index dbe15e6..8b10370 100644
--- a/src/cpu/o3/lsq_unit.hh
+++ b/src/cpu/o3/lsq_unit.hh
@@ -753,14 +753,17 @@
// Check if the store data is within the lower and upper
bounds of
// addresses that the request needs.
auto req_s = req->mainRequest()->getVaddr();
- auto req_e = req_s + req->mainRequest()->getSize();
+ auto req_e = req_s - 1 + req->mainRequest()->getSize();
auto st_s = store_it->instruction()->effAddr;
- auto st_e = st_s + store_size;
+ auto st_e = st_s - 1 + store_size;
bool store_has_lower_limit = req_s >= st_s;
- bool store_has_upper_limit = req_e <= st_e;
- bool lower_load_has_store_part = req_s < st_e;
- bool upper_load_has_store_part = req_e > st_s;
+ // bool store_has_upper_limit = req_e <= st_e;
+ bool store_has_upper_limit =
+ req_s - store_size <= st_s - req->mainRequest()->getSize();
+
+ bool lower_load_has_store_part = req_s <= st_e;
+ bool upper_load_has_store_part = req_e >= st_s;
auto coverage = AddrRangeCoverage::NoAddrRangeCoverage;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38935
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I036e0fc7fe421d8536a6d627f0f76ff5c609bbc7
Gerrit-Change-Number: 38935
Gerrit-PatchSet: 1
Gerrit-Owner: 周耀阳 <diamond...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s