projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[WebAssembly] Suffix output operands with '='.
[oota-llvm.git]
/
lib
/
Target
/
WebAssembly
/
InstPrinter
/
WebAssemblyInstPrinter.cpp
diff --git
a/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
b/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
index a53a7cd2ed6ec6bf5eab2f4a2a38ab082e9074ab..d5ffcbb411a9399e24f436df7f6aca8a20c88cab 100644
(file)
--- a/
lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
+++ b/
lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
@@
-90,6
+90,9
@@
void WebAssemblyInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
O << "$push" << (WAReg & INT32_MAX);
else
O << "$discard";
+ // Add a '=' suffix if this is a def.
+ if (OpNo < MII.get(MI->getOpcode()).getNumDefs())
+ O << '=';
} else if (Op.isImm()) {
switch (MI->getOpcode()) {
case WebAssembly::PARAM: