This restriction was introduced in D39016.
Details
- Reviewers
nemanjai steven.zhang jsji joerg - Group Reviewers
Restricted Project - Commits
- rG9e9b0f462146: [PowerPC] Support ppc-asm-full-reg-names for AIX
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp | ||
---|---|---|
599 | bool PPCInstPrinter::showRegistersWithPercentPrefix(const char *RegName) const { if (!FullRegNamesWithPercent || TT.getOS() == Triple::AIX) return false; Could you please double confirm on why we need this check for AIX. |
Historically, the letter prefixes were always stripped out because AIX and Linux assemblers don't accept them. The mentioned patch added the ability to produce prefixes with percent sign and letter which is actually accepted by the Linux assembler (GNU as). It was thought (not known) at the time that AIX does not accept this %<letter> syntax either so the guard for AIX was kept. If you can confirm that the AIX system assembler accepts this syntax, then this is fine.
I suppose it is fine either way since we never took the extra step of making -ppc-reg-with-percent-prefix the default, but if we do choose to make that the default at some point, we can only do so if the AIX assembler also supports it.
Thanks for the historical information. I saw GNU as on AIX supports -mregnames/-mno-regnames and accepts assembly with regname or precent prefixes, but did not found any such option from AIX system assembler. And LLVM MC assembler also doesn't work since AsmParser for XCOFF is not ready yet.
I think we should enable this for lit testing purpose.
The options (-ppc-asm-full-reg-names, -ppc-reg-with-percent-prefix) are not on by default, so it won't cause problem by default.
If user add this option explicitly, then most of the time it should be for debug or lit testing.
We can add one warning on AIX when the option is on, mentioning that showing full reg names won't be accepted by default AIX assembler for now, just for reading or lit purpose.
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-sync-64.ll | ||
---|---|---|
7 | We can probably get rid of the --check-prefix here since the AIX asm should match the Linux asm, won't it? |
Could you please double confirm on why we need this check for AIX.