diff options
| author | Robert Norton | 2016-04-18 17:32:04 +0100 |
|---|---|---|
| committer | Robert Norton | 2016-04-18 17:34:00 +0100 |
| commit | ff9b7c7f3a769d1fc0779b2ca4a68a9624f0dad7 (patch) | |
| tree | 02784f1d377df10c0cccaa1c62a8590b6d6b64a1 | |
| parent | 0a1c02598bbf5499dd802138eac9fb102bfe5e5e (diff) | |
cheri: explicitly specify vector for comparison in cincoffset to work around unexpected sail behaviour with implicit cast form literal 0.
| -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 ae1f41c0..c340ef32 100644 --- a/cheri/cheri_insts.sail +++ b/cheri/cheri_insts.sail @@ -184,7 +184,7 @@ function clause execute (CIncOffset(cd, cb, rt)) = exit (raise_c2_exception_v(cd)) else if (register_inaccessible(cb)) then exit (raise_c2_exception_v(cb)) - else if ((cb_val.tag) & (cb_val.sealed) & (rt_val != 0)) then + else if ((cb_val.tag) & (cb_val.sealed) & (rt_val != 0x0000000000000000)) then exit (raise_c2_exception(CapEx_SealViolation, cb)) else writeCapReg(cd, {cb_val with offset=cb_val.offset+rt_val}) |
