summaryrefslogtreecommitdiff
path: root/cheri
diff options
context:
space:
mode:
Diffstat (limited to 'cheri')
-rw-r--r--cheri/cheri_insts.sail4
1 files changed, 3 insertions, 1 deletions
diff --git a/cheri/cheri_insts.sail b/cheri/cheri_insts.sail
index 96127906..e6228217 100644
--- a/cheri/cheri_insts.sail
+++ b/cheri/cheri_insts.sail
@@ -71,7 +71,9 @@ function clause execute (CGetType(rd, cb)) =
raise_c2_exception(CapEx_AccessSystemRegsViolation, cb)
else
let capVal = readCapReg(cb) in
- wGPR(rd) := EXTZ(capVal.otype);
+ wGPR(rd) := if (capVal.sealed)
+ then EXTZ(capVal.otype)
+ else -1
(* END_CGetType *)
}