cpu: Replace empty byteEnable check with Request::isMasked
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 10 Dec 2019 14:59:38 +0000 (14:59 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 11 Dec 2019 15:07:52 +0000 (15:07 +0000)
This should be the interface to be used to check if the request
has some masked bytes.

JIRA: https://gem5.atlassian.net/browse/GEM5-196

Change-Id: I1ab5fd266c7b63a928aada32ae6d4f7fa915f2b6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23523
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/simple/atomic.cc

index 3e3ba41b345a60b895116c05c7ee6bc7de881bcb..25a7995217694450ebc4d3aef6c9403b78039071 100644 (file)
@@ -541,7 +541,7 @@ AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size, Addr addr,
         if (fault != NoFault || size_left == 0)
         {
             if (req->isLockedRMW() && fault == NoFault) {
-                assert(byte_enable.empty());
+                assert(!req->isMasked());
                 locked = false;
             }