[all-commits] [llvm/llvm-project] 5b0587: [PowerPC] Support local-dynamic TLS relocation on ...

Felix (Ting Wang) via All-commits all-commits at lists.llvm.org
Thu Feb 29 16:09:53 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b058709536dd883980722ee000bb7b8c7b2cd8b
      https://github.com/llvm/llvm-project/commit/5b058709536dd883980722ee000bb7b8c7b2cd8b
  Author: Felix (Ting Wang) <Ting.Wang.SH at ibm.com>
  Date:   2024-03-01 (Fri, 01 Mar 2024)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticDriverKinds.td
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/CodeGen/PowerPC/aix-tls-model.cpp
    M clang/test/Sema/aix-attr-tls_model.c
    M llvm/include/llvm/MC/MCExpr.h
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/MC/MCExpr.cpp
    M llvm/lib/MC/XCOFFObjectWriter.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp
    M llvm/lib/Target/PowerPC/PPC.h
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.h
    M llvm/lib/Target/PowerPC/PPCInstr64Bit.td
    M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
    M llvm/lib/Target/PowerPC/PPCInstrInfo.td
    M llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
    M llvm/test/CodeGen/PowerPC/aix-tls-gd-double.ll
    M llvm/test/CodeGen/PowerPC/aix-tls-gd-int.ll
    M llvm/test/CodeGen/PowerPC/aix-tls-gd-longlong.ll
    A llvm/test/CodeGen/PowerPC/aix-tls-ld-xcoff-reloc-large.ll
    A llvm/test/CodeGen/PowerPC/aix-tls-local-dynamic.ll
    M llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll
    M llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll

  Log Message:
  -----------
  [PowerPC] Support local-dynamic TLS relocation on AIX (#66316)

Supports TLS local-dynamic on AIX, generates below sequence of code:

```
.tc foo[TC],foo[TL]@ld # Variable offset, ld relocation specifier
.tc mh[TC],mh[TC]@ml # Module handle for the caller
lwz 3,mh[TC]\(2\) $$ For 64-bit: ld 3,mh[TC]\(2\)
bla .__tls_get_mod # Modifies r0,r3,r4,r5,r11,lr,cr0
#r3 = &TLS for module
lwz 4,foo[TC]\(2\) $$ For 64-bit: ld 4,foo[TC]\(2\)
add 5,3,4 # Compute &foo
.rename mh[TC], "\_$TLSML" # Symbol for the module handle must have the name "_$TLSML"
```

---------

Co-authored-by: tingwang <tingwang at tingwangs-MBP.lan>
Co-authored-by: tingwang <tingwang at tingwangs-MacBook-Pro.local>



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