aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-07-05 12:22:36 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-07-05 12:22:36 +0000
commit5b427591d6ebfd4f191c39307335a848cedf96ac (patch)
treec201deb708f6932c46d82b1f9724218043809616 /llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
parent544615f893a6318b533d6bdf9c609db7169328ff (diff)
downloadllvm-5b427591d6ebfd4f191c39307335a848cedf96ac.zip
llvm-5b427591d6ebfd4f191c39307335a848cedf96ac.tar.gz
llvm-5b427591d6ebfd4f191c39307335a848cedf96ac.tar.bz2
[PowerPC] Support @tls in the asm parser
This adds support for the last missing construct to parse TLS-related assembler code: add 3, 4, symbol@tls The ADD8TLS currently hard-codes the @tls into the assembler string. This cannot be handled by the asm parser, since @tls is parsed as a symbol variant. This patch changes ADD8TLS to have the @tls suffix printed as symbol variant on output too, which allows us to remove the isCodeGenOnly marker from ADD8TLS. This in turn means that we can add a AsmOperand to accept @tls marked symbols on input. As a side effect, this means that the fixup_ppc_tlsreg fixup type is no longer necessary and can be merged into fixup_ppc_nofixup. llvm-svn: 185692
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCMCInstLower.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCMCInstLower.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
index 1eefb7f..b7e88d4 100644
--- a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
+++ b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
@@ -127,6 +127,9 @@ static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
case PPCII::MO_TOC_LO:
RefKind = MCSymbolRefExpr::VK_PPC_TOC_LO;
break;
+ case PPCII::MO_TLS:
+ RefKind = MCSymbolRefExpr::VK_PPC_TLS;
+ break;
}
const MCExpr *Expr = MCSymbolRefExpr::Create(Symbol, RefKind, Ctx);