[RISCV] Support assembling TLS add and associated modifiers
authorLewis Revill <lewis.revill@embecosm.com>
Thu, 4 Apr 2019 14:13:37 +0000 (14:13 +0000)
committerLewis Revill <lewis.revill@embecosm.com>
Thu, 4 Apr 2019 14:13:37 +0000 (14:13 +0000)
commitaa79a3fe8e09da6b6cb30a70308a804d9b232112
tree6afa7dcd62b265871a498c8fc93a8357398371a9
parent9f598ac7062cfb72d17d59a8f2ab322d2d31a60d
[RISCV] Support assembling TLS add and associated modifiers

This patch adds support in the MC layer for parsing and assembling the
4-operand add instruction needed for TLS addressing. This also involves
parsing the %tprel_hi, %tprel_lo and %tprel_add operand modifiers.

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

llvm-svn: 357698
15 files changed:
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h
llvm/lib/Target/RISCV/RISCVInstrInfo.td
llvm/test/MC/RISCV/relocations.s
llvm/test/MC/RISCV/rv32d-invalid.s
llvm/test/MC/RISCV/rv32f-invalid.s
llvm/test/MC/RISCV/rv32i-invalid.s
llvm/test/MC/RISCV/rv64i-invalid.s
llvm/test/MC/RISCV/rvi-pseudos-invalid.s