Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
652 | As you mentioned before, should we assert Darwin target is invalid for this toc-related pseudo? Something like: assert (!isDarwin && "TOC is an ELF/XCOFF construct"); | |
674 | You seems miss a comment here , which matches the later "Otherwise" on line 684
| |
695 | Should we be more specific?
| |
llvm/test/CodeGen/PowerPC/lower-globaladdr32-aix-asm.ll | ||
4 | Personally, I prefer keep the testcase as minimal as possible, so maybe we can remove some attributes like: |
- Added an assertion expressing the platform must not be Darwin.
- Added missing comment
- Fixed assertion message to be more specific
- Cleaned up the test.
Just a minor nit:
clean up "local_unnamed_addr" in testcase? or even "dso_local"?
llvm/test/CodeGen/PowerPC/lower-globaladdr32-aix-asm.ll | ||
---|---|---|
8 | Clean up this "local_unnamed_addr" as well? |
Done, and thanks for the review.
llvm/test/CodeGen/PowerPC/lower-globaladdr32-aix-asm.ll | ||
---|---|---|
8 | I got sloppy and missed this one. I've cleaned up in the final commit. |
llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
696 ↗ | (On Diff #221563) | I would prefer if we mentioned "label" somewhere in the comment as the term that maps better in the context of AIX. The implicit property is also limited to certain contexts (the Assembler Language Reference describes the condition as use of the label as a displacement in a D-form instruction), and the comment is insufficiently qualified to make that clear. |
llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
696 ↗ | (On Diff #221563) |
Can you expand on that, I'm not sure what semantic difference there is between a local symbol and a local label. I considered them equivalent, but can be wrong.
What about: // AIX uses the local symbol directly for the operand; that the symbol is // accessed toc-relative in a lwz instruction is implicit. |
llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
696 ↗ | (On Diff #221563) | Maybe: "[ ... ] directly as the lwz displacement operand for references into the toc section. The displacement value will be generated relative to the toc-base." As for the difference between a label and a local symbol: A label in the assembly may be used to provide a definition for a symbol, but does not itself form a symbol. When using a reference to a label that is not a symbol, the generated relocation should refer to the symbol table entry of the csect. When using a reference to a label that is a symbol, the generated relocation refers to the symbol table entry of the symbol. For toc entries, the csect is the entry itself, so a non-symbol label to the start of the entry would act like the entry symbol/csect. |
As you mentioned before, should we assert Darwin target is invalid for this toc-related pseudo? Something like: