[PATCH] D86879: [XCOFF][AIX] Handle TOC entries that could not be reached by positive range in small code model

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 16:30:51 PDT 2020


hubert.reinterpretcast accepted this revision.
hubert.reinterpretcast added a comment.
This revision is now accepted and ready to land.

LGTM with minor comments.



================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:433
            Type == XCOFF::RelocationType::R_TOCL) {
     // The FixedValue should be the TC entry offset from TOC-base.
+    const int64_t TOCEntryOffset = SectionMap[SymASec]->Address -
----------------
Update the comment to match the code change.


================
Comment at: llvm/test/CodeGen/PowerPC/aix-overflow-toc.py:64
+# DIS32:   18004: 80 62 c0 00   lwz 3, -16384(2)
+# DIS32:       00018006:  R_TOC  (idx: 49166) a12288[TC]
+# DIS32:   1800c: 80 62 c0 04   lwz 3, -16380(2)
----------------
Minor nit: Indentation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86879/new/

https://reviews.llvm.org/D86879



More information about the llvm-commits mailing list