From 508da818baa0d3d103c563c148b6ef2dc4aba057 Mon Sep 17 00:00:00 2001 From: Alexandre Joannou Date: Mon, 18 Jan 2021 16:06:17 +0000 Subject: [PATCH] Use tmpAddr in place of pointer in incOffsetFat following Dapeng Gao's email --- CHERICC_Fat.bsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHERICC_Fat.bsv b/CHERICC_Fat.bsv index 29274bc..51a469f 100644 --- a/CHERICC_Fat.bsv +++ b/CHERICC_Fat.bsv @@ -653,7 +653,7 @@ function VnD#(CapFat) incOffsetFat(CapFat cap, LCapAddress pointer, Bit#(CapAddr // In the incOffset case, the 'pointer' argument already contains the new address CapAddress tmpAddr = truncate(pointer); ret.address = zeroExtend(tmpAddr); - ret.addrBits = truncate(pointer >> e); + ret.addrBits = truncate(tmpAddr >> e); end // Nullify the capability if the representable bounds check has failed if (!inBounds) ret.isCapability = False;//nullifyCap(ret);