From c7c044544320c3f5efd60f569cb7e6abfcd849bd Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 14 Dec 2015 22:56:51 +0000 Subject: [WebAssembly] Add type prefixes to call instructions Add return type information to call and call_indirect instructions. This allows them to be disambiguated without knowledge of the callee. Differential Revision: http://reviews.llvm.org/D15484 llvm-svn: 255565 --- llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td index 6ea8cec7397..e9cad01f9df 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td @@ -25,19 +25,19 @@ def ADJCALLSTACKUP : I<(outs), (ins i32imm:$amt), [(WebAssemblycallseq_end timm:$amt, undef)]>; } // isCodeGenOnly = 1 -multiclass CALL { +multiclass CALL { def CALL_#vt : I<(outs vt:$dst), (ins i32imm:$callee, variable_ops), [(set vt:$dst, (WebAssemblycall1 (i32 imm:$callee)))], - "call \t$dst, $callee">; + !strconcat(prefix, "call\t$dst, $callee")>; def CALL_INDIRECT_#vt : I<(outs vt:$dst), (ins I32:$callee, variable_ops), [(set vt:$dst, (WebAssemblycall1 I32:$callee))], - "call_indirect\t$dst, $callee">; + !strconcat(prefix, "call_indirect\t$dst, $callee")>; } let Uses = [SP32, SP64], isCall = 1 in { - defm : CALL; - defm : CALL; - defm : CALL; - defm : CALL; + defm : CALL; + defm : CALL; + defm : CALL; + defm : CALL; def CALL_VOID : I<(outs), (ins i32imm:$callee, variable_ops), [(WebAssemblycall0 (i32 imm:$callee))], -- cgit v1.2.3