summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2015-11-17 00:20:44 +0000
committerDerek Schuff <dschuff@google.com>2015-11-17 00:20:44 +0000
commit71e8169ea83b41ad61b1434c46ce1d1bd8698b4f (patch)
tree9334b83a4df7423496c3bd4b9c1ddf18b475b04d /llvm/lib/Target
parentb6e8fe3dacb49dfe4c67dbc3cc40d59cd902f519 (diff)
downloadbcm5719-llvm-71e8169ea83b41ad61b1434c46ce1d1bd8698b4f.tar.gz
bcm5719-llvm-71e8169ea83b41ad61b1434c46ce1d1bd8698b4f.zip
[WebAssembly] Fix printing of global operands
This was regressed in r252656 which wasn't quite NFC. Instead of using a custom instruction as before, use a pattern to select CONST_I32 for the global addrs. Differential Revision: http://reviews.llvm.org/D14587 llvm-svn: 253276
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
index c4adeab4c6a..9d595198220 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
@@ -106,10 +106,10 @@ def CONST_F64 : I<(outs F64:$res), (ins f64imm:$imm),
[(set F64:$res, fpimm:$imm)],
"f64.const\t$res, $imm">;
-// Special types of immediates. FIXME: Hard-coded as 32-bit for now.
-def GLOBAL : I<(outs I32:$dst), (ins global:$addr),
- [(set I32:$dst, (WebAssemblywrapper tglobaladdr:$addr))],
- "global\t$dst, $addr">;
+
+def : Pat<(i32 (WebAssemblywrapper tglobaladdr :$dst)),
+ (CONST_I32 tglobaladdr :$dst)>;
+
def JUMP_TABLE : I<(outs I32:$dst), (ins tjumptable_op:$addr),
[(set I32:$dst, (WebAssemblywrapper tjumptable:$addr))],
"jump_table\t$dst, $addr">;
OpenPOWER on IntegriCloud