[all-commits] [llvm/llvm-project] 56c24f: Relax TLSDESC code sequence.

Zhaoxin Yang via All-commits all-commits at lists.llvm.org
Mon Jan 20 16:36:14 PST 2025


  Branch: refs/heads/users/ylzsx/r-tlsdesc-noconversion
  Home:   https://github.com/llvm/llvm-project
  Commit: 56c24f9746ef42c449a4d1d5caf10f7cd1dd7d81
      https://github.com/llvm/llvm-project/commit/56c24f9746ef42c449a4d1d5caf10f7cd1dd7d81
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-20 (Mon, 20 Jan 2025)

  Changed paths:
    M lld/ELF/Arch/LoongArch.cpp

  Log Message:
  -----------
  Relax TLSDESC code sequence.

Original code sequence:
 * pcalau12i  $a0, %desc_pc_hi20(sym_desc)
 * addi.d     $a0, $a0, %desc_pc_lo12(sym_desc)
 * ld.d       $ra, $a0, %desc_ld(sym_desc)
 * jirl       $ra, $ra, %desc_call(sym_desc)

Cannot convert to LE/IE, but relax:
 * pcaddi     $a0, %desc_pcrel_20(sym_desc)
 * ld.d       $ra, $a0, %desc_ld(sym_desc)
 * jirl       $ra, $ra, %desc_call(sym_desc)

FIXME: The conversion of TLSDESC GD/LD to LE/IE will implement in a
future patch.


  Commit: 880523cdb13c1a1216cbdd08faf3180e79587110
      https://github.com/llvm/llvm-project/commit/880523cdb13c1a1216cbdd08faf3180e79587110
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-20 (Mon, 20 Jan 2025)

  Changed paths:
    A lld/test/ELF/loongarch-relax-tlsdesc.s

  Log Message:
  -----------
  Add test loongarch-relax-tlsdesc.s


  Commit: a48a2b989d747754b0aa33f4f8d0f13a7e7c696c
      https://github.com/llvm/llvm-project/commit/a48a2b989d747754b0aa33f4f8d0f13a7e7c696c
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-20 (Mon, 20 Jan 2025)

  Changed paths:
    M lld/ELF/Arch/LoongArch.cpp
    M lld/test/ELF/loongarch-relax-tlsdesc.s

  Log Message:
  -----------
  Relax desc_pc_hi20+desc_pc_lo12 ==> desc_pcrel_20


  Commit: 576773c8e2c67bc89cd653f3a52b894446ef590e
      https://github.com/llvm/llvm-project/commit/576773c8e2c67bc89cd653f3a52b894446ef590e
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-20 (Mon, 20 Jan 2025)

  Changed paths:
    M lld/test/ELF/loongarch-relax-tlsdesc.s

  Log Message:
  -----------
  Modify test loongarch-relax-tlsdesc.s


  Commit: b2f11e3b33a0c2650c165992c8497fd6be851113
      https://github.com/llvm/llvm-project/commit/b2f11e3b33a0c2650c165992c8497fd6be851113
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-20 (Mon, 20 Jan 2025)

  Changed paths:
    M lld/test/ELF/loongarch-relax-tlsdesc.s

  Log Message:
  -----------
  Remove --emit-relocs in loongarch-relax-tlsdesc.s

llvm-objdump -dr cannot print the relocations, however objudmp works
well. It also occurs for RISCV.


  Commit: d5c9d649c92235eab855cd7bad34ab3e1580a6fa
      https://github.com/llvm/llvm-project/commit/d5c9d649c92235eab855cd7bad34ab3e1580a6fa
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-20 (Mon, 20 Jan 2025)

  Changed paths:
    M lld/test/ELF/loongarch-relax-tlsdesc.s

  Log Message:
  -----------
  Modify test. Add --relax option.


Compare: https://github.com/llvm/llvm-project/compare/56c24f9746ef%5E...d5c9d649c922

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