]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Basic/BuiltinsWebAssembly.def
Merge ^/head r337286 through r337585.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Basic / BuiltinsWebAssembly.def
1 // BuiltinsWebAssembly.def - WebAssembly builtin function database -*- C++ -*-//
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 /// This file defines the WebAssembly-specific builtin function database.
12 /// Users of this file must define the BUILTIN macro to make use of this
13 /// information.
14 ///
15 //===----------------------------------------------------------------------===//
16
17 // The format of this database matches clang/Basic/Builtins.def.
18
19 // Query the current memory size, and increase the current memory size.
20 // Note that memory.size is not "c" (readnone) because it must be sequenced
21 // with respect to memory.grow calls.
22 BUILTIN(__builtin_wasm_memory_size, "zIi", "n")
23 BUILTIN(__builtin_wasm_memory_grow, "zIiz", "n")
24
25 // These are the old names.
26 BUILTIN(__builtin_wasm_mem_size, "zIi", "n")
27 BUILTIN(__builtin_wasm_mem_grow, "zIiz", "n")
28
29 // These are the old old names. They also lack the immediate field.
30 BUILTIN(__builtin_wasm_current_memory, "z", "n")
31 BUILTIN(__builtin_wasm_grow_memory, "zz", "n")
32
33 // Exception handling builtins.
34 BUILTIN(__builtin_wasm_throw, "vUiv*", "r")
35 BUILTIN(__builtin_wasm_rethrow, "v", "r")
36
37 #undef BUILTIN