diff options
| author | Dan Gohman <dan433584@gmail.com> | 2015-10-02 19:21:15 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2015-10-02 19:21:15 +0000 |
| commit | 72f1692a2cc786dc750af6020d841c065de8876d (patch) | |
| tree | 11583d2f3cf28cf1bf3c2fa5922b50a963e285a5 /llvm/lib/Target/WebAssembly | |
| parent | d092a068baadcbfb1da8db6d7673f02a7d817a51 (diff) | |
| download | bcm5719-llvm-72f1692a2cc786dc750af6020d841c065de8876d.tar.gz bcm5719-llvm-72f1692a2cc786dc750af6020d841c065de8876d.zip | |
[WebAssembly] Add a memory_size intrinsic.
llvm-svn: 249171
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td index 84b8847f2a1..410fd47d370 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td @@ -98,3 +98,11 @@ def page_size_I32 : I<(outs I32:$dst), (ins), def page_size_I64 : I<(outs I64:$dst), (ins), [(set I64:$dst, (int_wasm_page_size))]>, Requires<[HasAddr64]>; + +// Memory size. +def memory_size_I32 : I<(outs I32:$dst), (ins), + [(set I32:$dst, (int_wasm_memory_size))]>, + Requires<[HasAddr32]>; +def memory_size_I64 : I<(outs I64:$dst), (ins), + [(set I64:$dst, (int_wasm_memory_size))]>, + Requires<[HasAddr64]>; |

