From d980ad5da9eb17b1e5ac4ac70de7d31948cb181f Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Mon, 23 Apr 2018 12:01:12 +0100 Subject: Fix a discrepancy with spec. about which register number is reported for permissions failure in CBuildCap. --- cheri/cheri_insts.sail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3