Skip to content

Commit

Permalink
Remove no-op PKRU assert on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
rinon committed Oct 11, 2024
1 parent cfc5e20 commit 6378535
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/rewriter/GenCallAsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,9 @@ std::string emit_asm_wrapper(AbiSignature &sig,

emit_prologue(aw, caller_pkey, target_pkey, arch);

add_raw_line(aw, llvm::formatv("ASSERT_PKRU({0:x8}) \"\\n\"", ~((0b11 << (2 * caller_pkey)) | 0b11)));
if (arch == Arch::X86) {
add_raw_line(aw, llvm::formatv("ASSERT_PKRU({0:x8}) \"\\n\"", ~((0b11 << (2 * caller_pkey)) | 0b11)));
}

if (arch == Arch::X86) {
x86_emit_intermediate_pkru(aw, caller_pkey, target_pkey, "rcx", "rdx");
Expand Down

0 comments on commit 6378535

Please sign in to comment.