summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-01-12 20:30:51 +0000
committerDan Gohman <dan433584@gmail.com>2016-01-12 20:30:51 +0000
commit3469ee120c753c60875ddc301ea7921700b8730a (patch)
treed62ed4d25232fdebeaa796089cc96661072f6bcd /llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
parent1307d4c7dfca31586383925bb0e99c144dcc0dac (diff)
downloadbcm5719-llvm-3469ee120c753c60875ddc301ea7921700b8730a.tar.gz
bcm5719-llvm-3469ee120c753c60875ddc301ea7921700b8730a.zip
[WebAssembly] Introduce a WebAssemblyTargetStreamer class.
Refactor .param, .result, .local, and .endfunc, as directives, using the proper MCTargetStreamer mechanism, rather than fake instructions. llvm-svn: 257511
Diffstat (limited to 'llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
index 60e52015242..9a95150cb55 100644
--- a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
@@ -151,12 +151,11 @@ void WebAssemblyInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
WebAssemblyII::VariableOpIsImmediate)) &&
"WebAssemblyII::VariableOpIsImmediate should be set for "
"variable_ops immediate ops");
- if (MII.get(MI->getOpcode()).TSFlags &
- WebAssemblyII::VariableOpImmediateIsType)
- // The immediates represent types.
- O << WebAssembly::TypeToString(MVT::SimpleValueType(Op.getImm()));
- else
- O << Op.getImm();
+ // TODO: (MII.get(MI->getOpcode()).TSFlags &
+ // WebAssemblyII::VariableOpImmediateIsLabel)
+ // can tell us whether this is an immediate referencing a label in the
+ // control flow stack, and it may be nice to pretty-print.
+ O << Op.getImm();
} else if (Op.isFPImm()) {
assert((OpNo < MII.get(MI->getOpcode()).getNumOperands() ||
MII.get(MI->getOpcode()).TSFlags == 0) &&
OpenPOWER on IntegriCloud