[PATCH] D55306: [RISCV, WIP] Lower TLS addresses using localexec

Lewis Revill via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 4 17:22:03 PST 2018


lewis-revill created this revision.
lewis-revill added reviewers: asb, rogfer01, jrtc27.
Herald added subscribers: llvm-commits, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, mgrang, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar.

This patch adds lowering for an addressing sequence to access TLS symbols using the localexec model.

This required adding a four operand pseudo add instruction, which uses the fourth operand to express a relocation of the symbol. The instruction is expanded in RISCVMCCodeEmitter.cpp to a normal add, with the necessary fixup emitted. Parsing of the extra operand was also added to ensure that a normal add cannot have four operands and still parse correctly.

Depends on D55305 <https://reviews.llvm.org/D55305>


Repository:
  rL LLVM

https://reviews.llvm.org/D55306

Files:
  lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
  lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
  lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
  lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h
  lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
  lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
  lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h
  lib/Target/RISCV/RISCVISelLowering.cpp
  lib/Target/RISCV/RISCVInstrInfo.td
  lib/Target/RISCV/RISCVMCInstLower.cpp
  lib/Target/RISCV/Utils/RISCVBaseInfo.h
  test/CodeGen/RISCV/tls-models.ll
  test/MC/RISCV/rv32i-invalid.s
  test/MC/RISCV/rv32i-valid.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55306.176746.patch
Type: text/x-patch
Size: 16699 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181205/e4947611/attachment.bin>


More information about the llvm-commits mailing list