diff options
Diffstat (limited to 'cheri/cheri_prelude_common.sail')
| -rw-r--r-- | cheri/cheri_prelude_common.sail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cheri/cheri_prelude_common.sail b/cheri/cheri_prelude_common.sail index 09e07f70..9c51966b 100644 --- a/cheri/cheri_prelude_common.sail +++ b/cheri/cheri_prelude_common.sail @@ -355,7 +355,7 @@ function addrWrapper(addr, accessType, width) = StoreData => if (~(cap.permit_store)) then (raise_c2_exception(CapEx_PermitStoreViolation, capno)) }; cursor = getCapCursor(cap); - vAddr = cursor + unsigned(addr); + vAddr = (cursor + unsigned(addr)) % pow2(64); size = wordWidthBytes(width); base = getCapBase(cap); top = getCapTop(cap); @@ -364,7 +364,7 @@ function addrWrapper(addr, accessType, width) = else if (vAddr < base) then (raise_c2_exception(CapEx_LengthViolation, capno)) else - to_bits(64, vAddr); /* XXX vAddr not truncated because top <= 2^64 and size > 0 */ + to_bits(64, vAddr); } $ifdef _MIPS_TLB_STUB |
