Home | History | Annotate | Download | only in IR
      1 //===- IntrinsicsWebAssembly.td - Defines wasm intrinsics --*- tablegen -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 ///
     10 /// \file
     11 /// \brief This file defines all of the WebAssembly-specific intrinsics.
     12 ///
     13 //===----------------------------------------------------------------------===//
     14 
     15 let TargetPrefix = "wasm" in {  // All intrinsics start with "llvm.wasm.".
     16 
     17 // Note that current_memory is not IntrNoMem because it must be sequenced with
     18 // respect to grow_memory calls.
     19 def int_wasm_current_memory : Intrinsic<[llvm_anyint_ty], [], [IntrReadMem]>;
     20 def int_wasm_grow_memory : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], []>;
     21 
     22 // Exception handling intrinsics
     23 def int_wasm_throw: Intrinsic<[], [llvm_i32_ty, llvm_ptr_ty], [Throws]>;
     24 def int_wasm_rethrow: Intrinsic<[], [], [Throws]>;
     25 
     26 }
     27