val X_read : forall 'n 'width,
'width in {8, 16, 32, 64}.
(int('n), int('width)) -> bits('width)
function X_read (n, width) = {
assert(n >= 0 & n <= 31);
assert(width == 8 | width == 16 | width == 32 | width == 64);
if n != 31 then {
return(_R(n)[width - 1 .. 0])
} else {
return(Zeros(width))
}
}
Made from ScarletNX's Sail at 166ad3910f80. sail-arm's definitions are Arm's ASL in Sail (BSD 3-Clause Clear, license); ScarletNX's fixups are GPL-3.0-or-later.