From 960dcf4f02d11feb6e8b4be58bf4eb2feec1340c Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Mon, 21 May 2018 16:20:54 +0100 Subject: 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). --- 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 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) -- cgit v1.2.3