summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-06-21 14:42:49 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-06-21 14:42:49 +0000
commitd2849572463da994c685b3bd7a60d5a7566c01e3 (patch)
treef1fd6fa0bc1ebc4a4d27ece33ef57b3533383df0 /lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
parent92cfa61c50d01307d658753f8d47f4e8555a6fa9 (diff)
downloadllvm-d2849572463da994c685b3bd7a60d5a7566c01e3.tar.gz
llvm-d2849572463da994c685b3bd7a60d5a7566c01e3.tar.bz2
llvm-d2849572463da994c685b3bd7a60d5a7566c01e3.tar.xz
[PowerPC] Support @h modifier
This adds necessary infrastructure to support the @h modifier. Note that all required relocation types were already present (and unused). This patch provides support for using @h in the assembler; it would also be possible to now use this feature in code generated by the compiler, but this is not done yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184548 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp')
-rw-r--r--lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp b/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
index 752b6f7bd1..964f272283 100644
--- a/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
+++ b/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
@@ -546,7 +546,7 @@ ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) {
}
/// Extract @l/@ha modifier from expression. Recursively scan
-/// the expression and check for VK_PPC_LO / VK_PPC_HA
+/// the expression and check for VK_PPC_LO/HI/HA
/// symbol variants. If all symbols with modifier use the same
/// variant, return the corresponding PPCMCExpr::VariantKind,
/// and a modified expression using the default symbol variant.
@@ -569,6 +569,9 @@ ExtractModifierFromExpr(const MCExpr *E,
case MCSymbolRefExpr::VK_PPC_LO:
Variant = PPCMCExpr::VK_PPC_LO;
break;
+ case MCSymbolRefExpr::VK_PPC_HI:
+ Variant = PPCMCExpr::VK_PPC_HI;
+ break;
case MCSymbolRefExpr::VK_PPC_HA:
Variant = PPCMCExpr::VK_PPC_HA;
break;