[llvm] r184551 - [PowerPC] Support various tls-related modifiers
Ulrich Weigand
ulrich.weigand at de.ibm.com
Fri Jun 21 07:44:15 PDT 2013
Author: uweigand
Date: Fri Jun 21 09:44:15 2013
New Revision: 184551
URL: http://llvm.org/viewvc/llvm-project?rev=184551&view=rev
Log:
[PowerPC] Support various tls-related modifiers
The current code base only supports the minimum set of tls-related
relocations and @modifiers that are necessary to support compiler-
generated code. This patch extends this to the full set defined
in the ABI (and supported by the GNU assembler) for the benefit
of the assembler parser.
Modified:
llvm/trunk/include/llvm/MC/MCExpr.h
llvm/trunk/include/llvm/Object/ELF.h
llvm/trunk/include/llvm/Support/ELF.h
llvm/trunk/lib/MC/MCELFStreamer.cpp
llvm/trunk/lib/MC/MCExpr.cpp
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
llvm/trunk/test/MC/PowerPC/ppc64-fixups.s
Modified: llvm/trunk/include/llvm/MC/MCExpr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCExpr.h?rev=184551&r1=184550&r2=184551&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCExpr.h (original)
+++ llvm/trunk/include/llvm/MC/MCExpr.h Fri Jun 21 09:44:15 2013
@@ -183,17 +183,39 @@ public:
VK_PPC_TOC_LO, // symbol at toc@l
VK_PPC_TOC_HI, // symbol at toc@h
VK_PPC_TOC_HA, // symbol at toc@ha
+ VK_PPC_TPREL, // symbol at tprel
VK_PPC_TPREL_LO, // symbol at tprel@l
+ VK_PPC_TPREL_HI, // symbol at tprel@h
VK_PPC_TPREL_HA, // symbol at tprel@ha
+ VK_PPC_TPREL_HIGHER, // symbol at tprel@higher
+ VK_PPC_TPREL_HIGHERA, // symbol at tprel@highera
+ VK_PPC_TPREL_HIGHEST, // symbol at tprel@highest
+ VK_PPC_TPREL_HIGHESTA, // symbol at tprel@highesta
+ VK_PPC_DTPREL, // symbol at dtprel
VK_PPC_DTPREL_LO, // symbol at dtprel@l
+ VK_PPC_DTPREL_HI, // symbol at dtprel@h
VK_PPC_DTPREL_HA, // symbol at dtprel@ha
+ VK_PPC_DTPREL_HIGHER, // symbol at dtprel@higher
+ VK_PPC_DTPREL_HIGHERA, // symbol at dtprel@highera
+ VK_PPC_DTPREL_HIGHEST, // symbol at dtprel@highest
+ VK_PPC_DTPREL_HIGHESTA,// symbol at dtprel@highesta
+ VK_PPC_GOT_TPREL, // symbol at got@tprel
VK_PPC_GOT_TPREL_LO, // symbol at got@tprel at l
+ VK_PPC_GOT_TPREL_HI, // symbol at got@tprel at h
VK_PPC_GOT_TPREL_HA, // symbol at got@tprel at ha
+ VK_PPC_GOT_DTPREL, // symbol at got@dtprel
+ VK_PPC_GOT_DTPREL_LO, // symbol at got@dtprel at l
+ VK_PPC_GOT_DTPREL_HI, // symbol at got@dtprel at h
+ VK_PPC_GOT_DTPREL_HA, // symbol at got@dtprel at ha
VK_PPC_TLS, // symbol at tls
+ VK_PPC_GOT_TLSGD, // symbol at got@tlsgd
VK_PPC_GOT_TLSGD_LO, // symbol at got@tlsgd at l
+ VK_PPC_GOT_TLSGD_HI, // symbol at got@tlsgd at h
VK_PPC_GOT_TLSGD_HA, // symbol at got@tlsgd at ha
VK_PPC_TLSGD, // symbol at tlsgd
+ VK_PPC_GOT_TLSLD, // symbol at got@tlsld
VK_PPC_GOT_TLSLD_LO, // symbol at got@tlsld at l
+ VK_PPC_GOT_TLSLD_HI, // symbol at got@tlsld at h
VK_PPC_GOT_TLSLD_HA, // symbol at got@tlsld at ha
VK_PPC_TLSLD, // symbol at tlsld
Modified: llvm/trunk/include/llvm/Object/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=184551&r1=184550&r2=184551&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Fri Jun 21 09:44:15 2013
@@ -2029,8 +2029,30 @@ StringRef ELFObjectFile<ELFT>::getReloca
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL14_BRTAKEN);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL14_BRNTAKEN);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL32);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TPREL16);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TPREL16_LO);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TPREL16_HI);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TPREL16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPREL16);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPREL16_LO);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPREL16_HI);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPREL16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSGD16);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSGD16_LO);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSGD16_HI);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSGD16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSLD16);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSLD16_LO);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSLD16_HI);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSLD16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_LO_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_HI);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_LO_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_HI);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_HA);
default: break;
}
break;
@@ -2067,16 +2089,42 @@ StringRef ELFObjectFile<ELFT>::getReloca
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TOC16_DS);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TOC16_LO_DS);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TLS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_LO);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_HI);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_LO);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_HI);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TLSGD16);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TLSGD16_LO);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TLSGD16_HI);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TLSGD16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TLSLD16);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TLSLD16_LO);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TLSLD16_HI);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TLSLD16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TPREL16_DS);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TPREL16_LO_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TPREL16_HI);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_TPREL16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_DTPREL16_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_DTPREL16_LO_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_DTPREL16_HI);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_GOT_DTPREL16_HA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_LO_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_HIGHER);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_HIGHERA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_HIGHEST);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TPREL16_HIGHESTA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_LO_DS);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_HIGHER);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_HIGHERA);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_HIGHEST);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_DTPREL16_HIGHESTA);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TLSGD);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_TLSLD);
default: break;
Modified: llvm/trunk/include/llvm/Support/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ELF.h?rev=184551&r1=184550&r2=184551&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ELF.h (original)
+++ llvm/trunk/include/llvm/Support/ELF.h Fri Jun 21 09:44:15 2013
@@ -461,8 +461,30 @@ enum {
R_PPC_REL14_BRTAKEN = 12,
R_PPC_REL14_BRNTAKEN = 13,
R_PPC_REL32 = 26,
+ R_PPC_TPREL16 = 69,
R_PPC_TPREL16_LO = 70,
- R_PPC_TPREL16_HA = 72
+ R_PPC_TPREL16_HI = 71,
+ R_PPC_TPREL16_HA = 72,
+ R_PPC_DTPREL16 = 74,
+ R_PPC_DTPREL16_LO = 75,
+ R_PPC_DTPREL16_HI = 76,
+ R_PPC_DTPREL16_HA = 77,
+ R_PPC_GOT_TLSGD16 = 79,
+ R_PPC_GOT_TLSGD16_LO = 80,
+ R_PPC_GOT_TLSGD16_HI = 81,
+ R_PPC_GOT_TLSGD16_HA = 82,
+ R_PPC_GOT_TLSLD16 = 83,
+ R_PPC_GOT_TLSLD16_LO = 84,
+ R_PPC_GOT_TLSLD16_HI = 85,
+ R_PPC_GOT_TLSLD16_HA = 86,
+ R_PPC_GOT_TPREL16_DS = 87,
+ R_PPC_GOT_TPREL16_LO_DS = 88,
+ R_PPC_GOT_TPREL16_HI = 89,
+ R_PPC_GOT_TPREL16_HA = 90,
+ R_PPC_GOT_DTPREL16_DS = 91,
+ R_PPC_GOT_DTPREL16_LO_DS = 92,
+ R_PPC_GOT_DTPREL16_HI = 93,
+ R_PPC_GOT_DTPREL16_HA = 94
};
// ELF Relocation types for PPC64
@@ -498,16 +520,42 @@ enum {
R_PPC64_TOC16_DS = 63,
R_PPC64_TOC16_LO_DS = 64,
R_PPC64_TLS = 67,
+ R_PPC64_TPREL16 = 69,
R_PPC64_TPREL16_LO = 70,
+ R_PPC64_TPREL16_HI = 71,
R_PPC64_TPREL16_HA = 72,
+ R_PPC64_DTPREL16 = 74,
R_PPC64_DTPREL16_LO = 75,
+ R_PPC64_DTPREL16_HI = 76,
R_PPC64_DTPREL16_HA = 77,
+ R_PPC64_GOT_TLSGD16 = 79,
R_PPC64_GOT_TLSGD16_LO = 80,
+ R_PPC64_GOT_TLSGD16_HI = 81,
R_PPC64_GOT_TLSGD16_HA = 82,
+ R_PPC64_GOT_TLSLD16 = 83,
R_PPC64_GOT_TLSLD16_LO = 84,
+ R_PPC64_GOT_TLSLD16_HI = 85,
R_PPC64_GOT_TLSLD16_HA = 86,
+ R_PPC64_GOT_TPREL16_DS = 87,
R_PPC64_GOT_TPREL16_LO_DS = 88,
+ R_PPC64_GOT_TPREL16_HI = 89,
R_PPC64_GOT_TPREL16_HA = 90,
+ R_PPC64_GOT_DTPREL16_DS = 91,
+ R_PPC64_GOT_DTPREL16_LO_DS = 92,
+ R_PPC64_GOT_DTPREL16_HI = 93,
+ R_PPC64_GOT_DTPREL16_HA = 94,
+ R_PPC64_TPREL16_DS = 95,
+ R_PPC64_TPREL16_LO_DS = 96,
+ R_PPC64_TPREL16_HIGHER = 97,
+ R_PPC64_TPREL16_HIGHERA = 98,
+ R_PPC64_TPREL16_HIGHEST = 99,
+ R_PPC64_TPREL16_HIGHESTA = 100,
+ R_PPC64_DTPREL16_DS = 101,
+ R_PPC64_DTPREL16_LO_DS = 102,
+ R_PPC64_DTPREL16_HIGHER = 103,
+ R_PPC64_DTPREL16_HIGHERA = 104,
+ R_PPC64_DTPREL16_HIGHEST = 105,
+ R_PPC64_DTPREL16_HIGHESTA = 106,
R_PPC64_TLSGD = 107,
R_PPC64_TLSLD = 108
};
Modified: llvm/trunk/lib/MC/MCELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCELFStreamer.cpp?rev=184551&r1=184550&r2=184551&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCELFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCELFStreamer.cpp Fri Jun 21 09:44:15 2013
@@ -363,17 +363,39 @@ void MCELFStreamer::fixSymbolsInTLSFixu
case MCSymbolRefExpr::VK_Mips_GOTTPREL:
case MCSymbolRefExpr::VK_Mips_TPREL_HI:
case MCSymbolRefExpr::VK_Mips_TPREL_LO:
+ case MCSymbolRefExpr::VK_PPC_TPREL:
case MCSymbolRefExpr::VK_PPC_TPREL_LO:
+ case MCSymbolRefExpr::VK_PPC_TPREL_HI:
case MCSymbolRefExpr::VK_PPC_TPREL_HA:
+ case MCSymbolRefExpr::VK_PPC_TPREL_HIGHER:
+ case MCSymbolRefExpr::VK_PPC_TPREL_HIGHERA:
+ case MCSymbolRefExpr::VK_PPC_TPREL_HIGHEST:
+ case MCSymbolRefExpr::VK_PPC_TPREL_HIGHESTA:
+ case MCSymbolRefExpr::VK_PPC_DTPREL:
case MCSymbolRefExpr::VK_PPC_DTPREL_LO:
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HI:
case MCSymbolRefExpr::VK_PPC_DTPREL_HA:
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HIGHER:
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HIGHERA:
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HIGHEST:
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HIGHESTA:
+ case MCSymbolRefExpr::VK_PPC_GOT_TPREL:
case MCSymbolRefExpr::VK_PPC_GOT_TPREL_LO:
+ case MCSymbolRefExpr::VK_PPC_GOT_TPREL_HI:
case MCSymbolRefExpr::VK_PPC_GOT_TPREL_HA:
+ case MCSymbolRefExpr::VK_PPC_GOT_DTPREL:
+ case MCSymbolRefExpr::VK_PPC_GOT_DTPREL_LO:
+ case MCSymbolRefExpr::VK_PPC_GOT_DTPREL_HI:
+ case MCSymbolRefExpr::VK_PPC_GOT_DTPREL_HA:
case MCSymbolRefExpr::VK_PPC_TLS:
+ case MCSymbolRefExpr::VK_PPC_GOT_TLSGD:
case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO:
+ case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_HI:
case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_HA:
case MCSymbolRefExpr::VK_PPC_TLSGD:
+ case MCSymbolRefExpr::VK_PPC_GOT_TLSLD:
case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO:
+ case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_HI:
case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_HA:
case MCSymbolRefExpr::VK_PPC_TLSLD:
break;
Modified: llvm/trunk/lib/MC/MCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=184551&r1=184550&r2=184551&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCExpr.cpp (original)
+++ llvm/trunk/lib/MC/MCExpr.cpp Fri Jun 21 09:44:15 2013
@@ -208,17 +208,39 @@ StringRef MCSymbolRefExpr::getVariantKin
case VK_PPC_TOC_LO: return "toc at l";
case VK_PPC_TOC_HI: return "toc at h";
case VK_PPC_TOC_HA: return "toc at ha";
+ case VK_PPC_TPREL: return "tprel";
case VK_PPC_TPREL_LO: return "tprel at l";
+ case VK_PPC_TPREL_HI: return "tprel at h";
case VK_PPC_TPREL_HA: return "tprel at ha";
+ case VK_PPC_TPREL_HIGHER: return "tprel at higher";
+ case VK_PPC_TPREL_HIGHERA: return "tprel at highera";
+ case VK_PPC_TPREL_HIGHEST: return "tprel at highest";
+ case VK_PPC_TPREL_HIGHESTA: return "tprel at highesta";
+ case VK_PPC_DTPREL: return "dtprel";
case VK_PPC_DTPREL_LO: return "dtprel at l";
+ case VK_PPC_DTPREL_HI: return "dtprel at h";
case VK_PPC_DTPREL_HA: return "dtprel at ha";
+ case VK_PPC_DTPREL_HIGHER: return "dtprel at higher";
+ case VK_PPC_DTPREL_HIGHERA: return "dtprel at highera";
+ case VK_PPC_DTPREL_HIGHEST: return "dtprel at highest";
+ case VK_PPC_DTPREL_HIGHESTA: return "dtprel at highesta";
+ case VK_PPC_GOT_TPREL: return "got at tprel";
case VK_PPC_GOT_TPREL_LO: return "got at tprel@l";
+ case VK_PPC_GOT_TPREL_HI: return "got at tprel@h";
case VK_PPC_GOT_TPREL_HA: return "got at tprel@ha";
+ case VK_PPC_GOT_DTPREL: return "got at dtprel";
+ case VK_PPC_GOT_DTPREL_LO: return "got at dtprel@l";
+ case VK_PPC_GOT_DTPREL_HI: return "got at dtprel@h";
+ case VK_PPC_GOT_DTPREL_HA: return "got at dtprel@ha";
case VK_PPC_TLS: return "tls";
+ case VK_PPC_GOT_TLSGD: return "got at tlsgd";
case VK_PPC_GOT_TLSGD_LO: return "got at tlsgd@l";
+ case VK_PPC_GOT_TLSGD_HI: return "got at tlsgd@h";
case VK_PPC_GOT_TLSGD_HA: return "got at tlsgd@ha";
case VK_PPC_TLSGD: return "tlsgd";
+ case VK_PPC_GOT_TLSLD: return "got at tlsld";
case VK_PPC_GOT_TLSLD_LO: return "got at tlsld@l";
+ case VK_PPC_GOT_TLSLD_HI: return "got at tlsld@h";
case VK_PPC_GOT_TLSLD_HA: return "got at tlsld@ha";
case VK_PPC_TLSLD: return "tlsld";
case VK_Mips_GPREL: return "GPREL";
@@ -311,24 +333,68 @@ MCSymbolRefExpr::getVariantKindForName(S
.Case("toc at ha", VK_PPC_TOC_HA)
.Case("TLS", VK_PPC_TLS)
.Case("tls", VK_PPC_TLS)
+ .Case("TPREL", VK_PPC_TPREL)
+ .Case("tprel", VK_PPC_TPREL)
.Case("TPREL at L", VK_PPC_TPREL_LO)
.Case("tprel at l", VK_PPC_TPREL_LO)
+ .Case("TPREL at H", VK_PPC_TPREL_HI)
+ .Case("tprel at h", VK_PPC_TPREL_HI)
.Case("TPREL at HA", VK_PPC_TPREL_HA)
.Case("tprel at ha", VK_PPC_TPREL_HA)
+ .Case("TPREL at HIGHER", VK_PPC_TPREL_HIGHER)
+ .Case("tprel at higher", VK_PPC_TPREL_HIGHER)
+ .Case("TPREL at HIGHERA", VK_PPC_TPREL_HIGHERA)
+ .Case("tprel at highera", VK_PPC_TPREL_HIGHERA)
+ .Case("TPREL at HIGHEST", VK_PPC_TPREL_HIGHEST)
+ .Case("tprel at highest", VK_PPC_TPREL_HIGHEST)
+ .Case("TPREL at HIGHESTA", VK_PPC_TPREL_HIGHESTA)
+ .Case("tprel at highesta", VK_PPC_TPREL_HIGHESTA)
+ .Case("DTPREL", VK_PPC_DTPREL)
+ .Case("dtprel", VK_PPC_DTPREL)
.Case("DTPREL at L", VK_PPC_DTPREL_LO)
.Case("dtprel at l", VK_PPC_DTPREL_LO)
+ .Case("DTPREL at H", VK_PPC_DTPREL_HI)
+ .Case("dtprel at h", VK_PPC_DTPREL_HI)
.Case("DTPREL at HA", VK_PPC_DTPREL_HA)
.Case("dtprel at ha", VK_PPC_DTPREL_HA)
+ .Case("DTPREL at HIGHER", VK_PPC_DTPREL_HIGHER)
+ .Case("dtprel at higher", VK_PPC_DTPREL_HIGHER)
+ .Case("DTPREL at HIGHERA", VK_PPC_DTPREL_HIGHERA)
+ .Case("dtprel at highera", VK_PPC_DTPREL_HIGHERA)
+ .Case("DTPREL at HIGHEST", VK_PPC_DTPREL_HIGHEST)
+ .Case("dtprel at highest", VK_PPC_DTPREL_HIGHEST)
+ .Case("DTPREL at HIGHESTA", VK_PPC_DTPREL_HIGHESTA)
+ .Case("dtprel at highesta", VK_PPC_DTPREL_HIGHESTA)
+ .Case("GOT at TPREL", VK_PPC_GOT_TPREL)
+ .Case("got at tprel", VK_PPC_GOT_TPREL)
.Case("GOT at TPREL@L", VK_PPC_GOT_TPREL_LO)
.Case("got at tprel@l", VK_PPC_GOT_TPREL_LO)
+ .Case("GOT at TPREL@H", VK_PPC_GOT_TPREL_HI)
+ .Case("got at tprel@h", VK_PPC_GOT_TPREL_HI)
.Case("GOT at TPREL@HA", VK_PPC_GOT_TPREL_HA)
.Case("got at tprel@ha", VK_PPC_GOT_TPREL_HA)
+ .Case("GOT at DTPREL", VK_PPC_GOT_DTPREL)
+ .Case("got at dtprel", VK_PPC_GOT_DTPREL)
+ .Case("GOT at DTPREL@L", VK_PPC_GOT_DTPREL_LO)
+ .Case("got at dtprel@l", VK_PPC_GOT_DTPREL_LO)
+ .Case("GOT at DTPREL@H", VK_PPC_GOT_DTPREL_HI)
+ .Case("got at dtprel@h", VK_PPC_GOT_DTPREL_HI)
+ .Case("GOT at DTPREL@HA", VK_PPC_GOT_DTPREL_HA)
+ .Case("got at dtprel@ha", VK_PPC_GOT_DTPREL_HA)
+ .Case("GOT at TLSGD", VK_PPC_GOT_TLSGD)
+ .Case("got at tlsgd", VK_PPC_GOT_TLSGD)
.Case("GOT at TLSGD@L", VK_PPC_GOT_TLSGD_LO)
.Case("got at tlsgd@l", VK_PPC_GOT_TLSGD_LO)
+ .Case("GOT at TLSGD@H", VK_PPC_GOT_TLSGD_HI)
+ .Case("got at tlsgd@h", VK_PPC_GOT_TLSGD_HI)
.Case("GOT at TLSGD@HA", VK_PPC_GOT_TLSGD_HA)
.Case("got at tlsgd@ha", VK_PPC_GOT_TLSGD_HA)
+ .Case("GOT at TLSLD", VK_PPC_GOT_TLSLD)
+ .Case("got at tlsld", VK_PPC_GOT_TLSLD)
.Case("GOT at TLSLD@L", VK_PPC_GOT_TLSLD_LO)
.Case("got at tlsld@l", VK_PPC_GOT_TLSLD_LO)
+ .Case("GOT at TLSLD@H", VK_PPC_GOT_TLSLD_HI)
+ .Case("got at tlsld@h", VK_PPC_GOT_TLSLD_HI)
.Case("GOT at TLSLD@HA", VK_PPC_GOT_TLSLD_HA)
.Case("got at tlsld@ha", VK_PPC_GOT_TLSLD_HA)
.Default(VK_Invalid);
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp?rev=184551&r1=184550&r2=184551&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp Fri Jun 21 09:44:15 2013
@@ -120,33 +120,90 @@ unsigned PPCELFObjectWriter::getRelocTyp
case MCSymbolRefExpr::VK_PPC_TOC_HA:
Type = ELF::R_PPC64_TOC16_HA;
break;
+ case MCSymbolRefExpr::VK_PPC_TPREL:
+ Type = ELF::R_PPC_TPREL16;
+ break;
case MCSymbolRefExpr::VK_PPC_TPREL_LO:
Type = ELF::R_PPC_TPREL16_LO;
break;
+ case MCSymbolRefExpr::VK_PPC_TPREL_HI:
+ Type = ELF::R_PPC_TPREL16_HI;
+ break;
case MCSymbolRefExpr::VK_PPC_TPREL_HA:
Type = ELF::R_PPC_TPREL16_HA;
break;
+ case MCSymbolRefExpr::VK_PPC_TPREL_HIGHER:
+ Type = ELF::R_PPC64_TPREL16_HIGHER;
+ break;
+ case MCSymbolRefExpr::VK_PPC_TPREL_HIGHERA:
+ Type = ELF::R_PPC64_TPREL16_HIGHERA;
+ break;
+ case MCSymbolRefExpr::VK_PPC_TPREL_HIGHEST:
+ Type = ELF::R_PPC64_TPREL16_HIGHEST;
+ break;
+ case MCSymbolRefExpr::VK_PPC_TPREL_HIGHESTA:
+ Type = ELF::R_PPC64_TPREL16_HIGHESTA;
+ break;
+ case MCSymbolRefExpr::VK_PPC_DTPREL:
+ Type = ELF::R_PPC64_DTPREL16;
+ break;
case MCSymbolRefExpr::VK_PPC_DTPREL_LO:
Type = ELF::R_PPC64_DTPREL16_LO;
break;
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HI:
+ Type = ELF::R_PPC64_DTPREL16_HI;
+ break;
case MCSymbolRefExpr::VK_PPC_DTPREL_HA:
Type = ELF::R_PPC64_DTPREL16_HA;
break;
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HIGHER:
+ Type = ELF::R_PPC64_DTPREL16_HIGHER;
+ break;
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HIGHERA:
+ Type = ELF::R_PPC64_DTPREL16_HIGHERA;
+ break;
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HIGHEST:
+ Type = ELF::R_PPC64_DTPREL16_HIGHEST;
+ break;
+ case MCSymbolRefExpr::VK_PPC_DTPREL_HIGHESTA:
+ Type = ELF::R_PPC64_DTPREL16_HIGHESTA;
+ break;
+ case MCSymbolRefExpr::VK_PPC_GOT_TLSGD:
+ Type = ELF::R_PPC64_GOT_TLSGD16;
+ break;
case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO:
Type = ELF::R_PPC64_GOT_TLSGD16_LO;
break;
+ case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_HI:
+ Type = ELF::R_PPC64_GOT_TLSGD16_HI;
+ break;
case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_HA:
Type = ELF::R_PPC64_GOT_TLSGD16_HA;
break;
+ case MCSymbolRefExpr::VK_PPC_GOT_TLSLD:
+ Type = ELF::R_PPC64_GOT_TLSLD16;
+ break;
case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO:
Type = ELF::R_PPC64_GOT_TLSLD16_LO;
break;
+ case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_HI:
+ Type = ELF::R_PPC64_GOT_TLSLD16_HI;
+ break;
case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_HA:
Type = ELF::R_PPC64_GOT_TLSLD16_HA;
break;
+ case MCSymbolRefExpr::VK_PPC_GOT_TPREL_HI:
+ Type = ELF::R_PPC64_GOT_TPREL16_HI;
+ break;
case MCSymbolRefExpr::VK_PPC_GOT_TPREL_HA:
Type = ELF::R_PPC64_GOT_TPREL16_HA;
break;
+ case MCSymbolRefExpr::VK_PPC_GOT_DTPREL_HI:
+ Type = ELF::R_PPC64_GOT_DTPREL16_HI;
+ break;
+ case MCSymbolRefExpr::VK_PPC_GOT_DTPREL_HA:
+ Type = ELF::R_PPC64_GOT_DTPREL16_HA;
+ break;
}
break;
case PPC::fixup_ppc_half16ds:
@@ -164,9 +221,30 @@ unsigned PPCELFObjectWriter::getRelocTyp
case MCSymbolRefExpr::VK_PPC_TOC_LO:
Type = ELF::R_PPC64_TOC16_LO_DS;
break;
+ case MCSymbolRefExpr::VK_PPC_TPREL:
+ Type = ELF::R_PPC64_TPREL16_DS;
+ break;
+ case MCSymbolRefExpr::VK_PPC_TPREL_LO:
+ Type = ELF::R_PPC64_TPREL16_LO_DS;
+ break;
+ case MCSymbolRefExpr::VK_PPC_DTPREL:
+ Type = ELF::R_PPC64_DTPREL16_DS;
+ break;
+ case MCSymbolRefExpr::VK_PPC_DTPREL_LO:
+ Type = ELF::R_PPC64_DTPREL16_LO_DS;
+ break;
+ case MCSymbolRefExpr::VK_PPC_GOT_TPREL:
+ Type = ELF::R_PPC64_GOT_TPREL16_DS;
+ break;
case MCSymbolRefExpr::VK_PPC_GOT_TPREL_LO:
Type = ELF::R_PPC64_GOT_TPREL16_LO_DS;
break;
+ case MCSymbolRefExpr::VK_PPC_GOT_DTPREL:
+ Type = ELF::R_PPC64_GOT_DTPREL16_DS;
+ break;
+ case MCSymbolRefExpr::VK_PPC_GOT_DTPREL_LO:
+ Type = ELF::R_PPC64_GOT_DTPREL16_LO_DS;
+ break;
}
break;
case PPC::fixup_ppc_tlsreg:
Modified: llvm/trunk/test/MC/PowerPC/ppc64-fixups.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/PowerPC/ppc64-fixups.s?rev=184551&r1=184550&r2=184551&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-fixups.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-fixups.s Fri Jun 21 09:44:15 2013
@@ -130,6 +130,46 @@
# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_LO target 0x0
addi 3, 3, target at tprel@l
+# CHECK: addi 3, 3, target at tprel # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at tprel, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16 target 0x0
+ addi 3, 3, target at tprel
+
+# CHECK: addi 3, 3, target at tprel@h # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at tprel@h, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HI target 0x0
+ addi 3, 3, target at tprel@h
+
+# CHECK: addi 3, 3, target at tprel@higher # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at tprel@higher, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHER target 0x0
+ addi 3, 3, target at tprel@higher
+
+# CHECK: addis 3, 2, target at tprel@highest # encoding: [0x3c,0x62,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at tprel@highest, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHEST target 0x0
+ addis 3, 2, target at tprel@highest
+
+# CHECK: addi 3, 3, target at tprel@highera # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at tprel@highera, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHERA target 0x0
+ addi 3, 3, target at tprel@highera
+
+# CHECK: addis 3, 2, target at tprel@highesta # encoding: [0x3c,0x62,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at tprel@highesta, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHESTA target 0x0
+ addis 3, 2, target at tprel@highesta
+
+# CHECK: ld 1, target at tprel@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at tprel@l, kind: fixup_ppc_half16ds
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_LO_DS target 0x0
+ ld 1, target at tprel@l(3)
+
+# CHECK: ld 1, target at tprel(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at tprel, kind: fixup_ppc_half16ds
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_DS target 0x0
+ ld 1, target at tprel(3)
+
# CHECK: addis 3, 2, target at dtprel@ha # encoding: [0x3c,0x62,A,A]
# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel@ha, kind: fixup_ppc_half16
# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HA target 0x0
@@ -140,6 +180,46 @@
# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_LO target 0x0
addi 3, 3, target at dtprel@l
+# CHECK: addi 3, 3, target at dtprel # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16 target 0x0
+ addi 3, 3, target at dtprel
+
+# CHECK: addi 3, 3, target at dtprel@h # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel@h, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HI target 0x0
+ addi 3, 3, target at dtprel@h
+
+# CHECK: addi 3, 3, target at dtprel@higher # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel@higher, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHER target 0x0
+ addi 3, 3, target at dtprel@higher
+
+# CHECK: addis 3, 2, target at dtprel@highest # encoding: [0x3c,0x62,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel@highest, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHEST target 0x0
+ addis 3, 2, target at dtprel@highest
+
+# CHECK: addi 3, 3, target at dtprel@highera # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel@highera, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHERA target 0x0
+ addi 3, 3, target at dtprel@highera
+
+# CHECK: addis 3, 2, target at dtprel@highesta # encoding: [0x3c,0x62,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel@highesta, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHESTA target 0x0
+ addis 3, 2, target at dtprel@highesta
+
+# CHECK: ld 1, target at dtprel@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel@l, kind: fixup_ppc_half16ds
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_LO_DS target 0x0
+ ld 1, target at dtprel@l(3)
+
+# CHECK: ld 1, target at dtprel(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at dtprel, kind: fixup_ppc_half16ds
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_DS target 0x0
+ ld 1, target at dtprel(3)
+
# CHECK: addis 3, 2, target at got@tprel at ha # encoding: [0x3c,0x62,A,A]
# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tprel at ha, kind: fixup_ppc_half16
@@ -151,6 +231,35 @@
# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_LO_DS target 0x0
ld 1, target at got@tprel at l(3)
+# CHECK: addis 3, 2, target at got@tprel at h # encoding: [0x3c,0x62,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tprel at h, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_HI target 0x0
+ addis 3, 2, target at got@tprel at h
+
+# CHECK: ld 1, target at got@tprel(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tprel, kind: fixup_ppc_half16ds
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_DS target 0x0
+ ld 1, target at got@tprel(3)
+
+# CHECK: addis 3, 2, target at got@dtprel at ha # encoding: [0x3c,0x62,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@dtprel at ha, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_HA target 0x0
+ addis 3, 2, target at got@dtprel at ha
+
+# CHECK: ld 1, target at got@dtprel at l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@dtprel at l, kind: fixup_ppc_half16ds
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_LO_DS target 0x0
+ ld 1, target at got@dtprel at l(3)
+
+# CHECK: addis 3, 2, target at got@dtprel at h # encoding: [0x3c,0x62,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@dtprel at h, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_HI target 0x0
+ addis 3, 2, target at got@dtprel at h
+
+# CHECK: ld 1, target at got@dtprel(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@dtprel, kind: fixup_ppc_half16ds
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_DS target 0x0
+ ld 1, target at got@dtprel(3)
# CHECK: addis 3, 2, target at got@tlsgd at ha # encoding: [0x3c,0x62,A,A]
# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tlsgd at ha, kind: fixup_ppc_half16
@@ -162,6 +271,16 @@
# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSGD16_LO target 0x0
addi 3, 3, target at got@tlsgd at l
+# CHECK: addi 3, 3, target at got@tlsgd at h # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tlsgd at h, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSGD16_HI target 0x0
+ addi 3, 3, target at got@tlsgd at h
+
+# CHECK: addi 3, 3, target at got@tlsgd # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tlsgd, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSGD16 target 0x0
+ addi 3, 3, target at got@tlsgd
+
# CHECK: addis 3, 2, target at got@tlsld at ha # encoding: [0x3c,0x62,A,A]
# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tlsld at ha, kind: fixup_ppc_half16
@@ -173,3 +292,13 @@
# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSLD16_LO target 0x0
addi 3, 3, target at got@tlsld at l
+# CHECK: addi 3, 3, target at got@tlsld at h # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tlsld at h, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSLD16_HI target 0x0
+ addi 3, 3, target at got@tlsld at h
+
+# CHECK: addi 3, 3, target at got@tlsld # encoding: [0x38,0x63,A,A]
+# CHECK-NEXT: # fixup A - offset: 2, value: target at got@tlsld, kind: fixup_ppc_half16
+# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSLD16 target 0x0
+ addi 3, 3, target at got@tlsld
+
More information about the llvm-commits
mailing list