summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCExpr.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-06-21 14:43:10 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-06-21 14:43:10 +0000
commit72ddbd656e239b54bd1db41f7af2542d32eb8b19 (patch)
tree49a920cdc1e5ab08702672520d4e42f53d0210a6 /llvm/lib/MC/MCExpr.cpp
parente67c565dc101a63553921257d24e9854411473ec (diff)
downloadbcm5719-llvm-72ddbd656e239b54bd1db41f7af2542d32eb8b19.tar.gz
bcm5719-llvm-72ddbd656e239b54bd1db41f7af2542d32eb8b19.zip
[PowerPC] Support @toc@h modifier
This adds the relocation type and other necessary infrastructure to use the @toc@h modifier in the assembler. llvm-svn: 184549
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r--llvm/lib/MC/MCExpr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp
index f59222263da..454965a3a8a 100644
--- a/llvm/lib/MC/MCExpr.cpp
+++ b/llvm/lib/MC/MCExpr.cpp
@@ -202,6 +202,7 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) {
case VK_PPC_TOCBASE: return "tocbase";
case VK_PPC_TOC: return "toc";
case VK_PPC_TOC_LO: return "toc@l";
+ case VK_PPC_TOC_HI: return "toc@h";
case VK_PPC_TOC_HA: return "toc@ha";
case VK_PPC_TPREL_LO: return "tprel@l";
case VK_PPC_TPREL_HA: return "tprel@ha";
@@ -292,6 +293,8 @@ MCSymbolRefExpr::getVariantKindForName(StringRef Name) {
.Case("toc", VK_PPC_TOC)
.Case("TOC@L", VK_PPC_TOC_LO)
.Case("toc@l", VK_PPC_TOC_LO)
+ .Case("TOC@H", VK_PPC_TOC_HI)
+ .Case("toc@h", VK_PPC_TOC_HI)
.Case("TOC@HA", VK_PPC_TOC_HA)
.Case("toc@ha", VK_PPC_TOC_HA)
.Case("TLS", VK_PPC_TLS)
OpenPOWER on IntegriCloud