summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-12-14 22:56:51 +0000
committerDan Gohman <dan433584@gmail.com>2015-12-14 22:56:51 +0000
commitc7c044544320c3f5efd60f569cb7e6abfcd849bd (patch)
treeeaebaf13087eb0ba3ced7341c391dd43a4d7267f /llvm/lib
parent8fe7e86bf52236a98e20874f96e61ae222945cec (diff)
downloadbcm5719-llvm-c7c044544320c3f5efd60f569cb7e6abfcd849bd.tar.gz
bcm5719-llvm-c7c044544320c3f5efd60f569cb7e6abfcd849bd.zip
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td14
1 files changed, 7 insertions, 7 deletions
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<WebAssemblyRegClass vt> {
+multiclass CALL<WebAssemblyRegClass vt, string prefix> {
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<I32>;
- defm : CALL<I64>;
- defm : CALL<F32>;
- defm : CALL<F64>;
+ defm : CALL<I32, "i32.">;
+ defm : CALL<I64, "i64.">;
+ defm : CALL<F32, "f32.">;
+ defm : CALL<F64, "f64.">;
def CALL_VOID : I<(outs), (ins i32imm:$callee, variable_ops),
[(WebAssemblycall0 (i32 imm:$callee))],
OpenPOWER on IntegriCloud