xref: /llvm-project/llvm/test/MC/X86/tlsdesc-x32.s (revision 75cdab6dc2453a508157a9c383b93373a93078d6)
1# RUN: llvm-mc -triple x86_64-pc-linux-gnux32 %s | FileCheck --check-prefix=PRINT %s
2
3# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnux32 %s -o %t
4# RUN: llvm-readelf -s %t | FileCheck --check-prefix=SYM %s
5# RUN: llvm-objdump --no-print-imm-hex -d -r %t | FileCheck --match-full-lines %s
6
7# PRINT:      leal a@tlsdesc(%rip), %eax
8# PRINT-NEXT: callq *a@tlscall(%eax)
9
10# SYM: TLS GLOBAL DEFAULT UND a
11
12# CHECK:      0: 40 8d 05 00 00 00 00  leal (%rip), %eax  # 0x7 <{{.*}}>
13# CHECK-NEXT:   00000003: R_X86_64_GOTPC32_TLSDESC a-0x4
14# CHECK-NEXT: 7: 67 ff 10              callq *(%eax)
15# CHECK-NEXT:   00000007: R_X86_64_TLSDESC_CALL a
16# CHECK-NEXT: a: 8d 05 34 12 00 00     leal 4660(%rip), %eax # {{.*}}
17
18lea a@tlsdesc(%rip), %eax
19call *a@tlscall(%eax)
20lea 0x1234(%rip), %eax
21