[PATCH] D39016: Add Percent Symbol In PPC Registers for Linux
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 22:50:15 PST 2017
echristo requested changes to this revision.
echristo added a comment.
This revision now requires changes to proceed.
I really appreciate you doing this work. This has been something I've wanted for some time :)
I've added a few things to this. Should also have a testcase as well.
Thanks!
-eric
================
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]) {
----------------
Seems to be no reason to make it a member function?
================
Comment at: lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp:472
+/// Get full register name.
+const char *PPCInstPrinter::getFullRegisterName(const char *RegName,
+ unsigned RegNum, unsigned RegEncoding) {
----------------
Ditto.
================
Comment at: lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp:511
+
+/// showRegistersWithPercentPrefix - Check if register prefix can be removed.
+bool PPCInstPrinter::showRegistersWithoutPrefix(const char *RegName) {
----------------
Having this not be the direct inverse of the above is weird. Perhaps redo some of that logic?
================
Comment at: lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h:23
class PPCInstPrinter : public MCInstPrinter {
- bool IsDarwin;
+ Triple TripleInfo;
+private:
----------------
"TT" is a standard Triple name.
https://reviews.llvm.org/D39016
More information about the llvm-commits
mailing list