[PATCH] D39016: Add Percent Symbol In PPC Registers for Linux

Alexandre Yukio Yamashita via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 12:18:08 PDT 2017


alexandreyy added inline comments.


================
Comment at: lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp:534
+    if (!TripleInfo.isOSDarwin()) {
+        if (showRegistersWithPercentPrefix(RegName)) {
+            // Print register with percent symbol and prefix.
----------------
joerg wrote:
> I said make it a member function because the knowledge that Darwin doesn't get the percent should be part of it, not external...
If the OS is Darwin, the register name can't be stripped too.
So, We need to check the OS in the external function printOperand.

Or I can not strip the register prefix in stripRegisterPrefix if the OS is Darwin.

What do you think it is better?


https://reviews.llvm.org/D39016





More information about the llvm-commits mailing list