summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norton2018-04-23 12:01:12 +0100
committerRobert Norton2018-04-23 12:01:12 +0100
commitd980ad5da9eb17b1e5ac4ac70de7d31948cb181f (patch)
treee5390a4cbb2c78d515903ab8b7c3ecb12ad0dbde
parentc607561468c03ad6d2eaa897b42934af32bd05bd (diff)
Fix a discrepancy with spec. about which register number is reported for permissions failure in CBuildCap.
-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 1901c5a2..cfd3b153 100644
--- a/cheri/cheri_insts.sail
+++ b/cheri/cheri_insts.sail
@@ -814,7 +814,7 @@ function clause execute (CBuildCap(cd, cb, ct)) =
else if ct_base > ct_top then /* check for length < 0 - possible because ct might be untagged */
raise_c2_exception(CapEx_LengthViolation, ct)
else if (ct_perms & cb_perms) != ct_perms then
- raise_c2_exception(CapEx_UserDefViolation, ct)
+ raise_c2_exception(CapEx_UserDefViolation, cb)
else
let (exact, cd1) = setCapBounds(cb_val, to_bits(64, ct_base), to_bits(65, ct_top)) in
let (representable, cd2) = setCapOffset(cd1, to_bits(64, ct_offset)) in