[llvm] r260401 - [MC] Merge VK_PPC_TPREL in to generic VK_TPREL.

Colin LeMahieu via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 10:32:02 PST 2016


Author: colinl
Date: Wed Feb 10 12:32:01 2016
New Revision: 260401

URL: http://llvm.org/viewvc/llvm-project?rev=260401&view=rev
Log:
[MC] Merge VK_PPC_TPREL in to generic VK_TPREL.

Differential Revision: http://reviews.llvm.org/D17038

Modified:
    llvm/trunk/include/llvm/MC/MCExpr.h
    llvm/trunk/lib/MC/MCELFStreamer.cpp
    llvm/trunk/lib/MC/MCExpr.cpp
    llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp
    llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp
    llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
    llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp
    llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll
    llvm/trunk/test/DebugInfo/PowerPC/tls.ll
    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=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCExpr.h (original)
+++ llvm/trunk/include/llvm/MC/MCExpr.h Wed Feb 10 12:32:01 2016
@@ -215,7 +215,6 @@ public:
     VK_PPC_TOC_HI,         // symbol at toc@h
     VK_PPC_TOC_HA,         // symbol at toc@ha
     VK_PPC_DTPMOD,         // symbol at dtpmod
-    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
@@ -223,7 +222,6 @@ public:
     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

Modified: llvm/trunk/lib/MC/MCELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCELFStreamer.cpp?rev=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCELFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCELFStreamer.cpp Wed Feb 10 12:32:01 2016
@@ -406,13 +406,14 @@ void MCELFStreamer::fixSymbolsInTLSFixup
     case MCSymbolRefExpr::VK_TLSLD:
     case MCSymbolRefExpr::VK_TLSLDM:
     case MCSymbolRefExpr::VK_TPOFF:
+    case MCSymbolRefExpr::VK_TPREL:
     case MCSymbolRefExpr::VK_DTPOFF:
+    case MCSymbolRefExpr::VK_DTPREL:
     case MCSymbolRefExpr::VK_Mips_TLSGD:
     case MCSymbolRefExpr::VK_Mips_GOTTPREL:
     case MCSymbolRefExpr::VK_Mips_TPREL_HI:
     case MCSymbolRefExpr::VK_Mips_TPREL_LO:
     case MCSymbolRefExpr::VK_PPC_DTPMOD:
-    case MCSymbolRefExpr::VK_PPC_TPREL:
     case MCSymbolRefExpr::VK_PPC_TPREL_LO:
     case MCSymbolRefExpr::VK_PPC_TPREL_HI:
     case MCSymbolRefExpr::VK_PPC_TPREL_HA:
@@ -420,7 +421,6 @@ void MCELFStreamer::fixSymbolsInTLSFixup
     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:

Modified: llvm/trunk/lib/MC/MCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCExpr.cpp (original)
+++ llvm/trunk/lib/MC/MCExpr.cpp Wed Feb 10 12:32:01 2016
@@ -178,6 +178,8 @@ StringRef MCSymbolRefExpr::getVariantKin
   case VK_Invalid: return "<<invalid>>";
   case VK_None: return "<<none>>";
 
+  case VK_DTPOFF: return "DTPOFF";
+  case VK_DTPREL: return "DTPREL";
   case VK_GOT: return "GOT";
   case VK_GOTOFF: return "GOTOFF";
   case VK_GOTREL: return "GOTREL";
@@ -191,7 +193,7 @@ StringRef MCSymbolRefExpr::getVariantKin
   case VK_TLSLD: return "TLSLD";
   case VK_TLSLDM: return "TLSLDM";
   case VK_TPOFF: return "TPOFF";
-  case VK_DTPOFF: return "DTPOFF";
+  case VK_TPREL: return "TPREL";
   case VK_TLVP: return "TLVP";
   case VK_TLVPPAGE: return "TLVPPAGE";
   case VK_TLVPPAGEOFF: return "TLVPPAGEOFF";
@@ -228,7 +230,6 @@ StringRef MCSymbolRefExpr::getVariantKin
   case VK_PPC_TOC_HI: return "toc at h";
   case VK_PPC_TOC_HA: return "toc at ha";
   case VK_PPC_DTPMOD: return "dtpmod";
-  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";
@@ -236,7 +237,6 @@ StringRef MCSymbolRefExpr::getVariantKin
   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";
@@ -302,8 +302,6 @@ StringRef MCSymbolRefExpr::getVariantKin
   case VK_Hexagon_IE: return "IE";
   case VK_Hexagon_IE_GOT: return "IEGOT";
   case VK_WebAssembly_FUNCTION: return "FUNCTION";
-  case VK_TPREL: return "tprel";
-  case VK_DTPREL: return "dtprel";
   }
   llvm_unreachable("Invalid variant kind");
 }
@@ -311,6 +309,8 @@ StringRef MCSymbolRefExpr::getVariantKin
 MCSymbolRefExpr::VariantKind
 MCSymbolRefExpr::getVariantKindForName(StringRef Name) {
   return StringSwitch<VariantKind>(Name.lower())
+    .Case("dtprel", VK_DTPREL)
+    .Case("dtpoff", VK_DTPOFF)
     .Case("got", VK_GOT)
     .Case("gotoff", VK_GOTOFF)
     .Case("gotrel", VK_GOTREL)
@@ -324,7 +324,7 @@ MCSymbolRefExpr::getVariantKindForName(S
     .Case("tlsld", VK_TLSLD)
     .Case("tlsldm", VK_TLSLDM)
     .Case("tpoff", VK_TPOFF)
-    .Case("dtpoff", VK_DTPOFF)
+    .Case("tprel", VK_TPREL)
     .Case("tlvp", VK_TLVP)
     .Case("tlvppage", VK_TLVPPAGE)
     .Case("tlvppageoff", VK_TLVPPAGEOFF)
@@ -353,7 +353,6 @@ MCSymbolRefExpr::getVariantKindForName(S
     .Case("toc at ha", VK_PPC_TOC_HA)
     .Case("tls", VK_PPC_TLS)
     .Case("dtpmod", VK_PPC_DTPMOD)
-    .Case("tprel", VK_PPC_TPREL)
     .Case("tprel at l", VK_PPC_TPREL_LO)
     .Case("tprel at h", VK_PPC_TPREL_HI)
     .Case("tprel at ha", VK_PPC_TPREL_HA)
@@ -361,7 +360,6 @@ MCSymbolRefExpr::getVariantKindForName(S
     .Case("tprel at highera", VK_PPC_TPREL_HIGHERA)
     .Case("tprel at highest", VK_PPC_TPREL_HIGHEST)
     .Case("tprel at highesta", VK_PPC_TPREL_HIGHESTA)
-    .Case("dtprel", VK_PPC_DTPREL)
     .Case("dtprel at l", VK_PPC_DTPREL_LO)
     .Case("dtprel at h", VK_PPC_DTPREL_HI)
     .Case("dtprel at ha", VK_PPC_DTPREL_HA)

Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp?rev=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp Wed Feb 10 12:32:01 2016
@@ -50,7 +50,7 @@ unsigned HexagonELFObjectWriter::getRelo
     break;
   case FK_Data_4:
     switch(Variant) {
-    case MCSymbolRefExpr::VariantKind::VK_PPC_DTPREL:
+    case MCSymbolRefExpr::VariantKind::VK_DTPREL:
       return ELF::R_HEX_DTPREL_32;
     case MCSymbolRefExpr::VariantKind::VK_GOT:
       return ELF::R_HEX_GOT_32;
@@ -66,7 +66,7 @@ unsigned HexagonELFObjectWriter::getRelo
       return ELF::R_HEX_LD_GOT_32;
     case MCSymbolRefExpr::VariantKind::VK_Hexagon_PCREL:
       return ELF::R_HEX_32_PCREL;
-    case MCSymbolRefExpr::VariantKind::VK_PPC_TPREL:
+    case MCSymbolRefExpr::VariantKind::VK_TPREL:
       return ELF::R_HEX_TPREL_32;
     case MCSymbolRefExpr::VariantKind::VK_None:
       return IsPCRel ? ELF::R_HEX_32_PCREL : ELF::R_HEX_32;
@@ -77,7 +77,7 @@ unsigned HexagonELFObjectWriter::getRelo
     return ELF::R_HEX_32_PCREL;
   case FK_Data_2:
     switch(Variant) {
-    case MCSymbolRefExpr::VariantKind::VK_PPC_DTPREL:
+    case MCSymbolRefExpr::VariantKind::VK_DTPREL:
       return ELF::R_HEX_DTPREL_16;
     case MCSymbolRefExpr::VariantKind::VK_GOT:
       return ELF::R_HEX_GOT_16;
@@ -87,7 +87,7 @@ unsigned HexagonELFObjectWriter::getRelo
       return ELF::R_HEX_IE_GOT_16;
     case MCSymbolRefExpr::VariantKind::VK_Hexagon_LD_GOT:
       return ELF::R_HEX_LD_GOT_16;
-    case MCSymbolRefExpr::VariantKind::VK_PPC_TPREL:
+    case MCSymbolRefExpr::VariantKind::VK_TPREL:
       return ELF::R_HEX_TPREL_16;
     case MCSymbolRefExpr::VariantKind::VK_None:
       return ELF::R_HEX_16;

Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp?rev=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp Wed Feb 10 12:32:01 2016
@@ -279,9 +279,9 @@ Hexagon::Fixups getFixupNoBits(MCInstrIn
       return Hexagon::fixup_Hexagon_GOTREL_32_6_X;
     case MCSymbolRefExpr::VK_GOT:
       return Hexagon::fixup_Hexagon_GOT_32_6_X;
-    case MCSymbolRefExpr::VK_PPC_TPREL:
+    case MCSymbolRefExpr::VK_TPREL:
       return Hexagon::fixup_Hexagon_TPREL_32_6_X;
-    case MCSymbolRefExpr::VK_PPC_DTPREL:
+    case MCSymbolRefExpr::VK_DTPREL:
       return Hexagon::fixup_Hexagon_DTPREL_32_6_X;
     case MCSymbolRefExpr::VK_Hexagon_GD_GOT:
       return Hexagon::fixup_Hexagon_GD_GOT_32_6_X;
@@ -319,9 +319,9 @@ Hexagon::Fixups getFixupNoBits(MCInstrIn
       return Hexagon::fixup_Hexagon_IE_HI16;
     case MCSymbolRefExpr::VK_Hexagon_IE_GOT:
       return Hexagon::fixup_Hexagon_IE_GOT_HI16;
-    case MCSymbolRefExpr::VK_PPC_TPREL:
+    case MCSymbolRefExpr::VK_TPREL:
       return Hexagon::fixup_Hexagon_TPREL_HI16;
-    case MCSymbolRefExpr::VK_PPC_DTPREL:
+    case MCSymbolRefExpr::VK_DTPREL:
       return Hexagon::fixup_Hexagon_DTPREL_HI16;
     case MCSymbolRefExpr::VK_None:
       return Hexagon::fixup_Hexagon_HI16;
@@ -344,9 +344,9 @@ Hexagon::Fixups getFixupNoBits(MCInstrIn
       return Hexagon::fixup_Hexagon_IE_LO16;
     case MCSymbolRefExpr::VK_Hexagon_IE_GOT:
       return Hexagon::fixup_Hexagon_IE_GOT_LO16;
-    case MCSymbolRefExpr::VK_PPC_TPREL:
+    case MCSymbolRefExpr::VK_TPREL:
       return Hexagon::fixup_Hexagon_TPREL_LO16;
-    case MCSymbolRefExpr::VK_PPC_DTPREL:
+    case MCSymbolRefExpr::VK_DTPREL:
       return Hexagon::fixup_Hexagon_DTPREL_LO16;
     case MCSymbolRefExpr::VK_None:
       return Hexagon::fixup_Hexagon_LO16;
@@ -452,7 +452,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
     raise_relocation_error(bits, kind);
   case 32:
     switch (kind) {
-    case MCSymbolRefExpr::VK_PPC_DTPREL:
+    case MCSymbolRefExpr::VK_DTPREL:
       FixupKind = *Extended ? Hexagon::fixup_Hexagon_DTPREL_32_6_X
                             : Hexagon::fixup_Hexagon_DTPREL_32;
       break;
@@ -487,7 +487,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
       FixupKind =
           *Extended ? Hexagon::fixup_Hexagon_32_6_X : Hexagon::fixup_Hexagon_32;
       break;
-    case MCSymbolRefExpr::VK_PPC_TPREL:
+    case MCSymbolRefExpr::VK_TPREL:
       FixupKind = *Extended ? Hexagon::fixup_Hexagon_TPREL_32_6_X
                             : Hexagon::fixup_Hexagon_TPREL_32;
       break;
@@ -519,7 +519,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
   case 16:
     if (*Extended) {
       switch (kind) {
-      case MCSymbolRefExpr::VK_PPC_DTPREL:
+      case MCSymbolRefExpr::VK_DTPREL:
         FixupKind = Hexagon::fixup_Hexagon_DTPREL_16_X;
         break;
       case MCSymbolRefExpr::VK_GOT:
@@ -543,7 +543,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
       case MCSymbolRefExpr::VK_None:
         FixupKind = Hexagon::fixup_Hexagon_16_X;
         break;
-      case MCSymbolRefExpr::VK_PPC_TPREL:
+      case MCSymbolRefExpr::VK_TPREL:
         FixupKind = Hexagon::fixup_Hexagon_TPREL_16_X;
         break;
       default:
@@ -551,7 +551,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
       }
     } else
       switch (kind) {
-      case MCSymbolRefExpr::VK_PPC_DTPREL:
+      case MCSymbolRefExpr::VK_DTPREL:
         FixupKind = Hexagon::fixup_Hexagon_DTPREL_16;
         break;
       case MCSymbolRefExpr::VK_GOTREL:
@@ -578,7 +578,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
       case MCSymbolRefExpr::VK_Hexagon_LO16:
         FixupKind = Hexagon::fixup_Hexagon_LO16;
         break;
-      case MCSymbolRefExpr::VK_PPC_TPREL:
+      case MCSymbolRefExpr::VK_TPREL:
         FixupKind = Hexagon::fixup_Hexagon_TPREL_16;
         break;
       default:
@@ -630,7 +630,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
   case 11:
     if (*Extended)
       switch (kind) {
-      case MCSymbolRefExpr::VK_PPC_DTPREL:
+      case MCSymbolRefExpr::VK_DTPREL:
         FixupKind = Hexagon::fixup_Hexagon_DTPREL_11_X;
         break;
       case MCSymbolRefExpr::VK_GOT:
@@ -651,7 +651,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
       case MCSymbolRefExpr::VK_None:
         FixupKind = Hexagon::fixup_Hexagon_11_X;
         break;
-      case MCSymbolRefExpr::VK_PPC_TPREL:
+      case MCSymbolRefExpr::VK_TPREL:
         FixupKind = Hexagon::fixup_Hexagon_TPREL_11_X;
         break;
       default:
@@ -659,7 +659,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
       }
     else {
       switch (kind) {
-      case MCSymbolRefExpr::VK_PPC_TPREL:
+      case MCSymbolRefExpr::VK_TPREL:
         FixupKind = Hexagon::fixup_Hexagon_TPREL_11_X;
         break;
       default:
@@ -713,7 +713,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
   case 6:
     if (*Extended) {
       switch (kind) {
-      case MCSymbolRefExpr::VK_PPC_DTPREL:
+      case MCSymbolRefExpr::VK_DTPREL:
         FixupKind = Hexagon::fixup_Hexagon_DTPREL_16_X;
         break;
       // This is part of an extender, GOT_11 is a
@@ -727,7 +727,7 @@ unsigned HexagonMCCodeEmitter::getExprOp
       case MCSymbolRefExpr::VK_Hexagon_PCREL:
         FixupKind = Hexagon::fixup_Hexagon_6_PCREL_X;
         break;
-      case MCSymbolRefExpr::VK_PPC_TPREL:
+      case MCSymbolRefExpr::VK_TPREL:
         FixupKind = Hexagon::fixup_Hexagon_TPREL_16_X;
         break;
       case MCSymbolRefExpr::VK_None:

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=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp Wed Feb 10 12:32:01 2016
@@ -186,7 +186,7 @@ unsigned PPCELFObjectWriter::getRelocTyp
       case MCSymbolRefExpr::VK_PPC_TOC_HA:
         Type = ELF::R_PPC64_TOC16_HA;
         break;
-      case MCSymbolRefExpr::VK_PPC_TPREL:
+      case MCSymbolRefExpr::VK_TPREL:
         Type = ELF::R_PPC_TPREL16;
         break;
       case MCSymbolRefExpr::VK_PPC_TPREL_LO:
@@ -210,7 +210,7 @@ unsigned PPCELFObjectWriter::getRelocTyp
       case MCSymbolRefExpr::VK_PPC_TPREL_HIGHESTA:
         Type = ELF::R_PPC64_TPREL16_HIGHESTA;
         break;
-      case MCSymbolRefExpr::VK_PPC_DTPREL:
+      case MCSymbolRefExpr::VK_DTPREL:
         Type = ELF::R_PPC64_DTPREL16;
         break;
       case MCSymbolRefExpr::VK_PPC_DTPREL_LO:
@@ -319,13 +319,13 @@ unsigned PPCELFObjectWriter::getRelocTyp
       case MCSymbolRefExpr::VK_PPC_TOC_LO:
         Type = ELF::R_PPC64_TOC16_LO_DS;
         break;
-      case MCSymbolRefExpr::VK_PPC_TPREL:
+      case MCSymbolRefExpr::VK_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:
+      case MCSymbolRefExpr::VK_DTPREL:
         Type = ELF::R_PPC64_DTPREL16_DS;
         break;
       case MCSymbolRefExpr::VK_PPC_DTPREL_LO:
@@ -380,10 +380,10 @@ unsigned PPCELFObjectWriter::getRelocTyp
       case MCSymbolRefExpr::VK_PPC_DTPMOD:
         Type = ELF::R_PPC64_DTPMOD64;
         break;
-      case MCSymbolRefExpr::VK_PPC_TPREL:
+      case MCSymbolRefExpr::VK_TPREL:
         Type = ELF::R_PPC64_TPREL64;
         break;
-      case MCSymbolRefExpr::VK_PPC_DTPREL:
+      case MCSymbolRefExpr::VK_DTPREL:
         Type = ELF::R_PPC64_DTPREL64;
         break;
       }

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp?rev=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp Wed Feb 10 12:32:01 2016
@@ -53,7 +53,7 @@ MCSection *PPC64LinuxTargetObjectFile::S
 const MCExpr *PPC64LinuxTargetObjectFile::
 getDebugThreadLocalSymbol(const MCSymbol *Sym) const {
   const MCExpr *Expr =
-    MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_PPC_DTPREL, getContext());
+    MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_DTPREL, getContext());
   return MCBinaryExpr::createAdd(Expr,
                                  MCConstantExpr::create(0x8000, getContext()),
                                  getContext());

Modified: llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll?rev=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll (original)
+++ llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll Wed Feb 10 12:32:01 2016
@@ -15,7 +15,7 @@
 ; check that the expected TLS address description is the first thing in the debug_addr section
 ; CHECK: debug_addr
 ; CHECK-NEXT: .Laddr_sec:
-; CHECK-NEXT: .quad tls at dtprel+32768
+; CHECK-NEXT: .quad tls at DTPREL+32768
 
 @tls = thread_local global i32 0, align 4
 

Modified: llvm/trunk/test/DebugInfo/PowerPC/tls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/PowerPC/tls.ll?rev=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/PowerPC/tls.ll (original)
+++ llvm/trunk/test/DebugInfo/PowerPC/tls.ll Wed Feb 10 12:32:01 2016
@@ -8,7 +8,7 @@
 ; DW_OP_const8u
 ; CHECK: .byte  14
 ; The debug relocation of the address of the tls variable
-; CHECK: .quad  tls at dtprel+32768
+; CHECK: .quad  tls at DTPREL+32768
 ; DW_OP_GNU_push_tls_address
 ; CHECK: .byte  224
 

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=260401&r1=260400&r2=260401&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-fixups.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-fixups.s Wed Feb 10 12:32:01 2016
@@ -338,10 +338,10 @@ base:
 # CHECK-LE-REL:                             0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_LO target 0x0
             addi 3, 3, target at tprel@l
 
-# CHECK-BE: addi 3, 3, target at tprel         # encoding: [0x38,0x63,A,A]
-# CHECK-LE: addi 3, 3, target at tprel         # encoding: [A,A,0x63,0x38]
-# CHECK-BE-NEXT:                            #   fixup A - offset: 2, value: target at tprel, kind: fixup_ppc_half16
-# CHECK-LE-NEXT:                            #   fixup A - offset: 0, value: target at tprel, kind: fixup_ppc_half16
+# CHECK-BE: addi 3, 3, target at TPREL         # encoding: [0x38,0x63,A,A]
+# CHECK-LE: addi 3, 3, target at TPREL         # encoding: [A,A,0x63,0x38]
+# CHECK-BE-NEXT:                            #   fixup A - offset: 2, value: target at TPREL, kind: fixup_ppc_half16
+# CHECK-LE-NEXT:                            #   fixup A - offset: 0, value: target at TPREL, kind: fixup_ppc_half16
 # CHECK-BE-REL:                             0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16 target 0x0
 # CHECK-LE-REL:                             0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16 target 0x0
             addi 3, 3, target at tprel
@@ -394,10 +394,10 @@ base:
 # CHECK-LE-REL:                             0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_LO_DS target 0x0
             ld 1, target at tprel@l(3)
 
-# CHECK-BE: ld 1, target at tprel(3)           # encoding: [0xe8,0x23,A,0bAAAAAA00]
-# CHECK-LE: ld 1, target at tprel(3)           # encoding: [0bAAAAAA00,A,0x23,0xe8]
-# CHECK-BE-NEXT:                            #   fixup A - offset: 2, value: target at tprel, kind: fixup_ppc_half16ds
-# CHECK-LE-NEXT:                            #   fixup A - offset: 0, value: target at tprel, kind: fixup_ppc_half16ds
+# CHECK-BE: ld 1, target at TPREL(3)           # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-LE: ld 1, target at TPREL(3)           # encoding: [0bAAAAAA00,A,0x23,0xe8]
+# CHECK-BE-NEXT:                            #   fixup A - offset: 2, value: target at TPREL, kind: fixup_ppc_half16ds
+# CHECK-LE-NEXT:                            #   fixup A - offset: 0, value: target at TPREL, kind: fixup_ppc_half16ds
 # CHECK-BE-REL:                             0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_DS target 0x0
 # CHECK-LE-REL:                             0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_DS target 0x0
             ld 1, target at tprel(3)
@@ -418,10 +418,10 @@ base:
 # CHECK-LE-REL:                             0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_LO target 0x0
             addi 3, 3, target at dtprel@l
 
-# CHECK-BE: addi 3, 3, target at dtprel         # encoding: [0x38,0x63,A,A]
-# CHECK-LE: addi 3, 3, target at dtprel         # encoding: [A,A,0x63,0x38]
-# CHECK-BE-NEXT:                            #   fixup A - offset: 2, value: target at dtprel, kind: fixup_ppc_half16
-# CHECK-LE-NEXT:                            #   fixup A - offset: 0, value: target at dtprel, kind: fixup_ppc_half16
+# CHECK-BE: addi 3, 3, target at DTPREL         # encoding: [0x38,0x63,A,A]
+# CHECK-LE: addi 3, 3, target at DTPREL         # encoding: [A,A,0x63,0x38]
+# CHECK-BE-NEXT:                            #   fixup A - offset: 2, value: target at DTPREL, kind: fixup_ppc_half16
+# CHECK-LE-NEXT:                            #   fixup A - offset: 0, value: target at DTPREL, kind: fixup_ppc_half16
 # CHECK-BE-REL:                             0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16 target 0x0
 # CHECK-LE-REL:                             0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16 target 0x0
             addi 3, 3, target at dtprel
@@ -474,10 +474,10 @@ base:
 # CHECK-LE-REL:                             0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_LO_DS target 0x0
             ld 1, target at dtprel@l(3)
 
-# CHECK-BE: ld 1, target at dtprel(3)          # encoding: [0xe8,0x23,A,0bAAAAAA00]
-# CHECK-LE: ld 1, target at dtprel(3)          # encoding: [0bAAAAAA00,A,0x23,0xe8]
-# CHECK-BE-NEXT:                            #   fixup A - offset: 2, value: target at dtprel, kind: fixup_ppc_half16ds
-# CHECK-LE-NEXT:                            #   fixup A - offset: 0, value: target at dtprel, kind: fixup_ppc_half16ds
+# CHECK-BE: ld 1, target at DTPREL(3)          # encoding: [0xe8,0x23,A,0bAAAAAA00]
+# CHECK-LE: ld 1, target at DTPREL(3)          # encoding: [0bAAAAAA00,A,0x23,0xe8]
+# CHECK-BE-NEXT:                            #   fixup A - offset: 2, value: target at DTPREL, kind: fixup_ppc_half16ds
+# CHECK-LE-NEXT:                            #   fixup A - offset: 0, value: target at DTPREL, kind: fixup_ppc_half16ds
 # CHECK-BE-REL:                             0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_DS target 0x0
 # CHECK-LE-REL:                             0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_DS target 0x0
             ld 1, target at dtprel(3)




More information about the llvm-commits mailing list