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

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 13:05:35 PDT 2020


jasonliu added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:595
+    return MCBinaryExpr::createAdd(
+        Expr, MCConstantExpr::create(-Adjustment, OutContext), OutContext);
+  };
----------------
hubert.reinterpretcast wrote:
> How would this relate to `XCOFFObjectWriter::recordRelocation`?
> 
> I notice that there's a line there:
> ```
> FixedValue = SectionMap[SymASec]->Address - TOCCsects.front().Address;
> ```
> 
> Does the new expression formed here mean that we should account for it through `Target.getConstant()`?
>From the testing I have done, there seems to be no particular action need to be taken there (except removing that report_fatal_error in there), as the value we put into the instruction could already wrap around naturally when it goes out of the range.


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

https://reviews.llvm.org/D86879



More information about the llvm-commits mailing list