summaryrefslogtreecommitdiff
path: root/cheri
diff options
context:
space:
mode:
Diffstat (limited to 'cheri')
-rw-r--r--cheri/cheri_prelude_common.sail2
1 files changed, 2 insertions, 0 deletions
diff --git a/cheri/cheri_prelude_common.sail b/cheri/cheri_prelude_common.sail
index 0a491145..5dd14974 100644
--- a/cheri/cheri_prelude_common.sail
+++ b/cheri/cheri_prelude_common.sail
@@ -369,6 +369,8 @@ function TranslatePC (vAddr) = {
let absPC = base + unsigned(vAddr);
if ((absPC % 4) != 0) then /* bad PC alignment */
(SignalExceptionBadAddr(AdEL, to_bits(64, absPC))) /* XXX absPC may be truncated */
+ else if not (pcc.tag) then
+ (raise_c2_exception_noreg(CapEx_TagViolation))
else if ((absPC + 4) > top) then
(raise_c2_exception_noreg(CapEx_LengthViolation))
else