xref: /openbmc/qemu/tests/tcg/cris/bare/check_mulx.s (revision ad1a706f)
1# mach: crisv10 crisv32
2# output: fffffffe\nffffffff\nfffffffe\n1\nfffffffe\nffffffff\nfffffffe\n1\nfffe0001\n0\nfffe0001\n0\n1\n0\n1\nfffffffe\n193eade2\n277e3a49\n193eade2\n277e3a49\nfffffffe\nffffffff\n1fffe\n0\nfffffffe\nffffffff\n1fffe\n0\n1\n0\nfffe0001\n0\nfdbdade2\nffffffff\n420fade2\n0\nfffffffe\nffffffff\n1fe\n0\nfffffffe\nffffffff\n1fe\n0\n1\n0\nfe01\n0\n1\n0\nfe01\n0\nffffd9e2\nffffffff\n2be2\n0\n0\n0\n0\n0\n
3
4 .include "testutils.inc"
5 start
6
7 .align 4
8 moveq -1,r3
9 moveq 2,r4
10 muls.d r4,r3
11 test_cc 1 0 0 0
12 checkr3 fffffffe
13 move mof,r3
14 checkr3 ffffffff
15
16 .align 4
17 moveq -1,r3
18 moveq 2,r4
19 mulu.d r4,r3
20 test_cc 0 0 1 0
21 checkr3 fffffffe
22 move mof,r3
23 checkr3 1
24
25 .align 4
26 moveq 2,r3
27 moveq -1,r4
28 muls.d r4,r3
29 test_cc 1 0 0 0
30 checkr3 fffffffe
31 move mof,r3
32 checkr3 ffffffff
33
34 .align 4
35 moveq 2,r3
36 moveq -1,r4
37 mulu.d r4,r3
38 test_cc 0 0 1 0
39 checkr3 fffffffe
40 move mof,r3
41 checkr3 1
42
43 move.d 0xffff,r4
44 move.d r4,r3
45 muls.d r4,r3
46 test_cc 0 0 1 0
47 checkr3 fffe0001
48 move mof,r3
49 checkr3 0
50
51 move.d 0xffff,r4
52 move.d r4,r3
53 mulu.d r4,r3
54 test_cc 0 0 0 0
55 checkr3 fffe0001
56 move mof,r3
57 checkr3 0
58
59 moveq -1,r4
60 move.d r4,r3
61 muls.d r4,r3
62 test_cc 0 0 0 0
63 checkr3 1
64 move mof,r3
65 checkr3 0
66
67 moveq -1,r4
68 move.d r4,r3
69 mulu.d r4,r3
70 test_cc 1 0 1 0
71 checkr3 1
72 move mof,r3
73 checkr3 fffffffe
74
75 move.d 0x5432f789,r4
76 move.d 0x78134452,r3
77 muls.d r4,r3
78 test_cc 0 0 1 0
79 checkr3 193eade2
80 move mof,r3
81 checkr3 277e3a49
82
83 move.d 0x5432f789,r4
84 move.d 0x78134452,r3
85 mulu.d r4,r3
86 test_cc 0 0 1 0
87 checkr3 193eade2
88 move mof,r3
89 checkr3 277e3a49
90
91 move.d 0xffff,r3
92 moveq 2,r4
93 muls.w r4,r3
94 test_cc 1 0 0 0
95 checkr3 fffffffe
96 move mof,r3
97 checkr3 ffffffff
98
99 moveq -1,r3
100 moveq 2,r4
101 mulu.w r4,r3
102 test_cc 0 0 0 0
103 checkr3 1fffe
104 move mof,r3
105 checkr3 0
106 nop
107
108 moveq 2,r3
109 move.d 0xffff,r4
110 muls.w r4,r3
111 test_cc 1 0 0 0
112 checkr3 fffffffe
113 move mof,r3
114 checkr3 ffffffff
115
116 moveq 2,r3
117 moveq -1,r4
118 mulu.w r4,r3
119 test_cc 0 0 0 0
120 checkr3 1fffe
121 move mof,r3
122 checkr3 0
123
124 move.d 0xffff,r4
125 move.d r4,r3
126 muls.w r4,r3
127 test_cc 0 0 0 0
128 checkr3 1
129 move mof,r3
130 checkr3 0
131
132 moveq -1,r4
133 move.d r4,r3
134 mulu.w r4,r3
135 test_cc 0 0 0 0
136 checkr3 fffe0001
137 move mof,r3
138 checkr3 0
139
140 move.d 0x5432f789,r4
141 move.d 0x78134452,r3
142 muls.w r4,r3
143 test_cc 1 0 0 0
144 checkr3 fdbdade2
145 move mof,r3
146 checkr3 ffffffff
147 nop
148
149 move.d 0x5432f789,r4
150 move.d 0x78134452,r3
151 mulu.w r4,r3
152 test_cc 0 0 0 0
153 checkr3 420fade2
154 move mof,r3
155 checkr3 0
156 nop
157
158 move.d 0xff,r3
159 moveq 2,r4
160 muls.b r4,r3
161 test_cc 1 0 0 0
162 checkr3 fffffffe
163 move mof,r3
164 checkr3 ffffffff
165
166 moveq -1,r3
167 moveq 2,r4
168 mulu.b r4,r3
169 test_cc 0 0 0 0
170 checkr3 1fe
171 move mof,r3
172 checkr3 0
173
174 moveq 2,r3
175 moveq -1,r4
176 muls.b r4,r3
177 test_cc 1 0 0 0
178 checkr3 fffffffe
179 move mof,r3
180 checkr3 ffffffff
181
182 moveq 2,r3
183 moveq -1,r4
184 mulu.b r4,r3
185 test_cc 0 0 0 0
186 checkr3 1fe
187 move mof,r3
188 checkr3 0
189
190 move.d 0xff,r4
191 move.d r4,r3
192 muls.b r4,r3
193 test_cc 0 0 0 0
194 checkr3 1
195 move mof,r3
196 checkr3 0
197 nop
198
199 moveq -1,r4
200 move.d r4,r3
201 mulu.b r4,r3
202 test_cc 0 0 0 0
203 checkr3 fe01
204 move mof,r3
205 checkr3 0
206 nop
207
208 move.d 0xfeda49ff,r4
209 move.d r4,r3
210 muls.b r4,r3
211 test_cc 0 0 0 0
212 checkr3 1
213 move mof,r3
214 checkr3 0
215 nop
216
217 move.d 0xfeda49ff,r4
218 move.d r4,r3
219 mulu.b r4,r3
220 test_cc 0 0 0 0
221 checkr3 fe01
222 move mof,r3
223 checkr3 0
224
225 move.d 0x5432f789,r4
226 move.d 0x78134452,r3
227 muls.b r4,r3
228 test_cc 1 0 0 0
229 checkr3 ffffd9e2
230 move mof,r3
231 checkr3 ffffffff
232
233 move.d 0x5432f789,r4
234 move.d 0x78134452,r3
235 mulu.b r4,r3
236 test_cc 0 0 0 0
237 checkr3 2be2
238 move mof,r3
239 checkr3 0
240
241 moveq 0,r3
242 move.d 0xf87f4aeb,r4
243 muls.d r4,r3
244 test_cc 0 1 0 0
245 checkr3 0
246 move mof,r3
247 checkr3 0
248
249 move.d 0xf87f4aeb,r3
250 moveq 0,r4
251 mulu.d r4,r3
252 test_cc 0 1 0 0
253 checkr3 0
254 move mof,r3
255 checkr3 0
256
257 quit
258