OSDN Git Service

[RISCV] Add lowering of global TLS addresses
authorLewis Revill <lewis.revill@embecosm.com>
Wed, 19 Jun 2019 08:40:59 +0000 (08:40 +0000)
committerLewis Revill <lewis.revill@embecosm.com>
Wed, 19 Jun 2019 08:40:59 +0000 (08:40 +0000)
commit5fbcfbac5944159836e87ee394f371ce6b25e120
treee0f855f9713c17779068e2cf9fa54cf59f821c07
parent908043fbf18a3c0bb231d3ce281ca64eb253d466
[RISCV] Add lowering of global TLS addresses

This patch adds lowering for global TLS addresses for the TLS models of
InitialExec, GlobalDynamic, LocalExec and LocalDynamic.

LocalExec support required using a 4-operand add instruction, which uses
the fourth operand to express a relocation on the symbol. The necessary
fixup is emitted when the instruction is emitted.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363771 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
lib/Target/RISCV/RISCVISelLowering.cpp
lib/Target/RISCV/RISCVISelLowering.h
lib/Target/RISCV/RISCVInstrInfo.cpp
lib/Target/RISCV/RISCVMCInstLower.cpp
lib/Target/RISCV/Utils/RISCVBaseInfo.h
test/CodeGen/RISCV/tls-models.ll [new file with mode: 0644]