summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norton2017-06-16 13:29:39 +0100
committerRobert Norton2017-06-16 13:29:39 +0100
commit3cafb91e447f3e95e45cc9ef1936d1f8e403f30a (patch)
tree6c0936dfde3bdfe25da37679595314be189ce932
parent045652204f09c0cac156eb24cfdf32c4247cf2ea (diff)
fix previous commit so that it builds.
-rw-r--r--cheri/cheri_insts.sail13
1 files changed, 7 insertions, 6 deletions
diff --git a/cheri/cheri_insts.sail b/cheri/cheri_insts.sail
index 6306feca..e044dc60 100644
--- a/cheri/cheri_insts.sail
+++ b/cheri/cheri_insts.sail
@@ -604,14 +604,15 @@ function clause execute (CCopyType(cd, cb, ct)) =
raise_c2_exception(CapEx_SealViolation, cb)
else
{
- let newOffset = if (ct_val.sealed)
+ let (bit[64]) newOffset = if (ct_val.sealed)
then
- EXTZ(ct_val.otype) - cb_val.base
+ ((bit[64]) (EXTZ(ct_val.otype))) - cb_base
else
- -1 in
- let (success, cap) = setCapOffset(cb_val, newOffset) in
- writeCapReg(cd, cap);
- assert(success, None); (*XXX TODO can this fail*)
+ (bit[64]) -1 in
+ let (success, cap) = setCapOffset(cb_val, newOffset) in {
+ writeCapReg(cd, cap);
+ assert(success, None); (*XXX TODO can this fail*)
+ }
}
(* END_CCopyType *)
}