x86: make sure all PUSH/POP honor DefaultSize
[deliverable/binutils-gdb.git] / gas / testsuite / gas / i386 / general.l
1 .*: Assembler messages:
2 .*:7: Warning:.*
3 .*:9: Warning:.*
4 .*:11: Warning:.*
5 .*:13: Warning:.*
6 .*:15: Warning:.*
7 .*:21: Warning:.*
8 .*:23: Warning:.*
9 .*:25: Warning:.*
10 .*:27: Warning:.*
11 .*:29: Warning:.*
12 .*:39: Warning:.*
13 .*:41: Warning:.*
14 .*:48: Warning:.*
15 .*:51: Warning:.*
16 .*:124: Warning:.*
17 .*:125: Warning:.*
18 .*:126: Warning:.*
19 .*:127: Warning:.*
20 .*:128: Warning:.*
21 .*:129: Warning:.*
22 .*:130: Warning:.*
23 .*:131: Warning:.*
24 .*:132: Warning:.*
25 .*:133: Warning:.*
26 .*:134: Warning:.*
27 .*:139: Warning:.*
28 .*:140: Warning:.*
29 .*:141: Warning:.*
30 .*:142: Warning:.*
31 .*:143: Warning:.*
32 .*:144: Warning:.*
33 .*:178: Warning:.*
34 .*:224: Warning:.*
35 .*:233: Warning:.*
36 .*:234: Warning:.*
37 .*:238: Warning:.*
38 .*:239: Warning:.*
39 1 .psize 0
40 2 .text
41 3 #test jumps and calls
42 4 0000 EBFE 1: jmp 1b
43 5 0002 E9((FC|F9)FFFF FF|000000 00) jmp xxx
44 6 0007 FF250000 0000 jmp \*xxx
45 7 000d FF250000 0000 jmp xxx\(,1\)
46 .*Warning:.*
47 8 0013 FFE7 jmp \*%edi
48 9 0015 FFE7 jmp %edi
49 .*Warning:.*
50 10 0017 FF27 jmp \*\(%edi\)
51 11 0019 FF27 jmp \(%edi\)
52 .*Warning:.*
53 12 001b FF2CBD00 000000 ljmp \*xxx\(,%edi,4\)
54 13 0022 FF2CBD00 000000 ljmp xxx\(,%edi,4\)
55 .*Warning:.*
56 14 0029 FF2D0000 0000 ljmp \*xxx
57 15 002f FF2D0000 0000 ljmp xxx\(,1\)
58 .*Warning:.*
59 16 0035 EA000000 003412 ljmp \$0x1234,\$xxx
60 17
61 18 003c E8BFFFFF FF call 1b
62 19 0041 E8((FC|BA)FFFF FF|000000 00) call xxx
63 20 0046 FF150000 0000 call \*xxx
64 21 004c FF150000 0000 call xxx\(,1\)
65 .*Warning:.*
66 22 0052 FFD7 call \*%edi
67 23 0054 FFD7 call %edi
68 .*Warning:.*
69 24 0056 FF17 call \*\(%edi\)
70 25 0058 FF17 call \(%edi\)
71 .*Warning:.*
72 26 005a FF1CBD00 000000 lcall \*xxx\(,%edi,4\)
73 27 0061 FF1CBD00 000000 lcall xxx\(,%edi,4\)
74 .*Warning:.*
75 28 0068 FF1D0000 0000 lcall \*xxx
76 29 006e FF1D0000 0000 lcall xxx\(,1\)
77 .*Warning:.*
78 30 0074 9A000000 003412 lcall \$0x1234,\$xxx
79 31
80 32 # test various segment reg insns
81 33 007b 1E push %ds
82 34 007c 1E pushl %ds
83 35 007d 1F pop %ds
84 36 007e 1F popl %ds
85 37 007f 8CD8 mov %ds,%eax
86 38 0081 8CD8 movl %ds,%eax
87 39 0083 8CD8 movl %ds,%ax
88 .*Warning:.*
89 40 0085 8ED8 mov %eax,%ds
90 41 0087 8ED8 movl %ax,%ds
91 .*Warning:.*
92 42 0089 8ED8 movl %eax,%ds
93 43
94 44 008b 661E pushw %ds
95 45 008d 661F popw %ds
96 46 008f 668CD8 mov %ds,%ax
97 47 0092 668CD8 movw %ds,%ax
98 48 0095 668CD8 movw %ds,%eax
99 .*Warning:.*
100 49 0098 8ED8 mov %ax,%ds
101 50 009a 8ED8 movw %ax,%ds
102 51 009c 8ED8 movw %eax,%ds
103 .*Warning:.*
104 52
105 53 # test various pushes
106 54 009e 6A0A pushl \$10
107 55 00a0 666A0A pushw \$10
108 56 00a3 6A0A push \$10
109 57 00a5 68E80300 00 pushl \$1000
110 58 00aa 6668E803 pushw \$1000
111 59 00ae 68E80300 00 push \$1000
112 60 00b3 FF35D200 0000 pushl 1f
113 61 00b9 66FF35D2 000000 pushw 1f
114 62 00c0 FF35D200 0000 push 1f
115 63 00c6 FFB30C00 0000 push \(1f-.\)\(%ebx\)
116 64 00cc FF350600 0000 push 1f-.
117 65 # these, and others like them should have no operand size prefix
118 66 00d2 0F00D1 1: lldt %cx
119 67 00d5 0F01F0 lmsw %ax
120 68
121 69 # Just to make sure these don't become illegal due to over-enthusiastic
122 70 # register checking
123 71 00d8 660FBEF8 movsbw %al,%di
124 72 00dc 0FBEC8 movsbl %al,%ecx
125 73 00df 0FBFC8 movswl %ax,%ecx
126 74 00e2 660FB6F8 movzbw %al,%di
127 75 00e6 0FB6C8 movzbl %al,%ecx
128 76 00e9 0FB7C8 movzwl %ax,%ecx
129 77
130 78 00ec EC in %dx,%al
131 79 00ed 66ED in %dx,%ax
132 80 00ef ED in %dx,%eax
133 81 00f0 EC in \(%dx\),%al
134 82 00f1 66ED in \(%dx\),%ax
135 83 00f3 ED in \(%dx\),%eax
136 84 00f4 EC inb %dx,%al
137 85 00f5 66ED inw %dx,%ax
138 86 00f7 ED inl %dx,%eax
139 87 00f8 EC inb %dx
140 88 00f9 66ED inw %dx
141 89 00fb ED inl %dx
142 90 00fc E4FF inb \$255
143 91 00fe 66E502 inw \$2
144 92 0101 E504 inl \$4
145 93 0103 66E50D in \$13, %ax
146 94 0106 EE out %al,%dx
147 95 0107 66EF out %ax,%dx
148 96 0109 EF out %eax,%dx
149 97 010a EE out %al,\(%dx\)
150 98 010b 66EF out %ax,\(%dx\)
151 99 010d EF out %eax,\(%dx\)
152 100 010e EE outb %al,%dx
153 101 010f 66EF outw %ax,%dx
154 102 0111 EF outl %eax,%dx
155 103 0112 EE outb %dx
156 104 0113 66EF outw %dx
157 105 0115 EF outl %dx
158 106 0116 E6FF outb \$255
159 107 0118 66E702 outw \$2
160 108 011b E704 outl \$4
161 109 011d 66E70D out %ax, \$13
162 110 # These are used in AIX.
163 111 0120 66ED inw \(%dx\)
164 112 0122 66EF outw \(%dx\)
165 113
166 114 0124 A4 movsb
167 115 0125 66A7 cmpsw
168 116 0127 AF scasl
169 117 0128 D7 xlatb
170 118 0129 2EA5 movsl %cs:\(%esi\),%es:\(%edi\)
171 119 012b 0F9303 setae \(%ebx\)
172 120 012e 0F9303 setaeb \(%ebx\)
173 121 0131 0F93C0 setae %al
174 122
175 123 #these should give warnings
176 124 0134 0C01 orb \$1,%ax
177 .*Warning:.*
178 125 0136 0C01 orb \$1,%eax
179 .*Warning:.*
180 126 0138 80CB01 orb \$1,%bx
181 .*Warning:.*
182 127 013b 80CB01 orb \$1,%ebx
183 .*Warning:.*
184 128 013e D9C1 fldl %st\(1\)
185 .*Warning:.*
186 129 0140 DDD2 fstl %st\(2\)
187 .*Warning:.*
188 130 0142 DDDB fstpl %st\(3\)
189 .*Warning:.*
190 131 0144 D8D4 fcoml %st\(4\)
191 .*Warning:.*
192 132 0146 D8DD fcompl %st\(5\)
193 .*Warning:.*
194 133 0148 DEC1 faddp %st\(1\),%st
195 .*Warning:.*
196 134 014a DECA fmulp %st\(2\),%st
197 .*Warning:.*
198 135 014c D8E3 fsub %st\(3\),%st
199 136 014e D8EC fsubr %st\(4\),%st
200 137 0150 D8F5 fdiv %st\(5\),%st
201 138 0152 D8FE fdivr %st\(6\),%st
202 139 0154 DEC1 fadd
203 .*Warning:.*
204 140 0156 DEE1 fsub
205 .*Warning:.*
206 141 0158 DEC9 fmul
207 .*Warning:.*
208 142 015a DEF1 fdiv
209 .*Warning:.*
210 143 015c DEE9 fsubr
211 .*Warning:.*
212 144 015e DEF9 fdivr
213 .*Warning:.*
214 145 #these should all be legal
215 146 0160 0FA31556 341200 btl %edx, 0x123456
216 147 0167 0FA3D0 btl %edx, %eax
217 148 016a 0C01 orb \$1,%al
218 149 016c 80CB01 orb \$1,%bl
219 150 016f A1110000 00 movl 17,%eax
220 151 0174 A1110000 00 mov 17,%eax
221 152 0179 66ED inw %dx,%ax
222 153 017b ED inl %dx,%eax
223 154 017c 66ED inw \(%dx\),%ax
224 155 017e ED inl \(%dx\),%eax
225 156 017f EC in \(%dx\),%al
226 157 0180 66ED in \(%dx\),%ax
227 158 0182 ED in \(%dx\),%eax
228 159 0183 0FB61437 movzbl \(%edi,%esi\),%edx
229 160 0187 0FB6451C movzbl 28\(%ebp\),%eax
230 161 018b 0FB6C0 movzbl %al,%eax
231 162 018e 0FB6F1 movzbl %cl,%esi
232 163 0191 26D7 xlat %es:\(%ebx\)
233 164 0193 D7 xlat
234 165 0194 D7 xlatb
235 166 0195 DDD8 1: fstp %st\(0\)
236 167 0197 E2FC loop 1b
237 168 0199 F6F1 divb %cl
238 169 019b 66F7F1 divw %cx
239 170 019e F7F1 divl %ecx
240 171 01a0 F6F1 div %cl
241 172 01a2 66F7F1 div %cx
242 173 01a5 F7F1 div %ecx
243 174 01a7 F6F1 div %cl,%al
244 175 01a9 66F7F1 div %cx,%ax
245 176 01ac F7F1 div %ecx,%eax
246 177 01ae 8EDE mov %si,%ds
247 178 01b0 8EDE movl %si,%ds # warning here
248 .*Warning:.*
249 179 01b2 1E pushl %ds
250 180 01b3 1E push %ds
251 181 01b4 A0000000 00 mov 0,%al
252 182 01b9 66A10000 0100 mov 0x10000,%ax
253 183 01bf 89C3 mov %eax,%ebx
254 184 01c1 9C pushf
255 185 01c2 9C pushfl
256 186 01c3 669C pushfw
257 187 01c5 9D popf
258 188 01c6 9D popfl
259 189 01c7 669D popfw
260 190 01c9 89341D00 000000 mov %esi,\(,%ebx,1\)
261 191 01d0 80250000 00007F andb \$~0x80,foo
262 192
263 193 01d7 6683E0FE and \$0xfffe,%ax
264 194 01db 662500FF and \$0xff00,%ax
265 195 01df 25FEFF00 00 and \$0xfffe,%eax
266 196 01e4 2500FF00 00 and \$0xff00,%eax
267 197 01e9 83E0FE and \$0xfffffffe,%eax
268 198
269 199 .code16
270 200 01ec 83E0FE and \$0xfffe,%ax
271 201 01ef 2500FF and \$0xff00,%ax
272 202 01f2 6625FEFF 0000 and \$0xfffe,%eax
273 203 01f8 662500FF 0000 and \$0xff00,%eax
274 204 01fe 6683E0FE and \$0xfffffffe,%eax
275 205
276 206 #check 16-bit code auto address prefix
277 207 .code16gcc
278 208 0202 67668D95 00FFFFFF leal -256\(%ebp\),%edx
279 209 020a 6788857F FFFFFF mov %al,-129\(%ebp\)
280 210 0211 67886580 mov %ah,-128\(%ebp\)
281 211 0215 67668D9D 20F9FFFF leal -1760\(%ebp\),%ebx
282 212 021d 67668984 248C0000 movl %eax,140\(%esp\)
283 212 00
284 213
285 214 .code32
286 215 # Make sure that we won't remove movzb by accident.
287 216 0226 660FB6F8 movzb %al,%di
288 217 022a 0FB6C8 movzb %al,%ecx
289 218
290 219 .code16gcc
291 [ ]*[1-9][0-9]*[ ]*# Except for IRET use 32-bit implicit stack accesses by default.
292 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66E8FAFF FFFF[ ]+call \.
293 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66FF17[ ]+call \*\(%bx\)
294 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66C80000 00[ ]+enter \$0,\$0
295 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+CF[ ]+iret
296 .*Warning:.*16-bit.*iret.*
297 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66FF1F[ ]+lcall \*\(%bx\)
298 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+669A0000 00000000[ ]+lcall \$0,\$0
299 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66C9[ ]+leave
300 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66CB[ ]+lret
301 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66CA0000[ ]+lret \$0
302 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+666A00[ ]+push \$0
303 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66683412 0000[ ]+push \$0x1234
304 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66FF37[ ]+push \(%bx\)
305 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6606[ ]+push %es
306 .*Warning:.*32-bit.*push.*
307 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+660FA0[ ]+push %fs
308 .*Warning:.*32-bit.*push.*
309 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6660[ ]+pusha
310 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+669C[ ]+pushf
311 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+668F07[ ]+pop \(%bx\)
312 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6607[ ]+pop %es
313 .*Warning:.*32-bit.*pop.*
314 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+660FA1[ ]+pop %fs
315 .*Warning:.*32-bit.*pop.*
316 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6661[ ]+popa
317 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+669D[ ]+popf
318 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66C3[ ]+ret
319 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66C20000[ ]+ret \$0
320 [ ]*[1-9][0-9]*[ ]*
321 [ ]*[1-9][0-9]*[ ]*# However use 16-bit branches not accessing the stack by default.
322 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+77FE[ ]+ja \.
323 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+0F873012[ ]+ja \.\+0x1234
324 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+E3FE[ ]+jcxz \.
325 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+EBFE[ ]+jmp \.
326 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+E93112[ ]+jmp \.\+0x1234
327 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+FF27[ ]+jmp \*\(%bx\)
328 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+FF2F[ ]+ljmp \*\(%bx\)
329 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+EA000000 00[ ]+ljmp \$0,\$0
330 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+E2FE[ ]+loop \.
331 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+0F05[ ]+syscall
332 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+0F34[ ]+sysenter
333 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+0F35[ ]+sysexit
334 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+0F07[ ]+sysret
335 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+C7F8FCFF[ ]+xbegin \.
336 [ ]*[1-9][0-9]*[ ]*
337 [ ]*[1-9][0-9]*[ ]*# Use 16-bit layout by default for fldenv.
338 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+67D920[ ]+fldenv \(%eax\)
339 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+67D920[ ]+fldenvs \(%eax\)
340 [ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6766D920[ ]+fldenvl \(%eax\)
341 [ ]*[1-9][0-9]*[ ]*
342 [ ]*[1-9][0-9]*[ ]*# Force a good alignment.
343 [ ]*[1-9][0-9]*[ ]+[0-9a-f ]+\.p2align 4,0
344 #pass
This page took 0.039801 seconds and 4 git commands to generate.