Automatic date update in version.in
[binutils-gdb.git] / sim / testsuite / frv / cmmulhu.cgs
blob9e8fbb881ccbe943a2f9ee8dd51da0057240d9a7
1 # frv testcase for cmmulhu $GRi,$GRj,$GRk,$CCi,$cond
2 # mach: all
4         .include "testutils.inc"
6         start
8         .global cmmulhu
9 cmmulhu:
10         set_spr_immed   0x1b1b,cccr
12         set_fr_iimmed   3,2,fr7         ; multiply small numbers
13         set_fr_iimmed   2,3,fr8
14         cmmulhu         fr7,fr8,acc0,cc0,1
15         test_accg_immed         0,accg0
16         test_acc_immed  6,acc0
17         test_accg_immed         0,accg1
18         test_acc_immed  6,acc1
20         set_fr_iimmed   1,2,fr7         ; multiply by 1
21         set_fr_iimmed   2,1,fr8
22         cmmulhu         fr7,fr8,acc0,cc0,1
23         test_accg_immed         0,accg0
24         test_acc_immed  2,acc0
25         test_accg_immed         0,accg1
26         test_acc_immed  2,acc1
28         set_fr_iimmed   0,2,fr7         ; multiply by 0
29         set_fr_iimmed   2,0,fr8
30         cmmulhu         fr7,fr8,acc0,cc0,1
31         test_accg_immed         0,accg0
32         test_acc_immed  0,acc0
33         test_accg_immed         0,accg1
34         test_acc_immed  0,acc1
36         set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
37         set_fr_iimmed   2,0x3fff,fr8
38         cmmulhu         fr7,fr8,acc0,cc0,1
39         test_accg_immed         0,accg0
40         test_acc_limmed 0x0000,0x7ffe,acc0
41         test_accg_immed         0,accg1
42         test_acc_limmed 0x0000,0x7ffe,acc1
44         set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
45         set_fr_iimmed   2,0x4000,fr8
46         cmmulhu         fr7,fr8,acc0,cc4,1
47         test_accg_immed         0,accg0
48         test_acc_limmed 0x0000,0x8000,acc0
49         test_accg_immed         0,accg1
50         test_acc_limmed 0x0000,0x8000,acc1
52         set_fr_iimmed   0x8000,2,fr7    ; 17 bit result
53         set_fr_iimmed   2,0x8000,fr8
54         cmmulhu         fr7,fr8,acc0,cc4,1
55         test_accg_immed         0,accg0
56         test_acc_immed  0x00010000,acc0
57         test_accg_immed         0,accg1
58         test_acc_immed  0x00010000,acc1
60         set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
61         set_fr_iimmed   0x7fff,0x7fff,fr8
62         cmmulhu         fr7,fr8,acc0,cc4,1
63         test_accg_immed         0,accg0
64         test_acc_immed  0x3fff0001,acc0
65         test_accg_immed         0,accg1
66         test_acc_immed  0x3fff0001,acc1
68         set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
69         set_fr_iimmed   0x8000,0x8000,fr8
70         cmmulhu         fr7,fr8,acc0,cc4,1
71         test_accg_immed         0,accg0
72         test_acc_limmed 0x4000,0x0000,acc0
73         test_accg_immed         0,accg1
74         test_acc_limmed 0x4000,0x0000,acc1
76         set_fr_iimmed   0xffff,0xffff,fr7       ; max positive result
77         set_fr_iimmed   0xffff,0xffff,fr8
78         cmmulhu         fr7,fr8,acc0,cc4,1
79         test_accg_immed         0,accg0
80         test_acc_limmed 0xfffe,0x0001,acc0
81         test_accg_immed         0,accg1
82         test_acc_limmed 0xfffe,0x0001,acc1
84         set_fr_iimmed   3,2,fr7         ; multiply small numbers
85         set_fr_iimmed   2,3,fr8
86         cmmulhu         fr7,fr8,acc0,cc1,0
87         test_accg_immed         0,accg0
88         test_acc_immed  6,acc0
89         test_accg_immed         0,accg1
90         test_acc_immed  6,acc1
92         set_fr_iimmed   1,2,fr7         ; multiply by 1
93         set_fr_iimmed   2,1,fr8
94         cmmulhu         fr7,fr8,acc0,cc1,0
95         test_accg_immed         0,accg0
96         test_acc_immed  2,acc0
97         test_accg_immed         0,accg1
98         test_acc_immed  2,acc1
100         set_fr_iimmed   0,2,fr7         ; multiply by 0
101         set_fr_iimmed   2,0,fr8
102         cmmulhu         fr7,fr8,acc0,cc1,0
103         test_accg_immed         0,accg0
104         test_acc_immed  0,acc0
105         test_accg_immed         0,accg1
106         test_acc_immed  0,acc1
108         set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
109         set_fr_iimmed   2,0x3fff,fr8
110         cmmulhu         fr7,fr8,acc0,cc1,0
111         test_accg_immed         0,accg0
112         test_acc_limmed 0x0000,0x7ffe,acc0
113         test_accg_immed         0,accg1
114         test_acc_limmed 0x0000,0x7ffe,acc1
116         set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
117         set_fr_iimmed   2,0x4000,fr8
118         cmmulhu         fr7,fr8,acc0,cc5,0
119         test_accg_immed         0,accg0
120         test_acc_limmed 0x0000,0x8000,acc0
121         test_accg_immed         0,accg1
122         test_acc_limmed 0x0000,0x8000,acc1
124         set_fr_iimmed   0x8000,2,fr7    ; 17 bit result
125         set_fr_iimmed   2,0x8000,fr8
126         cmmulhu         fr7,fr8,acc0,cc5,0
127         test_accg_immed         0,accg0
128         test_acc_immed  0x00010000,acc0
129         test_accg_immed         0,accg1
130         test_acc_immed  0x00010000,acc1
132         set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
133         set_fr_iimmed   0x7fff,0x7fff,fr8
134         cmmulhu         fr7,fr8,acc0,cc5,0
135         test_accg_immed         0,accg0
136         test_acc_immed  0x3fff0001,acc0
137         test_accg_immed         0,accg1
138         test_acc_immed  0x3fff0001,acc1
140         set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
141         set_fr_iimmed   0x8000,0x8000,fr8
142         cmmulhu         fr7,fr8,acc0,cc5,0
143         test_accg_immed         0,accg0
144         test_acc_limmed 0x4000,0x0000,acc0
145         test_accg_immed         0,accg1
146         test_acc_limmed 0x4000,0x0000,acc1
148         set_fr_iimmed   0xffff,0xffff,fr7       ; max positive result
149         set_fr_iimmed   0xffff,0xffff,fr8
150         cmmulhu         fr7,fr8,acc0,cc5,0
151         test_accg_immed         0,accg0
152         test_acc_limmed 0xfffe,0x0001,acc0
153         test_accg_immed         0,accg1
154         test_acc_limmed 0xfffe,0x0001,acc1
156         set_accg_immed  0x00000011,accg0
157         set_acc_immed   0x11111111,acc0
158         set_accg_immed  0x00000022,accg1
159         set_acc_immed   0x22222222,acc1
160         set_fr_iimmed   3,2,fr7         ; multiply small numbers
161         set_fr_iimmed   2,3,fr8
162         cmmulhu         fr7,fr8,acc0,cc0,0
163         test_accg_immed         0x00000011,accg0
164         test_acc_immed  0x11111111,acc0
165         test_accg_immed         0x00000022,accg1
166         test_acc_immed  0x22222222,acc1
168         set_fr_iimmed   1,2,fr7         ; multiply by 1
169         set_fr_iimmed   2,1,fr8
170         cmmulhu         fr7,fr8,acc0,cc0,0
171         test_accg_immed         0x00000011,accg0
172         test_acc_immed  0x11111111,acc0
173         test_accg_immed         0x00000022,accg1
174         test_acc_immed  0x22222222,acc1
176         set_fr_iimmed   0,2,fr7         ; multiply by 0
177         set_fr_iimmed   2,0,fr8
178         cmmulhu         fr7,fr8,acc0,cc0,0
179         test_accg_immed         0x00000011,accg0
180         test_acc_immed  0x11111111,acc0
181         test_accg_immed         0x00000022,accg1
182         test_acc_immed  0x22222222,acc1
184         set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
185         set_fr_iimmed   2,0x3fff,fr8
186         cmmulhu         fr7,fr8,acc0,cc0,0
187         test_accg_immed         0x00000011,accg0
188         test_acc_immed  0x11111111,acc0
189         test_accg_immed         0x00000022,accg1
190         test_acc_immed  0x22222222,acc1
192         set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
193         set_fr_iimmed   2,0x4000,fr8
194         cmmulhu         fr7,fr8,acc0,cc4,0
195         test_accg_immed         0x00000011,accg0
196         test_acc_immed  0x11111111,acc0
197         test_accg_immed         0x00000022,accg1
198         test_acc_immed  0x22222222,acc1
200         set_fr_iimmed   0x8000,2,fr7    ; 17 bit result
201         set_fr_iimmed   2,0x8000,fr8
202         cmmulhu         fr7,fr8,acc0,cc4,0
203         test_accg_immed         0x00000011,accg0
204         test_acc_immed  0x11111111,acc0
205         test_accg_immed         0x00000022,accg1
206         test_acc_immed  0x22222222,acc1
208         set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
209         set_fr_iimmed   0x7fff,0x7fff,fr8
210         cmmulhu         fr7,fr8,acc0,cc4,0
211         test_accg_immed         0x00000011,accg0
212         test_acc_immed  0x11111111,acc0
213         test_accg_immed         0x00000022,accg1
214         test_acc_immed  0x22222222,acc1
216         set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
217         set_fr_iimmed   0x8000,0x8000,fr8
218         cmmulhu         fr7,fr8,acc0,cc4,0
219         test_accg_immed         0x00000011,accg0
220         test_acc_immed  0x11111111,acc0
221         test_accg_immed         0x00000022,accg1
222         test_acc_immed  0x22222222,acc1
224         set_fr_iimmed   0xffff,0xffff,fr7       ; max positive result
225         set_fr_iimmed   0xffff,0xffff,fr8
226         cmmulhu         fr7,fr8,acc0,cc4,0
227         test_accg_immed         0x00000011,accg0
228         test_acc_immed  0x11111111,acc0
229         test_accg_immed         0x00000022,accg1
230         test_acc_immed  0x22222222,acc1
232         set_accg_immed  0x00000011,accg0
233         set_acc_immed   0x11111111,acc0
234         set_accg_immed  0x00000022,accg1
235         set_acc_immed   0x22222222,acc1
236         set_fr_iimmed   3,2,fr7         ; multiply small numbers
237         set_fr_iimmed   2,3,fr8
238         cmmulhu         fr7,fr8,acc0,cc1,1
239         test_accg_immed         0x00000011,accg0
240         test_acc_immed  0x11111111,acc0
241         test_accg_immed         0x00000022,accg1
242         test_acc_immed  0x22222222,acc1
244         set_fr_iimmed   1,2,fr7         ; multiply by 1
245         set_fr_iimmed   2,1,fr8
246         cmmulhu         fr7,fr8,acc0,cc1,1
247         test_accg_immed         0x00000011,accg0
248         test_acc_immed  0x11111111,acc0
249         test_accg_immed         0x00000022,accg1
250         test_acc_immed  0x22222222,acc1
252         set_fr_iimmed   0,2,fr7         ; multiply by 0
253         set_fr_iimmed   2,0,fr8
254         cmmulhu         fr7,fr8,acc0,cc1,1
255         test_accg_immed         0x00000011,accg0
256         test_acc_immed  0x11111111,acc0
257         test_accg_immed         0x00000022,accg1
258         test_acc_immed  0x22222222,acc1
260         set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
261         set_fr_iimmed   2,0x3fff,fr8
262         cmmulhu         fr7,fr8,acc0,cc1,1
263         test_accg_immed         0x00000011,accg0
264         test_acc_immed  0x11111111,acc0
265         test_accg_immed         0x00000022,accg1
266         test_acc_immed  0x22222222,acc1
268         set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
269         set_fr_iimmed   2,0x4000,fr8
270         cmmulhu         fr7,fr8,acc0,cc5,1
271         test_accg_immed         0x00000011,accg0
272         test_acc_immed  0x11111111,acc0
273         test_accg_immed         0x00000022,accg1
274         test_acc_immed  0x22222222,acc1
276         set_fr_iimmed   0x8000,2,fr7    ; 17 bit result
277         set_fr_iimmed   2,0x8000,fr8
278         cmmulhu         fr7,fr8,acc0,cc5,1
279         test_accg_immed         0x00000011,accg0
280         test_acc_immed  0x11111111,acc0
281         test_accg_immed         0x00000022,accg1
282         test_acc_immed  0x22222222,acc1
284         set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
285         set_fr_iimmed   0x7fff,0x7fff,fr8
286         cmmulhu         fr7,fr8,acc0,cc5,1
287         test_accg_immed         0x00000011,accg0
288         test_acc_immed  0x11111111,acc0
289         test_accg_immed         0x00000022,accg1
290         test_acc_immed  0x22222222,acc1
292         set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
293         set_fr_iimmed   0x8000,0x8000,fr8
294         cmmulhu         fr7,fr8,acc0,cc5,1
295         test_accg_immed         0x00000011,accg0
296         test_acc_immed  0x11111111,acc0
297         test_accg_immed         0x00000022,accg1
298         test_acc_immed  0x22222222,acc1
300         set_fr_iimmed   0xffff,0xffff,fr7       ; max positive result
301         set_fr_iimmed   0xffff,0xffff,fr8
302         cmmulhu         fr7,fr8,acc0,cc5,1
303         test_accg_immed         0x00000011,accg0
304         test_acc_immed  0x11111111,acc0
305         test_accg_immed         0x00000022,accg1
306         test_acc_immed  0x22222222,acc1
308         set_accg_immed  0x00000011,accg0
309         set_acc_immed   0x11111111,acc0
310         set_accg_immed  0x00000022,accg1
311         set_acc_immed   0x22222222,acc1
312         set_fr_iimmed   3,2,fr7         ; multiply small numbers
313         set_fr_iimmed   2,3,fr8
314         cmmulhu         fr7,fr8,acc0,cc2,1
315         test_accg_immed         0x00000011,accg0
316         test_acc_immed  0x11111111,acc0
317         test_accg_immed         0x00000022,accg1
318         test_acc_immed  0x22222222,acc1
320         set_fr_iimmed   1,2,fr7         ; multiply by 1
321         set_fr_iimmed   2,1,fr8
322         cmmulhu         fr7,fr8,acc0,cc2,0
323         test_accg_immed         0x00000011,accg0
324         test_acc_immed  0x11111111,acc0
325         test_accg_immed         0x00000022,accg1
326         test_acc_immed  0x22222222,acc1
328         set_fr_iimmed   0,2,fr7         ; multiply by 0
329         set_fr_iimmed   2,0,fr8
330         cmmulhu         fr7,fr8,acc0,cc2,1
331         test_accg_immed         0x00000011,accg0
332         test_acc_immed  0x11111111,acc0
333         test_accg_immed         0x00000022,accg1
334         test_acc_immed  0x22222222,acc1
336         set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
337         set_fr_iimmed   2,0x3fff,fr8
338         cmmulhu         fr7,fr8,acc0,cc2,0
339         test_accg_immed         0x00000011,accg0
340         test_acc_immed  0x11111111,acc0
341         test_accg_immed         0x00000022,accg1
342         test_acc_immed  0x22222222,acc1
344         set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
345         set_fr_iimmed   2,0x4000,fr8
346         cmmulhu         fr7,fr8,acc0,cc6,1
347         test_accg_immed         0x00000011,accg0
348         test_acc_immed  0x11111111,acc0
349         test_accg_immed         0x00000022,accg1
350         test_acc_immed  0x22222222,acc1
352         set_fr_iimmed   0x8000,2,fr7    ; 17 bit result
353         set_fr_iimmed   2,0x8000,fr8
354         cmmulhu         fr7,fr8,acc0,cc6,0
355         test_accg_immed         0x00000011,accg0
356         test_acc_immed  0x11111111,acc0
357         test_accg_immed         0x00000022,accg1
358         test_acc_immed  0x22222222,acc1
360         set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
361         set_fr_iimmed   0x7fff,0x7fff,fr8
362         cmmulhu         fr7,fr8,acc0,cc6,1
363         test_accg_immed         0x00000011,accg0
364         test_acc_immed  0x11111111,acc0
365         test_accg_immed         0x00000022,accg1
366         test_acc_immed  0x22222222,acc1
368         set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
369         set_fr_iimmed   0x8000,0x8000,fr8
370         cmmulhu         fr7,fr8,acc0,cc6,0
371         test_accg_immed         0x00000011,accg0
372         test_acc_immed  0x11111111,acc0
373         test_accg_immed         0x00000022,accg1
374         test_acc_immed  0x22222222,acc1
376         set_fr_iimmed   0xffff,0xffff,fr7       ; max positive result
377         set_fr_iimmed   0xffff,0xffff,fr8
378         cmmulhu         fr7,fr8,acc0,cc6,1
379         test_accg_immed         0x00000011,accg0
380         test_acc_immed  0x11111111,acc0
381         test_accg_immed         0x00000022,accg1
382         test_acc_immed  0x22222222,acc1
384         set_accg_immed  0x00000011,accg0
385         set_acc_immed   0x11111111,acc0
386         set_accg_immed  0x00000022,accg1
387         set_acc_immed   0x22222222,acc1
388         set_fr_iimmed   3,2,fr7         ; multiply small numbers
389         set_fr_iimmed   2,3,fr8
390         cmmulhu         fr7,fr8,acc0,cc3,1
391         test_accg_immed         0x00000011,accg0
392         test_acc_immed  0x11111111,acc0
393         test_accg_immed         0x00000022,accg1
394         test_acc_immed  0x22222222,acc1
396         set_fr_iimmed   1,2,fr7         ; multiply by 1
397         set_fr_iimmed   2,1,fr8
398         cmmulhu         fr7,fr8,acc0,cc3,0
399         test_accg_immed         0x00000011,accg0
400         test_acc_immed  0x11111111,acc0
401         test_accg_immed         0x00000022,accg1
402         test_acc_immed  0x22222222,acc1
404         set_fr_iimmed   0,2,fr7         ; multiply by 0
405         set_fr_iimmed   2,0,fr8
406         cmmulhu         fr7,fr8,acc0,cc3,1
407         test_accg_immed         0x00000011,accg0
408         test_acc_immed  0x11111111,acc0
409         test_accg_immed         0x00000022,accg1
410         test_acc_immed  0x22222222,acc1
412         set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
413         set_fr_iimmed   2,0x3fff,fr8
414         cmmulhu         fr7,fr8,acc0,cc3,0
415         test_accg_immed         0x00000011,accg0
416         test_acc_immed  0x11111111,acc0
417         test_accg_immed         0x00000022,accg1
418         test_acc_immed  0x22222222,acc1
420         set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
421         set_fr_iimmed   2,0x4000,fr8
422         cmmulhu         fr7,fr8,acc0,cc7,1
423         test_accg_immed         0x00000011,accg0
424         test_acc_immed  0x11111111,acc0
425         test_accg_immed         0x00000022,accg1
426         test_acc_immed  0x22222222,acc1
428         set_fr_iimmed   0x8000,2,fr7    ; 17 bit result
429         set_fr_iimmed   2,0x8000,fr8
430         cmmulhu         fr7,fr8,acc0,cc7,0
431         test_accg_immed         0x00000011,accg0
432         test_acc_immed  0x11111111,acc0
433         test_accg_immed         0x00000022,accg1
434         test_acc_immed  0x22222222,acc1
436         set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
437         set_fr_iimmed   0x7fff,0x7fff,fr8
438         cmmulhu         fr7,fr8,acc0,cc7,1
439         test_accg_immed         0x00000011,accg0
440         test_acc_immed  0x11111111,acc0
441         test_accg_immed         0x00000022,accg1
442         test_acc_immed  0x22222222,acc1
444         set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
445         set_fr_iimmed   0x8000,0x8000,fr8
446         cmmulhu         fr7,fr8,acc0,cc7,0
447         test_accg_immed         0x00000011,accg0
448         test_acc_immed  0x11111111,acc0
449         test_accg_immed         0x00000022,accg1
450         test_acc_immed  0x22222222,acc1
452         set_fr_iimmed   0xffff,0xffff,fr7       ; max positive result
453         set_fr_iimmed   0xffff,0xffff,fr8
454         cmmulhu         fr7,fr8,acc0,cc7,1
455         test_accg_immed         0x00000011,accg0
456         test_acc_immed  0x11111111,acc0
457         test_accg_immed         0x00000022,accg1
458         test_acc_immed  0x22222222,acc1
460         pass