[PowerPC] Support @got modifier

Add VK_... values and relocation types necessary to support
the @got family of modifiers.  Used by the asm parser only.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ulrich Weigand
2013-06-25 16:49:50 +00:00
parent 46fa7cf91a
commit 5de735a962
6 changed files with 85 additions and 0 deletions
+9
View File
@@ -203,6 +203,9 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) {
case VK_PPC_HIGHERA: return "highera";
case VK_PPC_HIGHEST: return "highest";
case VK_PPC_HIGHESTA: return "highesta";
case VK_PPC_GOT_LO: return "got@l";
case VK_PPC_GOT_HI: return "got@h";
case VK_PPC_GOT_HA: return "got@ha";
case VK_PPC_TOCBASE: return "tocbase";
case VK_PPC_TOC: return "toc";
case VK_PPC_TOC_LO: return "toc@l";
@@ -321,6 +324,12 @@ MCSymbolRefExpr::getVariantKindForName(StringRef Name) {
.Case("highest", VK_PPC_HIGHEST)
.Case("HIGHESTA", VK_PPC_HIGHESTA)
.Case("highesta", VK_PPC_HIGHESTA)
.Case("GOT@L", VK_PPC_GOT_LO)
.Case("got@l", VK_PPC_GOT_LO)
.Case("GOT@H", VK_PPC_GOT_HI)
.Case("got@h", VK_PPC_GOT_HI)
.Case("GOT@HA", VK_PPC_GOT_HA)
.Case("got@ha", VK_PPC_GOT_HA)
.Case("TOCBASE", VK_PPC_TOCBASE)
.Case("tocbase", VK_PPC_TOCBASE)
.Case("TOC", VK_PPC_TOC)