llvm-6502/lib/Target/ARM/MCTargetDesc
David Peixotto 0fc8c68b11 Add support for parsing ARM symbol variants on ELF targets
ARM symbol variants are written with parens instead of @ like this:

  .word __GLOBAL_I_a(target1)

This commit adds support for parsing these symbol variants in
expressions. We introduce a new flag to MCAsmInfo that indicates the
parser should use parens to parse the symbol variant. The expression
parser is modified to look for symbol variants using parens instead
of @ when the corresponding MCAsmInfo flag is true.

The MCAsmInfo parens flag is enabled only for ARM on ELF.

By adding this flag to MCAsmInfo, we are able to get rid of
redundant ARM-specific symbol variants and use the generic variants
instead (e.g. VK_GOT instead of VK_ARM_GOT). We use the new
UseParensForSymbolVariant attribute in MCAsmInfo to correctly print
the symbol variants for arm.

To achive this we need to keep a handle to the MCAsmInfo in the
MCSymbolRefExpr class that we can check when printing the symbol
variant.

Updated Tests:
  Changed case of symbol variant to match the generic kind.
  test/CodeGen/ARM/tls-models.ll
  test/CodeGen/ARM/tls1.ll
  test/CodeGen/ARM/tls2.ll
  test/CodeGen/Thumb2/tls1.ll
  test/CodeGen/Thumb2/tls2.ll

PR18080


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-04 22:43:20 +00:00
..
ARMAddressingModes.h Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros. 2013-05-24 22:23:49 +00:00
ARMAsmBackend.cpp Generate compact unwind encoding from CFI directives. 2013-09-09 02:37:14 +00:00
ARMBaseInfo.h ARM: remove special cases for Darwin dynamic-no-pic mode. 2013-11-25 16:24:52 +00:00
ARMELFObjectWriter.cpp Add support for parsing ARM symbol variants on ELF targets 2013-12-04 22:43:20 +00:00
ARMELFStreamer.cpp [arm] Implement eabi_attribute, cpu, and fpu directives. 2013-10-28 17:51:12 +00:00
ARMFixupKinds.h Ensure conditional BL instructions for ARM are given the fixup fixup_arm_condbranch. 2012-03-30 09:15:32 +00:00
ARMMachObjectWriter.cpp Move everything depending on Object/MachOFormat.h over to Support/MachO.h. 2013-09-01 04:28:48 +00:00
ARMMachORelocationInfo.cpp Add MCSymbolizer for symbolic/annotated disassembly. 2013-05-24 00:39:57 +00:00
ARMMCAsmInfo.cpp Add support for parsing ARM symbol variants on ELF targets 2013-12-04 22:43:20 +00:00
ARMMCAsmInfo.h Add a MCAsmInfoELF class and factor some code into it. 2013-10-16 01:34:32 +00:00
ARMMCCodeEmitter.cpp Return early from getUnconditionalBranchTargetOpValue if the branch target is 2013-10-28 20:51:11 +00:00
ARMMCExpr.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ARMMCExpr.h Add AArch64 as an experimental target. 2013-01-31 12:12:40 +00:00
ARMMCTargetDesc.cpp ARM: Add subtarget feature for CRC 2013-10-29 09:47:35 +00:00
ARMMCTargetDesc.h Add a MCTargetStreamer interface. 2013-10-08 13:08:17 +00:00
ARMUnwindOp.h Implement ARM unwind opcode assembler. 2013-04-16 12:02:21 +00:00
ARMUnwindOpAsm.cpp Fix ARM unwind opcode assembler in several cases. 2013-06-09 12:22:30 +00:00
ARMUnwindOpAsm.h Fix ARM unwind opcode assembler in several cases. 2013-06-09 12:22:30 +00:00
CMakeLists.txt [CMake] Let add_public_tablegen_target responsible to provide dependency to CommonTableGen. 2013-11-28 17:04:04 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile