Skip to content

Commit

Permalink
remove modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-fink committed May 8, 2024
1 parent a161d1c commit 2dd9043
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions llvm/include/llvm/IR/IntrinsicsWebAssembly.td
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def int_wasm_segment_set_tag :
DefaultAttrsIntrinsic<[], [llvm_ptr_ty, llvm_ptr_ty, llvm_i64_ty], []>;

def int_wasm_pointer_sign :
DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i64_ty], []>;
DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_ptr_ty], []>;
def int_wasm_pointer_auth :
DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i64_ty], []>;
DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_ptr_ty], []>;
def int_wasm_pointer_strip :
DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_ptr_ty], []>;

Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ def : Pat<(int_wasm_segment_set_tag (AddrOps64 offset64_op:$offset, I64:$addr),
(!cast<NI>(SEGMENT_SET_TAG_A64) 0, offset64_op:$offset, I64:$addr, I64:$sp, I64:$size)>;
def : Pat<(int_wasm_segment_free (AddrOps64 offset64_op:$offset, I64:$addr), I64:$size),
(!cast<NI>(SEGMENT_FREE_A64) 0, offset64_op:$offset, I64:$addr, I64:$size)>;
def : Pat<(int_wasm_pointer_sign I64:$ptr, I64:$mod),
(!cast<NI>(POINTER_SIGN_A64) I64:$ptr, I64:$mod)>;
def : Pat<(int_wasm_pointer_auth I64:$ptr, I64:$mod),
(!cast<NI>(POINTER_AUTH_A64) I64:$ptr, I64:$mod)>;
def : Pat<(int_wasm_pointer_sign I64:$ptr),
(!cast<NI>(POINTER_SIGN_A64) I64:$ptr)>;
def : Pat<(int_wasm_pointer_auth I64:$ptr),
(!cast<NI>(POINTER_AUTH_A64) I64:$ptr)>;
def : Pat<(int_wasm_pointer_strip I64:$ptr),
(!cast<NI>(POINTER_STRIP_A64) I64:$ptr)>;

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/WebAssembly/WebAssemblyPointerAuth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class WebAssemblyPointerAuth : public ModulePass,

auto *Value = IRB.CreateLoad(IRB.getPtrTy(), GEP);
auto *SignedValue =
IRB.CreateCall(PointerSignIntr, {Value, IRB.getInt64(0)});
IRB.CreateCall(PointerSignIntr, {Value});
IRB.CreateStore(SignedValue, GEP);
}
}
Expand Down Expand Up @@ -235,7 +235,7 @@ Value *WebAssemblyPointerAuth::instrumentValue(Value *Val, IRBuilder<> &IRB) {
}
auto *PointerSignIntr = Intrinsic::getDeclaration(
IRB.GetInsertBlock()->getModule(), Intrinsic::wasm_pointer_sign);
return IRB.CreateCall(PointerSignIntr, {Fn, IRB.getInt64(0)});
return IRB.CreateCall(PointerSignIntr, {Fn});
}

} // namespace
Expand Down

0 comments on commit 2dd9043

Please sign in to comment.