[llvm] 1a1dbea - [PowerPC] The VK_PLT symbolref modifier is only used on 32-bit ELF. [NFC]
Sean Fertile via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 11:08:00 PST 2020
Author: Sean Fertile
Date: 2020-01-09T14:07:07-05:00
New Revision: 1a1dbea24df51e441f3517abb8e251df0029dad7
URL: https://github.com/llvm/llvm-project/commit/1a1dbea24df51e441f3517abb8e251df0029dad7
DIFF: https://github.com/llvm/llvm-project/commit/1a1dbea24df51e441f3517abb8e251df0029dad7.diff
LOG: [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.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 40e7f884ddcd..79d8660a3225 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -508,9 +508,9 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
(!Subtarget->isPPC64() && MI->getOperand(1).getReg() == PPC::R3)) &&
"GETtls[ld]ADDR[32] must read GPR3");
- if (!Subtarget->isPPC64() && !Subtarget->isDarwin() &&
- isPositionIndependent())
+ if (Subtarget->is32BitELFABI() && isPositionIndependent())
Kind = MCSymbolRefExpr::VK_PLT;
+
const MCExpr *TlsRef =
MCSymbolRefExpr::create(TlsGetAddr, Kind, OutContext);
More information about the llvm-commits
mailing list