[gn] port afa8aeeeec (RISCVGenExegesis.inc)
[llvm-project.git] / lld / test / ELF / invalid / x86-64-tlsdesc-gd.s
blob625248da144312e0a527db6c788112af7a731e6b
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: echo '.tbss; .globl a; a:' | llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o
4 # RUN: ld.lld -shared %t1.o -o %t1.so
6 ## GD to LE relaxation.
7 # RUN: not ld.lld %t.o %t1.o -o /dev/null 2>&1 | FileCheck -DINPUT=%t.o %s
8 ## GD to IE relaxation.
9 # RUN: not ld.lld %t.o %t1.so -o /dev/null 2>&1 | FileCheck -DINPUT=%t.o %s
11 # CHECK: error: [[INPUT]]:(.text+0x0): R_X86_64_GOTPC32_TLSDESC/R_X86_64_CODE_4_GOTPC32_TLSDESC must be used in leaq x@tlsdesc(%rip), %REG
12 # CHECK-NEXT: error: [[INPUT]]:(.text+0xd): R_X86_64_GOTPC32_TLSDESC/R_X86_64_CODE_4_GOTPC32_TLSDESC must be used in leaq x@tlsdesc(%rip), %REG
14 leaq a@tlsdesc(%rbx), %rdx
15 call *a@tlscall(%rdx)
16 movl %fs:(%rax), %eax
18 leaq a@tlsdesc(%r16), %r20
19 call *a@tlscall(%r20)
20 movl %fs:(%rax), %eax