summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norton2018-05-21 16:20:54 +0100
committerRobert Norton2018-05-21 16:21:00 +0100
commit960dcf4f02d11feb6e8b4be58bf4eb2feec1340c (patch)
tree637061499350661b4be894b35739ffc004b94729
parent66781e49fb339071d9915b3bc42fca7f250a567b (diff)
cheri: fix a bug in cfromptr: should give null result when value of rt is zero not only when rt is the zero register (zr).
-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 045c8152..3df442d9 100644
--- a/cheri/cheri_insts.sail
+++ b/cheri/cheri_insts.sail
@@ -729,7 +729,7 @@ function clause execute (CFromPtr(cd, cb, rt)) =
raise_c2_exception(CapEx_AccessSystemRegsViolation, cd)
else if (register_inaccessible(cb)) then
raise_c2_exception(CapEx_AccessSystemRegsViolation, cb)
- else if (rt == 0b00000) then
+ else if (rt_val == 0x0000000000000000) then
writeCapReg(cd, null_cap)
else if not (cb_val.tag) then
raise_c2_exception(CapEx_TagViolation, cb)