Fix setBounds not clearing tag (#12)

Ensure tag is cleared if the result is not in bounds
This commit is contained in:
Marvel Renju
2024-09-09 12:45:12 +01:00
committed by GitHub
parent 7d229ec7d5
commit 354a67386e

View File

@@ -668,6 +668,9 @@ function SetBoundsReturn#(CapFat, CapAddrW) setBoundsFat(CapFat cap, Address len
Bool resultInBounds = newBaseInBounds && newTopInBounds && !addressWrap;
// Nullify the capability if the result is not in bounds
if (!resultInBounds) ret.isCapability = False;
// Return derived capability
return SetBoundsReturn { cap: ret
, exact: exact