]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/aarch64-tls-gdle.s
Vendor import of lld trunk r290819:
[FreeBSD/FreeBSD.git] / test / ELF / aarch64-tls-gdle.s
1 # RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/aarch64-tls-ie.s -o %ttlsie.o
2 # RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tmain.o
3 # RUN: ld.lld %tmain.o %ttlsie.o -o %tout
4 # RUN: llvm-objdump -d %tout | FileCheck %s
5 # RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s
6 # REQUIRES: aarch64
7
8 #Local-Dynamic to Initial-Exec relax creates no
9 #RELOC:      Relocations [
10 #RELOC-NEXT: ]
11
12 # TCB size = 0x16 and foo is first element from TLS register.
13 # CHECK: Disassembly of section .text:
14 # CHECK: _start:
15 # CHECK:  20000:        00 00 a0 d2     movz    x0, #0, lsl #16
16 # CHECK:  20004:        00 02 80 f2     movk    x0, #16
17 # CHECK:  20008:        1f 20 03 d5     nop
18 # CHECK:  2000c:        1f 20 03 d5     nop
19
20 .globl _start
21 _start:
22  adrp    x0, :tlsdesc:foo
23  ldr     x1, [x0, :tlsdesc_lo12:foo]
24  add     x0, x0, :tlsdesc_lo12:foo
25  .tlsdesccall foo
26  blr     x1