From fdc1cbee2ed6f702a70fb5cf44fd6a21198e6a33 Mon Sep 17 00:00:00 2001 From: Jonathan Woodruff Date: Wed, 24 Jul 2019 19:29:57 +0100 Subject: [PATCH] Revert a somewhat recent change that broke SetBounds. This was done to agree with Sail, so we need to explore this difference. --- CHERICC_Fat.bsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHERICC_Fat.bsv b/CHERICC_Fat.bsv index f4d43fe..e97a501 100644 --- a/CHERICC_Fat.bsv +++ b/CHERICC_Fat.bsv @@ -468,7 +468,7 @@ function Tuple2#(CapFat, Bool) setBoundsFat(CapFat cap, Address lengthFull); // We need to round up Exp if the length is within 1 of the maximum and if it will increase. // The lomask for checking for potential overflow should mask all but the bottom bit of the mantissa. - lmaskLo = lmask>>fromInteger(shiftAmount+1); + lmaskLo = lmask>>fromInteger(shiftAmount); Bool lengthMax = (len&(~lmaskLo))==(lmask&(~lmaskLo)); Bool resultExact = True; if(lengthMax && intExp && (lostSignificantLen || lostSignificantBase)) begin