xref: /llvm-project/llvm/test/MC/X86/gotpcrel_norelax.s (revision 671f0930fe29913011df4eacc89ca19a78e8dbb0)
1# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
2# RUN: llvm-readobj -r %t.o | FileCheck %s
3
4# CHECK:     Relocations [
5# CHECK-NEXT:  Section ({{.*}}) .rela.text {
6# CHECK-NEXT:     R_X86_64_GOTPCREL mov
7# CHECK-NEXT:     R_X86_64_GOTPCREL test
8# CHECK-NEXT:     R_X86_64_GOTPCREL adc
9# CHECK-NEXT:     R_X86_64_GOTPCREL add
10# CHECK-NEXT:     R_X86_64_GOTPCREL and
11# CHECK-NEXT:     R_X86_64_GOTPCREL cmp
12# CHECK-NEXT:     R_X86_64_GOTPCREL or
13# CHECK-NEXT:     R_X86_64_GOTPCREL sbb
14# CHECK-NEXT:     R_X86_64_GOTPCREL sub
15# CHECK-NEXT:     R_X86_64_GOTPCREL xor
16# CHECK-NEXT:     R_X86_64_GOTPCREL call
17# CHECK-NEXT:     R_X86_64_GOTPCREL jmp
18# CHECK-NEXT:     R_X86_64_GOTPCREL mov
19# CHECK-NEXT:     R_X86_64_GOTPCREL test
20# CHECK-NEXT:     R_X86_64_GOTPCREL adc
21# CHECK-NEXT:     R_X86_64_GOTPCREL add
22# CHECK-NEXT:     R_X86_64_GOTPCREL and
23# CHECK-NEXT:     R_X86_64_GOTPCREL cmp
24# CHECK-NEXT:     R_X86_64_GOTPCREL or
25# CHECK-NEXT:     R_X86_64_GOTPCREL sbb
26# CHECK-NEXT:     R_X86_64_GOTPCREL sub
27# CHECK-NEXT:     R_X86_64_GOTPCREL xor
28# CHECK-NEXT:     R_X86_64_GOTPCREL mov
29# CHECK-NEXT:     R_X86_64_GOTPCREL test
30# CHECK-NEXT:     R_X86_64_GOTPCREL adc
31# CHECK-NEXT:     R_X86_64_GOTPCREL add
32# CHECK-NEXT:     R_X86_64_GOTPCREL and
33# CHECK-NEXT:     R_X86_64_GOTPCREL cmp
34# CHECK-NEXT:     R_X86_64_GOTPCREL or
35# CHECK-NEXT:     R_X86_64_GOTPCREL sbb
36# CHECK-NEXT:     R_X86_64_GOTPCREL sub
37# CHECK-NEXT:     R_X86_64_GOTPCREL xor
38# CHECK-NEXT:   }
39
40movl mov@GOTPCREL_NORELAX(%rip), %eax
41test %eax, test@GOTPCREL_NORELAX(%rip)
42adc adc@GOTPCREL_NORELAX(%rip), %eax
43add add@GOTPCREL_NORELAX(%rip), %eax
44and and@GOTPCREL_NORELAX(%rip), %eax
45cmp cmp@GOTPCREL_NORELAX(%rip), %eax
46or  or@GOTPCREL_NORELAX(%rip), %eax
47sbb sbb@GOTPCREL_NORELAX(%rip), %eax
48sub sub@GOTPCREL_NORELAX(%rip), %eax
49xor xor@GOTPCREL_NORELAX(%rip), %eax
50call *call@GOTPCREL_NORELAX(%rip)
51jmp *jmp@GOTPCREL_NORELAX(%rip)
52
53movl mov@GOTPCREL_NORELAX(%rip), %r8d
54test %r8d, test@GOTPCREL_NORELAX(%rip)
55adc adc@GOTPCREL_NORELAX(%rip), %r8d
56add add@GOTPCREL_NORELAX(%rip), %r8d
57and and@GOTPCREL_NORELAX(%rip), %r8d
58cmp cmp@GOTPCREL_NORELAX(%rip), %r8d
59or  or@GOTPCREL_NORELAX(%rip), %r8d
60sbb sbb@GOTPCREL_NORELAX(%rip), %r8d
61sub sub@GOTPCREL_NORELAX(%rip), %r8d
62xor xor@GOTPCREL_NORELAX(%rip), %r8d
63
64movq mov@GOTPCREL_NORELAX(%rip), %rax
65test %rax, test@GOTPCREL_NORELAX(%rip)
66adc adc@GOTPCREL_NORELAX(%rip), %rax
67add add@GOTPCREL_NORELAX(%rip), %rax
68and and@GOTPCREL_NORELAX(%rip), %rax
69cmp cmp@GOTPCREL_NORELAX(%rip), %rax
70or  or@GOTPCREL_NORELAX(%rip), %rax
71sbb sbb@GOTPCREL_NORELAX(%rip), %rax
72sub sub@GOTPCREL_NORELAX(%rip), %rax
73xor xor@GOTPCREL_NORELAX(%rip), %rax
74