summaryrefslogtreecommitdiff
path: root/include/clang/Basic/BuiltinsWebAssembly.def
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Basic/BuiltinsWebAssembly.def')
-rw-r--r--include/clang/Basic/BuiltinsWebAssembly.def15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/clang/Basic/BuiltinsWebAssembly.def b/include/clang/Basic/BuiltinsWebAssembly.def
index 19318dcebb9ec..b3d877dcedf38 100644
--- a/include/clang/Basic/BuiltinsWebAssembly.def
+++ b/include/clang/Basic/BuiltinsWebAssembly.def
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
///
/// \file
-/// \brief This file defines the WebAssembly-specific builtin function database.
+/// This file defines the WebAssembly-specific builtin function database.
/// Users of this file must define the BUILTIN macro to make use of this
/// information.
///
@@ -16,8 +16,17 @@
// The format of this database matches clang/Basic/Builtins.def.
-// Note that current_memory is not "c" (readnone) because it must be sequenced
-// with respect to grow_memory calls.
+// Query the current memory size, and increase the current memory size.
+// Note that memory.size is not "c" (readnone) because it must be sequenced
+// with respect to memory.grow calls.
+BUILTIN(__builtin_wasm_memory_size, "zIi", "n")
+BUILTIN(__builtin_wasm_memory_grow, "zIiz", "n")
+
+// These are the old names.
+BUILTIN(__builtin_wasm_mem_size, "zIi", "n")
+BUILTIN(__builtin_wasm_mem_grow, "zIiz", "n")
+
+// These are the old old names. They also lack the immediate field.
BUILTIN(__builtin_wasm_current_memory, "z", "n")
BUILTIN(__builtin_wasm_grow_memory, "zz", "n")