diff options
| author | Dan Gohman <dan433584@gmail.com> | 2018-05-31 22:35:25 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2018-05-31 22:35:25 +0000 |
| commit | 91ab25bbe3802c6c67060e3fc5065cb8b7147f0f (patch) | |
| tree | 4b1bedc3c07e40bbfc51537179a4e97fdcfcb416 /llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td | |
| parent | affe450db7bf3a14b35a637d1d4e56452a5e4282 (diff) | |
| download | bcm5719-llvm-91ab25bbe3802c6c67060e3fc5065cb8b7147f0f.tar.gz bcm5719-llvm-91ab25bbe3802c6c67060e3fc5065cb8b7147f0f.zip | |
[WebAssembly] Update to the new names for the memory intrinsics.
The WebAssembly committee has decided on the names `memory.size` and
`memory.grow` for the memory intrinsics, so update the LLVM intrinsics to
follow those names, keeping both sets of old names in place for
compatibility.
llvm-svn: 333708
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td index 9ef4083cda6..70abc058118 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td @@ -444,6 +444,10 @@ def : StorePatExternSymOffOnly<i64, truncstorei32, STORE32_I64>; let Defs = [ARGUMENTS] in { // Current memory size. +def MEMORY_SIZE_I32 : I<(outs I32:$dst), (ins i32imm:$flags), + [(set I32:$dst, (int_wasm_memory_size (i32 imm:$flags)))], + "memory.size\t$dst, $flags", 0x3f>, + Requires<[HasAddr32]>; def MEM_SIZE_I32 : I<(outs I32:$dst), (ins i32imm:$flags), [(set I32:$dst, (int_wasm_mem_size (i32 imm:$flags)))], "mem.size\t$dst, $flags", 0x3f>, @@ -454,6 +458,11 @@ def CURRENT_MEMORY_I32 : I<(outs I32:$dst), (ins i32imm:$flags), Requires<[HasAddr32]>; // Grow memory. +def MEMORY_GROW_I32 : I<(outs I32:$dst), (ins i32imm:$flags, I32:$delta), + [(set I32:$dst, + (int_wasm_memory_grow (i32 imm:$flags), I32:$delta))], + "memory.grow\t$dst, $flags, $delta", 0x3f>, + Requires<[HasAddr32]>; def MEM_GROW_I32 : I<(outs I32:$dst), (ins i32imm:$flags, I32:$delta), [(set I32:$dst, (int_wasm_mem_grow (i32 imm:$flags), I32:$delta))], |

