From 34c9bea6d61ca7afd42dfb4fa9d93cded2117476 Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Fri, 22 Mar 2019 00:06:54 +0000 Subject: [PATCH] Fix precision bug (Jon) --- CHERICC_Fat.bsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHERICC_Fat.bsv b/CHERICC_Fat.bsv index 4ae47f4..b3663c0 100644 --- a/CHERICC_Fat.bsv +++ b/CHERICC_Fat.bsv @@ -449,7 +449,7 @@ function Tuple2#(CapFat, Bool) setBoundsFat(CapFat cap, Address lengthFull); // We need to round up Exp if the length is within 2 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); + lmaskLo = lmask>>fromInteger(shiftAmount+1); Bool lengthMax = (len&(~lmaskLo))==(lmask&(~lmaskLo)); if(lengthMax && intExp && (lostSignificantLen || lostSignificantBase)) begin e = e+1;