Skip to content

Commit

Permalink
Remove incorrect TCG_CALL_NO_WG flags on helpers that decompress caps
Browse files Browse the repository at this point in the history
  • Loading branch information
LawrenceEsswood authored and arichardson committed Jul 15, 2021
1 parent 9548812 commit 0898c8f
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions target/cheri-common/cheri-helper-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
* target/mips/op_helper_cheri.c or target/riscv/op_helper_cheri.c.
*/

// Lazy capreg state is a global, and so anything that might
// cause a decompression can write global.

// PCC bounds checks:
DEF_HELPER_1(raise_exception_pcc_perms, noreturn, env)
DEF_HELPER_3(raise_exception_pcc_bounds, noreturn, env, tl, i32)
Expand All @@ -52,14 +55,14 @@ DEF_HELPER_3(raise_exception_ddc_bounds, noreturn, env, tl, i32)

// Two-operand capability inspection
DEF_HELPER_FLAGS_2(cgetaddr, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetbase, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetflags, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetlen, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetperm, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetoffset, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetsealed, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgettag, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgettype, TCG_CALL_NO_WG, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetbase, 0, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetflags, 0, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetlen, 0, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetperm, 0, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetoffset, 0, tl, env, i32)
DEF_HELPER_FLAGS_2(cgetsealed, 0, tl, env, i32)
DEF_HELPER_FLAGS_2(cgettag, 0, tl, env, i32)
DEF_HELPER_FLAGS_2(cgettype, 0, tl, env, i32)

// Two operands (cap cap)
DEF_HELPER_3(ccleartag, void, env, i32, i32)
Expand Down Expand Up @@ -98,10 +101,10 @@ DEF_HELPER_4(csetflags, void, env, i32, i32, tl)
DEF_HELPER_4(csetoffset, void, env, i32, i32, tl)

// Three operands (int cap cap)
DEF_HELPER_FLAGS_3(csub, TCG_CALL_NO_WG, tl, env, i32, i32)
DEF_HELPER_FLAGS_3(ctestsubset, TCG_CALL_NO_WG, tl, env, i32, i32)
DEF_HELPER_FLAGS_3(cseqx, TCG_CALL_NO_WG, tl, env, i32, i32)
DEF_HELPER_FLAGS_3(ctoptr, TCG_CALL_NO_WG, tl, env, i32, i32)
DEF_HELPER_FLAGS_3(csub, 0, tl, env, i32, i32)
DEF_HELPER_FLAGS_3(ctestsubset, 0, tl, env, i32, i32)
DEF_HELPER_FLAGS_3(cseqx, 0, tl, env, i32, i32)
DEF_HELPER_FLAGS_3(ctoptr, 0, tl, env, i32, i32)

// Loads+Stores
DEF_HELPER_4(cap_load_check, cap_checked_ptr, env, i32, tl, i32)
Expand Down

0 comments on commit 0898c8f

Please sign in to comment.