summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norton2018-01-18 11:11:33 +0000
committerRobert Norton2018-01-18 11:11:33 +0000
commit71fa25403c7e99ca57753faf9738f37fe36ed1c1 (patch)
tree14864901ba7f6c478786f8898b03d2a9f686729b
parentf0963618ba927492b0724383040b9922ab41f1dd (diff)
immediate for CIncOffsetImmediate must be treated as signed (fixes test_cp2_rep_underflow).
-rw-r--r--cheri/cheri_insts.sail2
1 files changed, 1 insertions, 1 deletions
diff --git a/cheri/cheri_insts.sail b/cheri/cheri_insts.sail
index 5687a275..66f87310 100644
--- a/cheri/cheri_insts.sail
+++ b/cheri/cheri_insts.sail
@@ -495,7 +495,7 @@ function clause execute (CIncOffsetImmediate(cd, cb, imm)) =
(* START_CIncOffsetImmediate *)
checkCP2usable();
cb_val := readCapReg(cb);
- let (bit[64]) imm64 = EXTZ(imm) in
+ let (bit[64]) imm64 = EXTS(imm) in
if (register_inaccessible(cd)) then
raise_c2_exception(CapEx_AccessSystemRegsViolation, cd)
else if (register_inaccessible(cb)) then