This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][AIX] Fix printing of program counter for AIX assembly.
ClosedPublic

Authored by sfertile on Mar 4 2020, 10:27 AM.

Details

Diff Detail

Event Timeline

sfertile created this revision.Mar 4 2020, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2020, 10:27 AM
hubert.reinterpretcast added inline comments.
llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
422

Suggestion:

[ ... ] This is used by the branch selection pass to print, for example, `.+8` (for ELF) or `$+8` (on AIX) to express an eight byte displacement from the program counter.
llvm/test/CodeGen/PowerPC/aix-print-pc.mir
2

Is this a case where we can (or should) test for 64-bit now?

sfertile updated this revision to Diff 248293.Mar 4 2020, 1:03 PM

Reworded comment and added 64-bit RUN step to the test.

sfertile marked 2 inline comments as done.Mar 4 2020, 1:04 PM
sfertile added inline comments.
llvm/test/CodeGen/PowerPC/aix-print-pc.mir
2

Sure, we have enough 64-bit assembly support. I've added a 64-bit runstep.

jasonliu accepted this revision.Mar 9 2020, 8:52 AM

LGTM.

This revision is now accepted and ready to land.Mar 9 2020, 8:52 AM
This revision was automatically updated to reflect the committed changes.

Noticed that what we get from MAI.getDollarIsPC() on AIX isn't consistent with this patch. We should probably update that property as well and emit consistently according to that if we can (note though PPC ELF currently sets it (?)).