summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norton2016-04-29 17:02:07 +0100
committerRobert Norton2016-04-29 17:02:07 +0100
commit7119bd7e64e43b991d7fc06965d90d575bd1f7ea (patch)
tree9d364475268f1df6cfdd09ee506c2572b99e94da
parentf9c25890e174ede61130316d0cfc7b9416400e5a (diff)
implement 'big immediates' for CSC and CLC (ISA change).
-rw-r--r--cheri/cheri_insts.sail4
1 files changed, 2 insertions, 2 deletions
diff --git a/cheri/cheri_insts.sail b/cheri/cheri_insts.sail
index fe77df82..f2c91615 100644
--- a/cheri/cheri_insts.sail
+++ b/cheri/cheri_insts.sail
@@ -616,7 +616,7 @@ function clause execute (CSC(cs, cb, rt, rd, offset, conditional)) =
else
{
cursor := getCapCursor(cb_val);
- vAddr := cursor + unsigned(rGPR(rt)) + signed(offset);
+ vAddr := cursor + unsigned(rGPR(rt)) + (16 * signed(offset));
vAddr64:= (bit[64]) vAddr;
if ((vAddr + cap_size) > ((nat) (cb_val.base) + ((nat) (cb_val.length)))) then
exit (raise_c2_exception(CapEx_LengthViolation, cb))
@@ -660,7 +660,7 @@ function clause execute (CLC(cd, cb, rt, offset, linked)) =
else
{
cursor := getCapCursor(cb_val);
- vAddr := cursor + unsigned(rGPR(rt)) + signed(offset);
+ vAddr := cursor + unsigned(rGPR(rt)) + (16*signed(offset));
vAddr64:= (bit[64]) vAddr;
if ((vAddr + cap_size) > ((nat) (cb_val.base) + ((nat) (cb_val.length)))) then
exit (raise_c2_exception(CapEx_LengthViolation, cb))