summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2015-08-01 04:48:44 +0000
committerJF Bastien <jfb@google.com>2015-08-01 04:48:44 +0000
commit8f9aea08d4c6c4b702bb57227ab00191c02b2847 (patch)
treeb67d315477b1068506189ce81ec20d7fb13d6d17 /llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
parentde4e539aba1ffc00c930a9de6a12a2658df9a1d7 (diff)
downloadbcm5719-llvm-8f9aea08d4c6c4b702bb57227ab00191c02b2847.tar.gz
bcm5719-llvm-8f9aea08d4c6c4b702bb57227ab00191c02b2847.zip
WebAssembly: handle more than int32 argument/return
Summary: Also test 64-bit integers, except shifts for now which are broken because isel dislikes the 32-bit truncate that precedes them. Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11699 llvm-svn: 243822
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
index 6ec345bf37d..3025e24fb84 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
@@ -25,10 +25,15 @@
* switch: switch statement with fallthrough
*/
+multiclass RETURN<WebAssemblyRegClass vt> {
+ def RETURN_#vt : I<(outs), (ins vt:$val), [(WebAssemblyreturn vt:$val)]>;
+}
let hasSideEffects = 1, isReturn = 1, isTerminator = 1, hasCtrlDep = 1,
isBarrier = 1 in {
-//FIXME return more than just int32.
-def RETURN : I<(outs), (ins Int32:$val), [(WebAssemblyreturn Int32:$val)]>;
-def RETURN_VOID : I<(outs), (ins), [(WebAssemblyreturn)]>;
+ defm : RETURN<Int32>;
+ defm : RETURN<Int64>;
+ defm : RETURN<Float32>;
+ defm : RETURN<Float64>;
+ def RETURN_VOID : I<(outs), (ins), [(WebAssemblyreturn)]>;
} // hasSideEffects = 1, isReturn = 1, isTerminator = 1, hasCtrlDep = 1,
// isBarrier = 1
OpenPOWER on IntegriCloud