[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 Nov 10 11:15:40 PST 2017
    
    
  
alexandreyy marked 3 inline comments as done.
alexandreyy added inline comments.
================
Comment at: lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp:456
 /// register name so that only the number is left.  Used by for linux asm.
-static const char *stripRegisterPrefix(const char *RegName, unsigned RegNum,
-                                       unsigned RegEncoding) {
+const char *PPCInstPrinter::stripRegisterPrefix(const char *RegName) {
+  switch (RegName[0]) {
----------------
echristo wrote:
> Seems to be no reason to make it a member function?
Removed from class.
================
Comment at: lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp:511
+
+/// showRegistersWithPercentPrefix - Check if register prefix can be removed.
+bool PPCInstPrinter::showRegistersWithoutPrefix(const char *RegName) {
----------------
echristo wrote:
> Having this not be the direct inverse of the above is weird. Perhaps redo some of that logic?
Better with that logic.
But it does not change the output printed.
The percent is optional, so it is inserted if the flag FullRegNamesWithPercent is enabled.
================
Comment at: lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h:23
 class PPCInstPrinter : public MCInstPrinter {
-  bool IsDarwin;
+  Triple TripleInfo;
+private:
----------------
echristo wrote:
> "TT" is a standard Triple name.
Changed to TT
https://reviews.llvm.org/D39016
    
    
More information about the llvm-commits
mailing list