[ValueTracking] Take into account whether zero is poison when computing CR for `ct...
[llvm-project.git] / lld / test / ELF / x86-64-tls-ie-err.s
blob3cc7cb0d41737755c7080bcfbffb3ea40716e38d
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck -DFILE=%t.o %s
5 # CHECK: error: [[FILE]]:(.text+0x2): invalid prefix with R_X86_64_CODE_4_GOTTPOFF!
6 # CHECK-NEXT: error: [[FILE]]:(.text+0x8): invalid prefix with R_X86_64_CODE_6_GOTTPOFF!
7 # CHECK-NEXT: error: [[FILE]]:(.text+0x12): R_X86_64_CODE_4_GOTTPOFF must be used in MOVQ or ADDQ instructions only
8 # CHECK-NEXT: error: [[FILE]]:(.text+0x1a): R_X86_64_CODE_6_GOTTPOFF must be used in ADDQ instructions with NDD/NF/NDD+NF only
10 ## These negative tests are to check if the invalid prefix and unsupported
11 ## instructions for TLS relocation types with APX instructions are handled as
12 ## errors.
14 .type tls0,@object
15 .section .tbss,"awT",@nobits
16 .globl tls0
17 .align 4
18 tls0:
19 .long 0
20 .size tls0, 4
22 .text
23 .globl _start
24 _start:
25 addq 0(%rip), %rax, %r16
26 .reloc .-4, R_X86_64_CODE_4_GOTTPOFF, tls0-4
28 movq 0(%rip), %r16
29 .reloc .-4, R_X86_64_CODE_6_GOTTPOFF, tls0-4
31 andq 0(%rip), %r16
32 .reloc .-4, R_X86_64_CODE_4_GOTTPOFF, tls0-4
34 andq 0(%rip), %rax, %r16
35 .reloc .-4, R_X86_64_CODE_6_GOTTPOFF, tls0-4