diff options
| author | Robert Norton | 2016-04-15 14:13:59 +0100 |
|---|---|---|
| committer | Robert Norton | 2016-04-15 14:13:59 +0100 |
| commit | ddda8969d55f2c76f24ea29fce33030851cff5bf (patch) | |
| tree | 5164eb274ba939898508b5c1573a16843520e10d | |
| parent | 7e9524cb70edd40c7968667a6de12f09f6cfe29c (diff) | |
cseal: perform arithmetic using nats to avoid signed comparison. Should maybe do this in readCapReg
| -rw-r--r-- | cheri/cheri_insts.sail | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cheri/cheri_insts.sail b/cheri/cheri_insts.sail index a2d168cd..88516bb4 100644 --- a/cheri/cheri_insts.sail +++ b/cheri/cheri_insts.sail @@ -343,7 +343,7 @@ function clause execute (CSeal(cd, cs, ct)) = exit (raise_c2_exception(CapEx_SealViolation, ct)) else if (~(ct_val.permit_seal)) then exit (raise_c2_exception(CapEx_PermitSealViolation, ct)) - else if ((ct_val.offset) >= (ct_val.length)) then + else if ((nat)(ct_val.offset) >= (nat)(ct_val.length)) then exit (raise_c2_exception(CapEx_LengthViolation, ct)) else if (ct_cursor > max_otype) then exit (raise_c2_exception(CapEx_LengthViolation, ct)) |
