From ff9b7c7f3a769d1fc0779b2ca4a68a9624f0dad7 Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Mon, 18 Apr 2016 17:32:04 +0100 Subject: cheri: explicitly specify vector for comparison in cincoffset to work around unexpected sail behaviour with implicit cast form literal 0. --- cheri/cheri_insts.sail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cheri') diff --git a/cheri/cheri_insts.sail b/cheri/cheri_insts.sail index ae1f41c0..c340ef32 100644 --- a/cheri/cheri_insts.sail +++ b/cheri/cheri_insts.sail @@ -184,7 +184,7 @@ function clause execute (CIncOffset(cd, cb, rt)) = exit (raise_c2_exception_v(cd)) else if (register_inaccessible(cb)) then exit (raise_c2_exception_v(cb)) - else if ((cb_val.tag) & (cb_val.sealed) & (rt_val != 0)) then + else if ((cb_val.tag) & (cb_val.sealed) & (rt_val != 0x0000000000000000)) then exit (raise_c2_exception(CapEx_SealViolation, cb)) else writeCapReg(cd, {cb_val with offset=cb_val.offset+rt_val}) -- cgit v1.2.3