llvm.org GIT mirror llvm / 7bc85db
[WebAssembly] Remove old intrinsics This removes the old grow_memory and mem.grow-style intrinsics, leaving just the memory.grow-style intrinsics. Differential Revision: https://reviews.llvm.org/D56645 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351084 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 1 year, 2 months ago
2 changed file(s) with 0 addition(s) and 41 deletion(s). Raw diff Collapse all Expand all
2222 def int_wasm_memory_grow : Intrinsic<[llvm_anyint_ty],
2323 [llvm_i32_ty, LLVMMatchType<0>],
2424 []>;
25
26 // These are the old names.
27 def int_wasm_mem_size : Intrinsic<[llvm_anyint_ty],
28 [llvm_i32_ty],
29 [IntrReadMem]>;
30 def int_wasm_mem_grow : Intrinsic<[llvm_anyint_ty],
31 [llvm_i32_ty, LLVMMatchType<0>],
32 []>;
33
34 // These are the old old names. They also lack the immediate field.
35 def int_wasm_current_memory : Intrinsic<[llvm_anyint_ty], [], [IntrReadMem]>;
36 def int_wasm_grow_memory : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], []>;
3725
3826 //===----------------------------------------------------------------------===//
3927 // Saturating float-to-int conversions
435435 "memory.size\t$dst, $flags", "memory.size\t$flags",
436436 0x3f>,
437437 Requires<[HasAddr32]>;
438 defm MEM_SIZE_I32 : I<(outs I32:$dst), (ins i32imm:$flags),
439 (outs), (ins i32imm:$flags),
440 [(set I32:$dst, (int_wasm_mem_size (i32 imm:$flags)))],
441 "mem.size\t$dst, $flags", "mem.size\t$flags", 0x3f>,
442 Requires<[HasAddr32]>;
443 defm CURRENT_MEMORY_I32 : I<(outs I32:$dst), (ins i32imm:$flags),
444 (outs), (ins i32imm:$flags),
445 [],
446 "current_memory\t$dst",
447 "current_memory\t$flags", 0x3f>,
448 Requires<[HasAddr32]>;
449438
450439 // Grow memory.
451440 defm MEMORY_GROW_I32 : I<(outs I32:$dst), (ins i32imm:$flags, I32:$delta),
456445 "memory.grow\t$dst, $flags, $delta",
457446 "memory.grow\t$flags", 0x40>,
458447 Requires<[HasAddr32]>;
459 defm MEM_GROW_I32 : I<(outs I32:$dst), (ins i32imm:$flags, I32:$delta),
460 (outs), (ins i32imm:$flags),
461 [(set I32:$dst,
462 (int_wasm_mem_grow (i32 imm:$flags), I32:$delta))],
463 "mem.grow\t$dst, $flags, $delta", "mem.grow\t$flags",
464 0x40>,
465 Requires<[HasAddr32]>;
466 defm GROW_MEMORY_I32 : I<(outs I32:$dst), (ins i32imm:$flags, I32:$delta),
467 (outs), (ins i32imm:$flags),
468 [],
469 "grow_memory\t$dst, $delta", "grow_memory\t$flags",
470 0x40>,
471 Requires<[HasAddr32]>;
472
473 def : Pat<(int_wasm_current_memory),
474 (CURRENT_MEMORY_I32 0)>;
475 def : Pat<(int_wasm_grow_memory I32:$delta),
476 (GROW_MEMORY_I32 0, $delta)>;