[SystemZ] Support all TLS access models - MC part
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Wed, 18 Feb 2015 09:11:36 +0000 (09:11 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Wed, 18 Feb 2015 09:11:36 +0000 (09:11 +0000)
commitca1a3cf45b7c55f8f6c4985b78bbbb0a761db075
treef3c4acebb88326eda0592515546956dffc60b01c
parent582e77af02c74d7acc6c832d35ea01674ad3b08f
[SystemZ] Support all TLS access models - MC part

The current SystemZ back-end only supports the local-exec TLS access model.
This patch adds all required MC support for the other TLS models, which
means in particular:

- Support additional relocation types for
  Initial-exec model: R_390_TLS_IEENT
  Local-dynamic-model: R_390_TLS_LDO32, R_390_TLS_LDO64,
                       R_390_TLS_LDM32, R_390_TLS_LDM64, R_390_TLS_LDCALL
  General-dynamic model: R_390_TLS_GD32, R_390_TLS_GD64, R_390_TLS_GDCALL

- Support assembler syntax to generate additional relocations
  for use with __tls_get_offset calls:
    :tls_gdcall:
    :tls_ldcall:

The patch also adds a new test to verify fixups and relocations,
and removes the (already unused) FK_390_PLT16DBL/FK_390_PLT32DBL
fixup kinds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229652 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp
lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h
lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCFixups.h
lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp
lib/Target/SystemZ/SystemZInstrInfo.td
lib/Target/SystemZ/SystemZOperands.td
test/MC/SystemZ/fixups.s [new file with mode: 0644]