brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 9f25f10 Raw
47 lines · plain
1# REQUIRES: loongarch2 3## Edge case: when a TLS symbol is being accessed in both GD and IE manners,4## correct reloc behavior should be preserved for both kinds of accesses.5 6# RUN: llvm-mc --filetype=obj --triple=loongarch32 %s -o %t.la32.o7# RUN: ld.lld %t.la32.o -shared -o %t.la328# RUN: llvm-mc --filetype=obj --triple=loongarch64 %s -o %t.la64.o9# RUN: ld.lld %t.la64.o -shared -o %t.la6410 11# RUN: llvm-readelf -Wr %t.la32 | FileCheck --check-prefix=LA32-REL %s12# RUN: llvm-objdump -d --no-show-raw-insn %t.la32 | FileCheck --check-prefix=LA32 %s13 14# RUN: llvm-readelf -Wr %t.la64 | FileCheck --check-prefix=LA64-REL %s15# RUN: llvm-objdump -d --no-show-raw-insn %t.la64 | FileCheck --check-prefix=LA64 %s16 17# LA32-REL-NOT:  R_LARCH_3218# LA32-REL:      0002023c  00000206 R_LARCH_TLS_DTPMOD32   00000000   y + 019# LA32-REL-NEXT: 00020240  00000208 R_LARCH_TLS_DTPREL32   00000000   y + 020# LA32-REL-NEXT: 00020244  0000020a R_LARCH_TLS_TPREL32    00000000   y + 021 22# LA64-REL-NOT:  R_LARCH_6423# LA64-REL:      00000000000203a0  0000000200000007 R_LARCH_TLS_DTPMOD64   0000000000000000 y + 024# LA64-REL-NEXT: 00000000000203a8  0000000200000009 R_LARCH_TLS_DTPREL64   0000000000000000 y + 025# LA64-REL-NEXT: 00000000000203b0  000000020000000b R_LARCH_TLS_TPREL64    0000000000000000 y + 026 27# LA32:      101d4: pcalau12i $a0, 1628# LA32-NEXT:        ld.w $a0, $a0, 58029# LA32-NEXT:        pcalau12i $a1, 1630# LA32-NEXT:        addi.w $a1, $a1, 57231 32# LA64:      102e0: pcalau12i $a0, 1633# LA64-NEXT:        ld.d $a0, $a0, 94434# LA64-NEXT:        pcalau12i $a1, 1635# LA64-NEXT:        addi.d $a1, $a1, 92836 37.global _start38_start:39la.tls.ie $a0, y  # should refer to the GOT entry relocated by the R_LARCH_TLS_TPRELnn record40la.tls.gd $a1, y  # should refer to the GOT entry relocated by the R_LARCH_TLS_DTPMODnn record41 42.section .tbss,"awT",@nobits43.global y44y:45.word 046.size y, 447