Skip to content

Commit 09ef3a7

Browse files
marnovandermaasrmn30
authored andcommitted
This avoids a deprecations warning from Sail
The warning reads: Explicit effect annotations are deprecated. They are no longer used and can be removed.
1 parent ef8cfbc commit 09ef3a7

10 files changed

+24
-24
lines changed

src/cheri_cap_common.sail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ function incCapAddr(c, delta) =
742742
(representable, newCap)
743743

744744

745-
val capToString : (Capability) -> string effect {escape}
745+
val capToString : (Capability) -> string
746746
function capToString (cap) = {
747747
let len = getCapLength(cap);
748748
let len_str = BitStr(to_bits(cap_len_width + 3, len));

src/cheri_insts_begin.sail

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
* We add a separate capability-mode encdec clause to handle encodings that overlap
6565
* with baseline RISC-V encodings.
6666
*/
67-
val encdec_capmode : ast <-> bits(32) effect {rreg}
67+
val encdec_capmode : ast <-> bits(32)
6868
scattered mapping encdec_capmode
6969

70-
val encdec_compressed_capmode : ast <-> bits(16) effect {rreg}
70+
val encdec_compressed_capmode : ast <-> bits(16)
7171
scattered mapping encdec_compressed_capmode

src/cheri_mem.sail

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* are flags controlling relaxed memory ordering and atomic memory access
7070
* (not used on single-core MCU).
7171
*/
72-
val mem_read_cap : (xlenbits, bool, bool, bool) -> MemoryOpResult(Capability) effect {rmem, rmemt, rreg, escape}
72+
val mem_read_cap : (xlenbits, bool, bool, bool) -> MemoryOpResult(Capability)
7373
function mem_read_cap (addr, aq, rl, res) = {
7474
let result : MemoryOpResult((CapBits, bool)) = mem_read_meta(Read(Data), addr, cap_size, aq, rl, res, true);
7575
match result {
@@ -116,7 +116,7 @@ function mem_read_cap_revoked (addr) = {
116116
* integrated with the RMEM concurrency tool, but the address annoucement
117117
* may be ignored in sequential execution.
118118
*/
119-
val mem_write_ea_cap : (xlenbits, bool, bool, bool) -> MemoryOpResult(unit) effect {eamem}
119+
val mem_write_ea_cap : (xlenbits, bool, bool, bool) -> MemoryOpResult(unit)
120120
function mem_write_ea_cap(addr, aq, rl, con) = {
121121
if ~(is_aligned_addr(addr, cap_size))
122122
then MemException(E_SAMO_Addr_Align())
@@ -130,7 +130,7 @@ function mem_write_ea_cap(addr, aq, rl, con) = {
130130
* in case of exception [e]. [aq], [rl] and [res] are flags controlling relaxed
131131
* memory ordering and atomic accesses (not used on single-core MCU).
132132
*/
133-
val mem_write_cap : (xlenbits, Capability, bool, bool, bool) -> MemoryOpResult(bool) effect {wmv, rreg, wreg, escape, wmvt}
133+
val mem_write_cap : (xlenbits, Capability, bool, bool, bool) -> MemoryOpResult(bool)
134134
function mem_write_cap (addr, cap, aq, rl, con) = {
135135
let cap_bits = capToBits(cap);
136136
/* Assume that conversion to bits and back does not change the capability.

src/cheri_mem_metadata.sail

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function tag_addr_to_addr(tag_addr : tagaddrbits) -> xlenbits = tag_addr @ zeros
7474
/* FIXME: we should have a maximum cap_size constraint for 'n.
7575
* This would check that the assumption below of a max span of two regions is valid.
7676
*/
77-
val __WriteRAM_Meta : forall 'n. (xlenbits, atom('n), mem_meta) -> unit effect {wmvt}
77+
val __WriteRAM_Meta : forall 'n. (xlenbits, atom('n), mem_meta) -> unit
7878
function __WriteRAM_Meta(addr, width, tag) = {
7979
let tag_addr = addr_to_tag_addr(addr);
8080
if get_config_print_mem() then
@@ -93,7 +93,7 @@ function __WriteRAM_Meta(addr, width, tag) = {
9393
}
9494

9595
/* FIXME: we should have a maximum cap_size constraint for 'n. */
96-
val __ReadRAM_Meta : forall 'n. (xlenbits, atom('n)) -> mem_meta effect {rmemt}
96+
val __ReadRAM_Meta : forall 'n. (xlenbits, atom('n)) -> mem_meta
9797
function __ReadRAM_Meta(addr, width) = {
9898
let tag_addr = addr_to_tag_addr(addr);
9999
let tag = MEMr_tag(zero_extend(tag_addr));

src/cheri_pc_access.sail

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,20 @@
6262

6363
/* accessors for default architectural addresses, for use from within instructions */
6464

65-
val get_arch_pc : unit -> xlenbits effect {rreg}
65+
val get_arch_pc : unit -> xlenbits
6666
function get_arch_pc () =
6767
PC
6868

69-
val get_next_pc : unit -> xlenbits effect {rreg}
69+
val get_next_pc : unit -> xlenbits
7070
function get_next_pc() =
7171
nextPC
7272

73-
val set_next_pc : xlenbits -> unit effect {wreg}
73+
val set_next_pc : xlenbits -> unit
7474
function set_next_pc(pc) =
7575
/* could check for internal errors here on invalid pc */
7676
nextPC = pc
7777

78-
val tick_pc : unit -> unit effect {rreg, wreg}
78+
val tick_pc : unit -> unit
7979
function tick_pc() = {
8080
PCC = nextPCC;
8181
PC = nextPC

src/cheri_prelude.sail

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262

6363
/* CHERI specific helpers */
6464

65-
val MEMr_tag = "read_tag_bool" : bits(64) -> bool effect { rmemt }
66-
val MEMw_tag = "write_tag_bool" : (bits(64) , bool) -> unit effect { wmvt }
65+
val MEMr_tag = "read_tag_bool" : bits(64) -> bool
66+
val MEMw_tag = "write_tag_bool" : (bits(64) , bool) -> unit
6767

68-
val MAX : forall 'n, 'n >= 0 . atom('n) -> atom(2 ^ 'n - 1) effect pure
68+
val MAX : forall 'n, 'n >= 0 . atom('n) -> atom(2 ^ 'n - 1)
6969
function MAX(n) = pow2(n) - 1
7070

7171
/*!

src/cheri_reg_type.sail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ type regtype = Capability
7070
let zero_reg : regtype = null_cap
7171

7272
/* register printer */
73-
val RegStr : Capability -> string effect {escape}
73+
val RegStr : Capability -> string
7474
function RegStr(r) = capToString(r)
7575

7676
/* conversions */

src/cheri_regs.sail

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
/* accessors for capability representation */
6464

6565
/* reads a given capability register, or the null capability if the argument is zero. */
66-
val rC : forall 'n, 0 <= 'n < 32. regno('n) -> regtype effect {rreg, escape}
66+
val rC : forall 'n, 0 <= 'n < 32. regno('n) -> regtype
6767
function rC r = {
6868
match r {
6969
0 => zero_reg,
@@ -87,7 +87,7 @@ function rC r = {
8787
}
8888

8989
/* writes a register with a capability value */
90-
val wC : forall 'n, 0 <= 'n < 32. (regno('n), regtype) -> unit effect {wreg, escape}
90+
val wC : forall 'n, 0 <= 'n < 32. (regno('n), regtype) -> unit
9191
function wC (r, v) = {
9292
/* Encode and decode capability to normalise it prior to writing to register */
9393
let v = encCapabilityToCapability(v.tag, capToEncCap(v));
@@ -123,7 +123,7 @@ function wC_bits(r: bits(5), v: regtype) -> unit = wC(unsigned(r), v)
123123

124124
overload C = {rC_bits, wC_bits, rC, wC}
125125

126-
val ext_init_regs : unit -> unit effect {wreg}
126+
val ext_init_regs : unit -> unit
127127
function ext_init_regs () = {
128128
PCC = root_cap_exe;
129129
nextPCC = root_cap_exe;
@@ -163,7 +163,7 @@ function ext_init_regs () = {
163163
* to be initialised differently. For RVFI we initialise cap regs to default
164164
* instead of null.
165165
*/
166-
val ext_rvfi_init : unit -> unit effect {wreg}
166+
val ext_rvfi_init : unit -> unit
167167
function ext_rvfi_init () = {
168168
x1 = root_cap_mem;
169169
x2 = root_cap_mem;

src/cheri_step_ext.sail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
/* set misa.X to indicate the presence of a non-standard extension. */
6464

65-
val ext_init : unit -> unit effect {wreg}
65+
val ext_init : unit -> unit
6666
function ext_init () = {
6767
misa->X() = 0b1;
6868
mccsr->d() = 0b1;

src/cheri_sys_exceptions.sail

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function prepare_trap_vector(p : Privilege, c : Mcause) -> xlenbits = {
101101
* just for reads from (integer) CSRs. EPCC is validated on write
102102
* so no legalization is required here.
103103
*/
104-
val get_xret_target : Privilege -> xlenbits effect {escape, rreg}
104+
val get_xret_target : Privilege -> xlenbits
105105
function get_xret_target(p) = {
106106
if p != Machine then internal_error(__FILE__, __LINE__,"unsupported");
107107
let cap : Capability = MEPCC;
@@ -112,7 +112,7 @@ function get_xret_target(p) = {
112112
* Setting mepc via CSRW is not supported. MEPCC should be
113113
* written using CSpecialRW instead.
114114
*/
115-
val set_xret_target : (Privilege, xlenbits) -> xlenbits effect {escape}
115+
val set_xret_target : (Privilege, xlenbits) -> xlenbits
116116
function set_xret_target(p, value) = {
117117
internal_error(__FILE__, __LINE__,"unsupported");
118118
}
@@ -121,7 +121,7 @@ function set_xret_target(p, value) = {
121121
* MEPCC is validated and legalized on write, so this just sets
122122
* up the new PCC and returns new PC.
123123
*/
124-
val prepare_xret_target : (Privilege) -> xlenbits effect {rreg, wreg, escape}
124+
val prepare_xret_target : (Privilege) -> xlenbits
125125
function prepare_xret_target(p) = {
126126
if p != Machine then internal_error(__FILE__, __LINE__,"unsupported");
127127
let epcc : Capability = MEPCC;

0 commit comments

Comments
 (0)