[PATCH] D11776: WebAssembly: textual emission uses expected opcode names

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 13:31:58 PDT 2015


sunfish accepted this revision.
This revision is now accepted and ready to land.

================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:85
@@ +84,3 @@
+  for (; N[Pos] != '\0' && N[Pos] != '_'; ++Pos)
+    N[Pos] = std::tolower(N[Pos]);
+  return SmallString<32>(&N[0], &N[Pos]);
----------------
Please avoid std::tolower since it has locale-specific behavior, and compiler output should not be locale-specific.

================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:111
@@ -98,3 +110,3 @@
   case WebAssembly::ARGUMENT_Float64:
-    OS << "argument " << MI->getOperand(1).getImm();
+    OS << Name(TII, MI) << ' ' << MI->getOperand(1).getImm();
     PrintOperands = false;
----------------
We should really just teach the generic operand printing code below how to handle immediate operands, and then even the ARGUMENT opcodes can just go through the generic path.


http://reviews.llvm.org/D11776





More information about the llvm-commits mailing list