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

Alexandre Yukio Yamashita via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 09:45:57 PDT 2017


alexandreyy added a comment.

In https://reviews.llvm.org/D39016#904944, @nemanjai wrote:

> If what we want is to name the registers with the percent sign prefix on all non-AIX, non-Darwin systems, why not just change the definitions in the .td files to include the prefix? That way you don't have to worry about this kind of hacky/leaky code to prepend the symbol to the register names. And on AIX/Darwin, we just strip the full prefix (percent symbol and letter). Considering that it is questionable whether LLVM will ever have full support on AIX and that Darwin support is likely to be pulled soon, this seems like the best choice.
>
> Of course, we'd then need to decide how we want to print the CR registers (i.e. if we want to have the ability to print them the way binutils tools print them - `4*cr4+gt`, etc.)


The prefixes are already being printed if they are not stripped in PPCInstPrinter.cpp.
And the default can be changed to include the percent without a option.
However, all the test files should be changed to consider different syntaxes for each OS.


https://reviews.llvm.org/D39016





More information about the llvm-commits mailing list