File: loongarch-tlsdesc-gd-mixed.s

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (23 lines) | stat: -rw-r--r-- 601 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# REQUIRES: loongarch
# RUN: llvm-mc -filetype=obj -triple=loongarch64 %s -o %t.o
# RUN: ld.lld -shared %t.o -o %t.so
# RUN: llvm-readobj -r %t.so | FileCheck %s --check-prefix=RELA

## Both TLSDESC and DTPMOD64/DTPREL64 should be present.
# RELA:      .rela.dyn {
# RELA-NEXT:   0x[[#%X,ADDR:]] R_LARCH_TLS_DESC64   a 0x0
# RELA-NEXT:   0x[[#ADDR+16]]  R_LARCH_TLS_DTPMOD64 a 0x0
# RELA-NEXT:   0x[[#ADDR+24]]  R_LARCH_TLS_DTPREL64 a 0x0
# RELA-NEXT: }

  la.tls.gd $a0,a
  bl %plt(__tls_get_addr)

  la.tls.desc $a0, a
  add.d $a1, $a0, $tp

.section .tbss,"awT",@nobits
.globl a
.zero 8
a:
.zero 4