From a6f5ca93eb8cb2ef7e5d34982cb3ae12b62b6dd0 Mon Sep 17 00:00:00 2001 From: jon Date: Fri, 21 Aug 2020 15:54:57 +0100 Subject: [PATCH] Use the handy MW-derived type for a handy safe-if-inbounds increment size limit. --- CHERICap.bsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHERICap.bsv b/CHERICap.bsv index 5b883d4..ba6a420 100644 --- a/CHERICap.bsv +++ b/CHERICap.bsv @@ -125,7 +125,7 @@ typeclass CHERICap#(type t, numeric type ot, numeric type flg, numeric type n, n // Set the address of the capability. Result assumed to be representable function t setAddrUnsafe (t cap, Bit#(n) addr); // Add to the address of the capability. Result assumed to be representable - function t addAddrUnsafe (t cap, Bit#(8) inc); + function t addAddrUnsafe (t cap, Bit#(maskable_bits) inc); // Get the offset of the capability function Bit#(n) getOffset (t cap) = getAddr(cap) - getBase(cap);