[all-commits] [llvm/llvm-project] b159ed: [LoongArch] Emit DTPREL relocations for TLS debug ...

hev via All-commits all-commits at lists.llvm.org
Fri May 29 00:05:48 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b159ed6fa212607ecd287fa73f4bee59802b1528
      https://github.com/llvm/llvm-project/commit/b159ed6fa212607ecd287fa73f4bee59802b1528
  Author: hev <wangrui at loongson.cn>
  Date:   2026-05-29 (Fri, 29 May 2026)

  Changed paths:
    M llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
    M llvm/lib/Target/LoongArch/CMakeLists.txt
    M llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
    M llvm/lib/Target/LoongArch/LoongArchAsmPrinter.h
    M llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
    A llvm/lib/Target/LoongArch/LoongArchTargetObjectFile.cpp
    A llvm/lib/Target/LoongArch/LoongArchTargetObjectFile.h
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFStreamer.cpp
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFStreamer.h
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchFixupKinds.h
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCAsmInfo.h
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchTargetStreamer.cpp
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchTargetStreamer.h
    A llvm/test/DebugInfo/LoongArch/tls.ll
    A llvm/test/MC/LoongArch/Directives/tls.s
    M llvm/utils/gn/secondary/llvm/lib/Target/LoongArch/BUILD.gn

  Log Message:
  -----------
  [LoongArch] Emit DTPREL relocations for TLS debug info (#199326)

Teach the LoongArch backend to lower thread-local debug references using
target-specific DTPREL relocations.

This adds .dtprelword and .dtpreldword directive parsing and streaming,
introduces 32-bit and 64-bit DTPREL fixups and ELF relocation mappings,
and uses a LoongArch target object file to represent debug TLS symbols
as VK_DTPREL expressions. LoongArchAsmPrinter is updated to emit the new
directives for debug TLS values in assembly output.

Add MC and debug info tests for assembly emission and object
relocations.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list