From a997b01332273eb7535df307c2939bf5e9ed3a35 Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Tue, 4 Jul 2017 10:13:11 +0100 Subject: change to cgettype -- returns -1 if not sealed instead of 0. --- cheri/cheri_insts.sail | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 *) } -- cgit v1.2.3