[mips][ias] Support .dtprel[d]word and .tprel[d]word directives
authorSimon Atanasyan <simon@atanasyan.com>
Mon, 22 Aug 2016 16:18:42 +0000 (16:18 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Mon, 22 Aug 2016 16:18:42 +0000 (16:18 +0000)
commiteb9ed6102116608b4e8cc4885eb50cedd83d57c7
tree0687c98a17fd68bc20bfd1cf319d6920d095c08b
parentf8c2f08cb361c522f7bb614220e78bc9f77724a9
[mips][ias] Support .dtprel[d]word and .tprel[d]word directives

Assembler directives .dtprelword, .dtpreldword, .tprelword, and
.tpreldword generates relocations R_MIPS_TLS_DTPREL32, R_MIPS_TLS_DTPREL64,
R_MIPS_TLS_TPREL32, and R_MIPS_TLS_TPREL64 respectively.

The main motivation for this patch is to be able to write test cases
for checking correctness of the LLD linker's behaviour.

Differential Revision: https://reviews.llvm.org/D23669

llvm-svn: 279439
13 files changed:
llvm/include/llvm/MC/MCAsmInfo.h
llvm/include/llvm/MC/MCFixup.h
llvm/include/llvm/MC/MCObjectStreamer.h
llvm/include/llvm/MC/MCStreamer.h
llvm/lib/MC/MCAsmBackend.cpp
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCObjectStreamer.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
llvm/test/MC/Mips/relocation.s