Reinstate crrl and cram helpers
This commit is contained in:
@@ -189,14 +189,13 @@ typeclass CHERICap#(type t, numeric type ot, numeric type flg, numeric type n, n
|
|||||||
// base.
|
// base.
|
||||||
function Bit#(2) getBaseAlignment (t cap);
|
function Bit#(2) getBaseAlignment (t cap);
|
||||||
|
|
||||||
// TODO the following do not compile due to "not enough explicit type information"
|
|
||||||
// Get representable alignment mask
|
// Get representable alignment mask
|
||||||
// function Bit#(n) getRepresentableAlignmentMask (t dummy, Bit#(n) length_request) =
|
function Bit#(n) getRepresentableAlignmentMask (t dummy, Bit#(n) length_request) =
|
||||||
// setBoundsCombined(nullCap, length_request).mask;
|
setBoundsCombined(nullCapFromDummy(dummy), length_request).mask;
|
||||||
|
|
||||||
// Get representable length
|
// Get representable length
|
||||||
// function Bit#(n) getRepresentableLength (t dummy, Bit#(n) length_request) =
|
function Bit#(n) getRepresentableLength (t dummy, Bit#(n) length_request) =
|
||||||
// setBoundsCombined(nullCap, length_request).length;
|
setBoundsCombined(nullCapFromDummy(dummy), length_request).length;
|
||||||
|
|
||||||
// Assert that the encoding is valid
|
// Assert that the encoding is valid
|
||||||
function Bool isDerivable (t cap);
|
function Bool isDerivable (t cap);
|
||||||
|
|||||||
Reference in New Issue
Block a user