[PowerPC] Support @tls in the asm parser
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 5 Jul 2013 12:22:36 +0000 (12:22 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 5 Jul 2013 12:22:36 +0000 (12:22 +0000)
commit23a72c8f7e46618ff8dbdbba4e8c1a2c4e44e3df
tree93954d1ea2e8230d74fceb259dbc4566b6ea8901
parent87b8a7f9996ee7463b787fc85394287de903c7d7
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185692 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
lib/Target/PowerPC/PPC.h
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCMCInstLower.cpp
test/MC/PowerPC/ppc64-errors.s
test/MC/PowerPC/ppc64-fixups.s