diff options
| author | Robert Norton | 2017-01-26 15:35:37 +0000 |
|---|---|---|
| committer | Robert Norton | 2017-01-26 15:35:37 +0000 |
| commit | 5abf3ae1be4eb936ff1d3291d2998fac1c746c3a (patch) | |
| tree | 1223280a4d13617ddde6612b2cf500faebe04482 | |
| parent | 556876bc68e614d530f4ea9ed737af200f13cdd3 (diff) | |
fix incorrect constant in calculation of representable boundary (should be B - 2**12)
| -rw-r--r-- | cheri/cheri_prelude_128.sail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cheri/cheri_prelude_128.sail b/cheri/cheri_prelude_128.sail index ba2d9186..b864ba64 100644 --- a/cheri/cheri_prelude_128.sail +++ b/cheri/cheri_prelude_128.sail @@ -187,7 +187,7 @@ function bit[64] getCapBase((CapStruct) c) = let ([|63|]) E = min(unsigned(c.E), 45) in let (bit[20]) B = c.B in let (bit[64]) a = c.address in - let (bit[20]) R = B - 0x00100 in (* wraps *) + let (bit[20]) R = B - 0x01000 in (* wraps *) let (bit[20]) a_mid = a[(E + 19)..E] in let (int) correction = a_top_correction(a_mid, R, B) in let a_top = a[63..(E+20)] in @@ -199,7 +199,7 @@ function bit[65] getCapTop((CapStruct) c) = let (bit[20]) B = c.B in let (bit[20]) T = c.T in let (bit[64]) a = c.address in - let (bit[20]) R = B - 0x00100 in (* wraps *) + let (bit[20]) R = B - 0x01000 in (* wraps *) let (bit[20]) a_mid = a[(E + 19)..E] in let (int) correction = a_top_correction(a_mid, R, T) in let a_top = a[63..(E+20)] in |
