cpu-minor: Fix for addr range coverage calculation
authorPau Cabre <pau.cabre@metempsy.com>
Fri, 1 Sep 2017 12:06:33 +0000 (14:06 +0200)
committerPau Cabre <pau.cabre@metempsy.com>
Fri, 1 Sep 2017 14:03:18 +0000 (14:03 +0000)
Coverage was wrongly set to PartialAddrRangeCoverage in the case of
disjoint adjacent ranges

Change-Id: I29aaf5145e6cdcf5f0b8f4e009d57ee57bd4c944
Signed-off-by: Pau Cabre <pau.cabre@metempsy.com>
Reviewed-on: https://gem5-review.googlesource.com/4640
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/cpu/minor/lsq.cc

index bf2612071dcfbabdee7ee5dec8ecee7ef5a6cfda..b7d5360ac49e8584e321e70d43b1f5a3f51722d8 100644 (file)
@@ -97,7 +97,7 @@ LSQ::LSQRequest::containsAddrRangeOf(
 
     AddrRangeCoverage ret;
 
-    if (req1_addr > req2_end_addr || req1_end_addr < req2_addr)
+    if (req1_addr >= req2_end_addr || req1_end_addr <= req2_addr)
         ret = NoAddrRangeCoverage;
     else if (req1_addr <= req2_addr && req1_end_addr >= req2_end_addr)
         ret = FullAddrRangeCoverage;