Skip to content

Commit

Permalink
[WebAssembly] Add exception and selector intrinsics
Browse files Browse the repository at this point in the history
Summary:
Since wasm EH does not use landingpad instructions, these instructions
provide exception pointer and selector values until we lower them in
WasmEHPrepare.

Reviewers: jgravelle-google

Subscribers: jfb, sbc100, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D44930

llvm-svn: 328678
  • Loading branch information
aheejin committed Mar 27, 2018
1 parent bd49ecc commit 37307b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions llvm/include/llvm/IR/IntrinsicsWebAssembly.td
Expand Up @@ -39,4 +39,10 @@ def int_wasm_grow_memory : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], []>;
def int_wasm_throw : Intrinsic<[], [llvm_i32_ty, llvm_ptr_ty],
[Throws, IntrNoReturn]>;
def int_wasm_rethrow : Intrinsic<[], [], [Throws, IntrNoReturn]>;

// Since wasm does not use landingpad instructions, these instructions return
// exception pointer and selector values until we lower them in WasmEHPrepare.
def int_wasm_get_exception : Intrinsic<[llvm_ptr_ty], [], [IntrHasSideEffects]>;
def int_wasm_get_ehselector : Intrinsic<[llvm_i32_ty], [],
[IntrHasSideEffects]>;
}

0 comments on commit 37307b4

Please sign in to comment.