Skip to content

Commit 1a1dbea

Browse files
committed
[PowerPC] The VK_PLT symbolref modifier is only used on 32-bit ELF. [NFC]
Fix a conditional that guarded code for execution only on 32-bit ELF by checking that the Subtarget was not 64-bit and not-Darwin. By adding a new target ABI (AIX), the condition is no longer correct. This code is dead for AIX, due to a 'report_fatal_error' for thread local storage usage earlier in the pipeline, but needs to be modifed as part of Darwins removal from the PowerPC backend.
1 parent 183b5d3 commit 1a1dbea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,9 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
508508
(!Subtarget->isPPC64() && MI->getOperand(1).getReg() == PPC::R3)) &&
509509
"GETtls[ld]ADDR[32] must read GPR3");
510510

511-
if (!Subtarget->isPPC64() && !Subtarget->isDarwin() &&
512-
isPositionIndependent())
511+
if (Subtarget->is32BitELFABI() && isPositionIndependent())
513512
Kind = MCSymbolRefExpr::VK_PLT;
513+
514514
const MCExpr *TlsRef =
515515
MCSymbolRefExpr::create(TlsGetAddr, Kind, OutContext);
516516

0 commit comments

Comments
 (0)