Automatic date update in version.in
[binutils-gdb.git] / sim / testsuite / frv / mqmulhu.cgs
blobe94c09ae97e6dc2063e96201c28e3dccedf0ffea
1 # frv testcase for mqmulhu $GRi,$GRj,$GRk
2 # mach: all
4         .include "testutils.inc"
6         start
8         .global mqmulhu
9 mqmulhu:
10         set_fr_iimmed   3,2,fr8         ; multiply small numbers
11         set_fr_iimmed   2,3,fr10
12         set_fr_iimmed   1,2,fr9         ; multiply by 1
13         set_fr_iimmed   2,1,fr11
14         mqmulhu         fr8,fr10,acc0
15         test_accg_immed         0,accg0
16         test_acc_immed  6,acc0
17         test_accg_immed         0,accg1
18         test_acc_immed  6,acc1
19         test_accg_immed         0,accg2
20         test_acc_immed  2,acc2
21         test_accg_immed         0,accg3
22         test_acc_immed  2,acc3
24         set_fr_iimmed   0,2,fr8         ; multiply by 0
25         set_fr_iimmed   2,0,fr10
26         set_fr_iimmed   0x3fff,2,fr9    ; 15 bit result
27         set_fr_iimmed   2,0x3fff,fr11
28         mqmulhu         fr8,fr10,acc0
29         test_accg_immed         0,accg0
30         test_acc_immed  0,acc0
31         test_accg_immed         0,accg1
32         test_acc_immed  0,acc1
33         test_accg_immed         0,accg2
34         test_acc_limmed 0x0000,0x7ffe,acc2
35         test_accg_immed         0,accg3
36         test_acc_limmed 0x0000,0x7ffe,acc3
38         set_fr_iimmed   0x4000,2,fr8    ; 16 bit result
39         set_fr_iimmed   2,0x4000,fr10
40         set_fr_iimmed   0x8000,2,fr9    ; 17 bit result
41         set_fr_iimmed   2,0x8000,fr11
42         mqmulhu         fr8,fr10,acc0
43         test_accg_immed         0,accg0
44         test_acc_limmed 0x0000,0x8000,acc0
45         test_accg_immed         0,accg1
46         test_acc_limmed 0x0000,0x8000,acc1
47         test_accg_immed         0,accg2
48         test_acc_immed  0x00010000,acc2
49         test_accg_immed         0,accg3
50         test_acc_immed  0x00010000,acc3
52         set_fr_iimmed   0x7fff,0x7fff,fr8       ; max positive result
53         set_fr_iimmed   0x7fff,0x7fff,fr10
54         set_fr_iimmed   0x8000,0x8000,fr9       ; max positive result
55         set_fr_iimmed   0x8000,0x8000,fr11
56         mqmulhu         fr8,fr10,acc0
57         test_accg_immed         0,accg0
58         test_acc_immed  0x3fff0001,acc0
59         test_accg_immed         0,accg1
60         test_acc_immed  0x3fff0001,acc1
61         test_accg_immed         0,accg2
62         test_acc_limmed 0x4000,0x0000,acc2
63         test_accg_immed         0,accg3
64         test_acc_limmed 0x4000,0x0000,acc3
66         set_fr_iimmed   0xffff,0xffff,fr8       ; max positive result
67         set_fr_iimmed   0xffff,0xffff,fr10
68         set_fr_iimmed   0xffff,0xffff,fr9       ; max positive result
69         set_fr_iimmed   0xffff,0xffff,fr11
70         mqmulhu         fr8,fr10,acc0
71         test_accg_immed         0,accg0
72         test_acc_limmed 0xfffe,0x0001,acc0
73         test_accg_immed         0,accg1
74         test_acc_limmed 0xfffe,0x0001,acc1
75         test_accg_immed         0,accg2
76         test_acc_limmed 0xfffe,0x0001,acc2
77         test_accg_immed         0,accg3
78         test_acc_limmed 0xfffe,0x0001,acc3
80         pass