From b453e16855f347e300f1dc0cd0dfbdd65c27b0d2 Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Fri, 14 Dec 2012 17:02:38 +0000 Subject: This patch improves the 64-bit PowerPC InitialExec TLS support by providing for a wider range of GOT entries that can hold thread-relative offsets. This matches the behavior of GCC, which was not documented in the PPC64 TLS ABI. The ABI will be updated with the new code sequence. Former sequence: ld 9,x@got@tprel(2) add 9,9,x@tls New sequence: addis 9,2,x@got@tprel@ha ld 9,x@got@tprel@l(9) add 9,9,x@tls Note that a linker optimization exists to transform the new sequence into the shorter sequence when appropriate, by replacing the addis with a nop and modifying the base register and relocation type of the ld. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170209 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCExpr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/MC/MCExpr.cpp') diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index cbb8a8583d..1a53934fef 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -217,7 +217,8 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) { case VK_PPC_DTPREL16_LO: return "dtprel@l"; case VK_PPC_TOC16_HA: return "toc@ha"; case VK_PPC_TOC16_LO: return "toc@l"; - case VK_PPC_GOT_TPREL16_DS: return "got@tprel"; + case VK_PPC_GOT_TPREL16_HA: return "got@tprel@ha"; + case VK_PPC_GOT_TPREL16_LO: return "got@tprel@l"; case VK_PPC_TLS: return "tls"; case VK_PPC_GOT_TLSGD16_HA: return "got@tlsgd@ha"; case VK_PPC_GOT_TLSGD16_LO: return "got@tlsgd@l"; -- cgit v1.2.3-18-g5258