[llvm-branch-commits] [llvm] [PAC][CodeGen][ELF][AArch64] Support signed GOT with tiny code model (PR #113812)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Oct 30 13:57:58 PDT 2024
================
@@ -2277,28 +2277,40 @@ void AArch64AsmPrinter::LowerLOADgotAUTH(const MachineInstr &MI) {
const MachineOperand &GAMO = MI.getOperand(1);
assert(GAMO.getOffset() == 0);
- MachineOperand GAHiOp(GAMO);
- MachineOperand GALoOp(GAMO);
- GAHiOp.addTargetFlag(AArch64II::MO_PAGE);
- GALoOp.addTargetFlag(AArch64II::MO_PAGEOFF | AArch64II::MO_NC);
+ if (MI.getParent()->getParent()->getTarget().getCodeModel() ==
+ CodeModel::Tiny) {
----------------
ilovepi wrote:
```suggestion
if (MI.getMF()->getTarget().getCodeModel() == CodeModel::Tiny) {
```
Not sure if there's an easier way to get to the target from MI off the top of my head, but you can get the MachineFunction w/o going through `getParent`
https://github.com/llvm/llvm-project/pull/113812
More information about the llvm-branch-commits
mailing list