gas/
[binutils.git] / gas / testsuite / gas / i386 / reloc64.s
blob9b93eb280758c559e89647d64cc63678edf8608c
1 .macro bad args:vararg
2 .ifdef _bad_
3 \args
4 .endif
5 .endm
7 .macro ill args:vararg
8 # This is used to mark entries that aren't handled consistently,
9 # and thus shouldn't currently be checked for.
10 # \args
11 .endm
13 .text
14 _start:
15 movabs $xtrn, %rax
16 add $xtrn, %rax
17 mov $xtrn, %eax
18 mov $xtrn, %ax
19 mov $xtrn, %al
20 mov xtrn(%rbx), %eax
21 mov xtrn(%ebx), %eax
23 movabs $(xtrn - .), %rax
24 add $(xtrn - .), %rax
25 ill mov $(xtrn - .), %eax
26 mov $(xtrn - .), %ax
27 mov $(xtrn - .), %al
28 mov xtrn(%rip), %eax
29 bad mov xtrn(%eip), %eax
30 call xtrn
31 jrcxz xtrn
33 bad movabs $xtrn@got, %rax
34 add $xtrn@got, %rax
35 bad mov $xtrn@got, %eax
36 bad mov $xtrn@got, %ax
37 bad mov $xtrn@got, %al
38 mov xtrn@got(%rbx), %eax
39 bad mov xtrn@got(%ebx), %eax
40 bad call xtrn@got
42 movabs $xtrn@gotoff, %rax
43 bad add $xtrn@gotoff, %rax
44 bad mov $xtrn@gotoff, %eax
45 bad mov $xtrn@gotoff, %ax
46 bad mov $xtrn@gotoff, %al
47 bad mov xtrn@gotoff(%rbx), %eax
48 bad mov xtrn@gotoff(%ebx), %eax
49 bad call xtrn@gotoff
51 bad movabs $xtrn@gotpcrel, %rax
52 add $xtrn@gotpcrel, %rax
53 bad mov $xtrn@gotpcrel, %eax
54 bad mov $xtrn@gotpcrel, %ax
55 bad mov $xtrn@gotpcrel, %al
56 mov xtrn@gotpcrel(%rbx), %eax
57 bad mov xtrn@gotpcrel(%ebx), %eax
58 call xtrn@gotpcrel
60 ill movabs $_GLOBAL_OFFSET_TABLE_, %rax
61 add $_GLOBAL_OFFSET_TABLE_, %rax
62 ill add $_GLOBAL_OFFSET_TABLE_, %eax
63 ill add $_GLOBAL_OFFSET_TABLE_, %ax
64 ill add $_GLOBAL_OFFSET_TABLE_, %al
65 lea _GLOBAL_OFFSET_TABLE_(%rip), %rax #???
66 bad lea _GLOBAL_OFFSET_TABLE_(%eip), %rax
67 ill movabs $(_GLOBAL_OFFSET_TABLE_ - .), %rax
68 add $(_GLOBAL_OFFSET_TABLE_ - .), %rax
69 ill add $(_GLOBAL_OFFSET_TABLE_ - .), %eax
70 ill add $(_GLOBAL_OFFSET_TABLE_ - .), %ax
71 ill add $(_GLOBAL_OFFSET_TABLE_ - .), %al
73 bad movabs $xtrn@plt, %rax
74 add $xtrn@plt, %rax
75 bad mov $xtrn@plt, %eax
76 bad mov $xtrn@plt, %ax
77 bad mov $xtrn@plt, %al
78 mov xtrn@plt(%rbx), %eax
79 bad mov xtrn@plt(%ebx), %eax
80 call xtrn@plt
81 bad jrcxz xtrn@plt
83 bad movabs $xtrn@tlsgd, %rax
84 add $xtrn@tlsgd, %rax
85 bad mov $xtrn@tlsgd, %eax
86 bad mov $xtrn@tlsgd, %ax
87 bad mov $xtrn@tlsgd, %al
88 mov xtrn@tlsgd(%rbx), %eax
89 bad mov xtrn@tlsgd(%ebx), %eax
90 call xtrn@tlsgd
92 bad movabs $xtrn@gottpoff, %rax
93 add $xtrn@gottpoff, %rax
94 bad mov $xtrn@gottpoff, %eax
95 bad mov $xtrn@gottpoff, %ax
96 bad mov $xtrn@gottpoff, %al
97 mov xtrn@gottpoff(%rbx), %eax
98 bad mov xtrn@gottpoff(%ebx), %eax
99 call xtrn@gottpoff
101 bad movabs $xtrn@tlsld, %rax
102 add $xtrn@tlsld, %rax
103 bad mov $xtrn@tlsld, %eax
104 bad mov $xtrn@tlsld, %ax
105 bad mov $xtrn@tlsld, %al
106 mov xtrn@tlsld(%rbx), %eax
107 bad mov xtrn@tlsld(%ebx), %eax
108 call xtrn@tlsld
110 movabs $xtrn@dtpoff, %rax
111 add $xtrn@dtpoff, %rax
112 bad mov $xtrn@dtpoff, %eax
113 bad mov $xtrn@dtpoff, %ax
114 bad mov $xtrn@dtpoff, %al
115 mov xtrn@dtpoff(%rbx), %eax
116 bad mov xtrn@dtpoff(%ebx), %eax
117 bad call xtrn@dtpoff
119 movabs $xtrn@tpoff, %rax
120 add $xtrn@tpoff, %rax
121 bad mov $xtrn@tpoff, %eax
122 bad mov $xtrn@tpoff, %ax
123 bad mov $xtrn@tpoff, %al
124 mov xtrn@tpoff(%rbx), %eax
125 bad mov xtrn@tpoff(%ebx), %eax
126 bad call xtrn@tpoff
128 .data
129 .quad xtrn
130 .quad xtrn - .
131 bad .quad xtrn@got
132 .quad xtrn@gotoff
133 bad .quad xtrn@gotpcrel
134 ill .quad _GLOBAL_OFFSET_TABLE_
135 ill .quad _GLOBAL_OFFSET_TABLE_ - .
136 bad .quad xtrn@plt
137 bad .quad xtrn@tlsgd
138 bad .quad xtrn@gottpoff
139 bad .quad xtrn@tlsld
140 .quad xtrn@dtpoff
141 .quad xtrn@tpoff
143 .long xtrn
144 .long xtrn - .
145 .long xtrn@got
146 bad .long xtrn@gotoff
147 .long xtrn@gotpcrel
148 .long _GLOBAL_OFFSET_TABLE_
149 .long _GLOBAL_OFFSET_TABLE_ - .
150 .long xtrn@plt
151 .long xtrn@tlsgd
152 .long xtrn@gottpoff
153 .long xtrn@tlsld
154 .long xtrn@dtpoff
155 .long xtrn@tpoff
157 .word xtrn
158 .word xtrn - .
159 bad .word xtrn@got
160 bad .word xtrn@gotoff
161 bad .word xtrn@gotpcrel
162 ill .word _GLOBAL_OFFSET_TABLE_
163 ill .word _GLOBAL_OFFSET_TABLE_ - .
164 bad .word xtrn@plt
165 bad .word xtrn@tlsgd
166 bad .word xtrn@gottpoff
167 bad .word xtrn@tlsld
168 bad .word xtrn@dtpoff
169 bad .word xtrn@tpoff
171 .byte xtrn
172 .byte xtrn - .
173 bad .byte xtrn@got
174 bad .byte xtrn@gotoff
175 bad .byte xtrn@gotpcrel
176 ill .byte _GLOBAL_OFFSET_TABLE_
177 ill .byte _GLOBAL_OFFSET_TABLE_ - .
178 bad .byte xtrn@plt
179 bad .byte xtrn@tlsgd
180 bad .byte xtrn@gottpoff
181 bad .byte xtrn@tlsld
182 bad .byte xtrn@dtpoff
183 bad .byte xtrn@tpoff