summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-10-24 20:32:04 +0000
committerDan Gohman <dan433584@gmail.com>2016-10-24 20:32:04 +0000
commit4becc58587a202f815d7eec220255ce29cf6d326 (patch)
tree6c50098283c2ce5d018968b164dbe84522d36529
parent4631be74027bf2fcaea44c3a30758b2fdcacf6c8 (diff)
downloadbcm5719-llvm-4becc58587a202f815d7eec220255ce29cf6d326.tar.gz
bcm5719-llvm-4becc58587a202f815d7eec220255ce29cf6d326.zip
[WebAssembly] Define the `end` opcode value.
CFGStackify differentiates between END_LOOP and END_BLOCK, but wasm itself doesn't. For now, just use the same opcode for both. llvm-svn: 285016
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
index 0252aab794d..7ff5bbdcd48 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
@@ -63,8 +63,10 @@ def BR_TABLE_I64 : I<(outs), (ins I64:$index, variable_ops),
let Uses = [VALUE_STACK], Defs = [VALUE_STACK] in {
def BLOCK : I<(outs), (ins Signature:$sig), [], "block \t$sig", 0x02>;
def LOOP : I<(outs), (ins Signature:$sig), [], "loop \t$sig", 0x03>;
-def END_BLOCK : I<(outs), (ins), [], "end_block">;
-def END_LOOP : I<(outs), (ins), [], "end_loop">;
+
+// END_BLOCK and END_LOOP are represented with the same opcode in wasm.
+def END_BLOCK : I<(outs), (ins), [], "end_block", 0x0f>;
+def END_LOOP : I<(outs), (ins), [], "end_loop", 0x0f>;
} // Uses = [VALUE_STACK], Defs = [VALUE_STACK]
multiclass RETURN<WebAssemblyRegClass vt> {
OpenPOWER on IntegriCloud