From f50d964bdb0674db3e7f18d06a2d1964e0dbd731 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 25 Oct 2016 16:55:52 +0000 Subject: [WebAssembly] Add immediate fields to call_indirect and memory operators. call_indirect, grow_memory, and current_memory now have immediate operands in the 0xd binary encoding. llvm-svn: 285085 --- llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td') diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td index f4906e9fca2..41bfcbc9e0e 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td @@ -35,7 +35,8 @@ multiclass CALL { [(set vt:$dst, (WebAssemblycall1 I32:$callee))], "PSEUDO CALL INDIRECT\t$callee">; } // isCodeGenOnly = 1 - def CALL_INDIRECT_#vt : I<(outs vt:$dst), (ins variable_ops), + + def CALL_INDIRECT_#vt : I<(outs vt:$dst), (ins i32imm:$flags, variable_ops), [], !strconcat(prefix, "call_indirect\t$dst"), 0x11>; @@ -54,8 +55,9 @@ multiclass SIMD_CALL { (WebAssemblycall1 I32:$callee))], "PSEUDO CALL INDIRECT\t$callee">; } // isCodeGenOnly = 1 + def CALL_INDIRECT_#vt : SIMD_I<(outs V128:$dst), - (ins variable_ops), + (ins i32imm:$flags, variable_ops), [], !strconcat(prefix, "call_indirect\t$dst"), 0x11>; @@ -79,7 +81,8 @@ let Uses = [SP32, SP64], isCall = 1 in { [(WebAssemblycall0 I32:$callee)], "PSEUDO CALL INDIRECT\t$callee">; } // isCodeGenOnly = 1 - def CALL_INDIRECT_VOID : I<(outs), (ins variable_ops), + + def CALL_INDIRECT_VOID : I<(outs), (ins i32imm:$flags, variable_ops), [], "call_indirect\t", 0x11>; } // Uses = [SP32,SP64], isCall = 1 -- cgit v1.2.3