]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/testsuite/gas/i386/general.s
19990502 sourceware import
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / i386 / general.s
1 .psize 0
2 .text
3 # test various segment reg insns
4 push %ds
5 pushl %ds
6 pop %ds
7 popl %ds
8 mov %ds,%eax
9 movl %ds,%eax
10 movl %ds,%ax
11 mov %eax,%ds
12 movl %ax,%ds
13 movl %eax,%ds
14
15 pushw %ds
16 popw %ds
17 mov %ds,%ax
18 movw %ds,%ax
19 movw %ds,%eax
20 mov %ax,%ds
21 movw %ax,%ds
22 movw %eax,%ds
23
24 # test various pushes
25 pushl $10
26 pushw $10
27 push $10
28 pushl $1000
29 pushw $1000
30 push $1000
31 pushl 1f
32 pushw 1f
33 push 1f
34 push (1f-.)(%ebx)
35 push 1f-.
36 # these, and others like them should have no operand size prefix
37 1: lldt %cx
38 lmsw %ax
39
40 # Just to make sure these don't become illegal due to over-enthusiastic
41 # register checking
42 movsbw %al,%di
43 movsbl %al,%ecx
44 movswl %ax,%ecx
45 movzbw %al,%di
46 movzbl %al,%ecx
47 movzwl %ax,%ecx
48
49 in %dx,%al
50 in %dx,%ax
51 in %dx,%eax
52 in (%dx),%al
53 in (%dx),%ax
54 in (%dx),%eax
55 inb %dx,%al
56 inw %dx,%ax
57 inl %dx,%eax
58 inb %dx
59 inw %dx
60 inl %dx
61 inb $255
62 inw $2
63 inl $4
64 outl %eax,%dx
65 out %al, $42
66 in $13, %ax
67 # These are used in AIX.
68 inw (%dx)
69 outw (%dx)
70
71 movsb
72 cmpsw
73 scasl
74 xlatb
75 movsl %cs:(%esi),%es:(%edi)
76 setae (%ebx)
77 setaeb (%ebx)
78 setae %al
79
80 #these should give warnings
81 orb $1,%ax
82 orb $1,%eax
83 orb $1,%bx
84 orb $1,%ebx
85 fldl %st(1)
86 fstl %st(2)
87 fstpl %st(3)
88 fcoml %st(4)
89 fcompl %st(5)
90 faddp %st(1),%st
91 fmulp %st(2),%st
92 fsubp %st(3),%st
93 fsubrp %st(4),%st
94 fdivp %st(5),%st
95 fdivrp %st(6),%st
96 fadd
97 fsub
98 fmul
99 fdiv
100 fsubr
101 fdivr
102 #these should all be legal
103 btl %edx, 0x123456
104 btl %edx, %eax
105 orb $1,%al
106 orb $1,%bl
107 movl 17,%eax
108 mov 17,%eax
109 inw %dx,%ax
110 inl %dx,%eax
111 inw (%dx),%ax
112 inl (%dx),%eax
113 in (%dx),%al
114 in (%dx),%ax
115 in (%dx),%eax
116 movzbl (%edi,%esi),%edx
117 movzbl 28(%ebp),%eax
118 movzbl %al,%eax
119 movzbl %cl,%esi
120 xlat %es:(%ebx)
121 xlat
122 xlatb
123 1: fstp %st(0)
124 loop 1b
125 divb %cl
126 divw %cx
127 divl %ecx
128 div %cl
129 div %cx
130 div %ecx
131 div %cl,%al
132 div %cx,%ax
133 div %ecx,%eax
134 mov %si,%ds
135 movl %si,%ds # warning here
136 pushl %ds
137 push %ds
138 mov 0,%al
139 mov 0x10000,%ax
140 mov %eax,%ebx
141 pushf
142 pushfl
143 pushfw
144 popf
145 popfl
146 popfw
147 mov %esi,(,%ebx,1)
148 andb $~0x80,foo
149
150 # Force a good alignment.
151 .word 0
152 .byte 0