Automatic date update in version.in
[binutils-gdb.git] / sim / testsuite / frv / mcpxiu.cgs
blob198f0568c4014ef152a1b600ec5d3dd98843cee3
1 # frv testcase for mcpxiu $GRi,$GRj,$GRk
2 # mach: all
4         .include "testutils.inc"
6         start
8         .global mcpxiu
9 mcpxiu:
10         set_fr_iimmed   4,2,fr7         ; multiply small numbers
11         set_fr_iimmed   3,5,fr8
12         mcpxiu          fr7,fr8,acc0
13         test_accg_immed         0,accg0
14         test_acc_immed  26,acc0
16         set_fr_iimmed   1,2,fr7         ; multiply by 1
17         set_fr_iimmed   1,3,fr8
18         mcpxiu          fr7,fr8,acc0
19         test_accg_immed         0,accg0
20         test_acc_immed  5,acc0
22         set_fr_iimmed   0,2,fr7         ; multiply by 0
23         set_fr_iimmed   0,2,fr8
24         mcpxiu          fr7,fr8,acc0
25         test_accg_immed         0,accg0
26         test_acc_immed  0,acc0
28         set_fr_iimmed   0x3fff,1,fr7    ; 15 bit result
29         set_fr_iimmed   0x0001,2,fr8
30         mcpxiu          fr7,fr8,acc0
31         test_accg_immed         0,accg0
32         test_acc_limmed 0x0000,0x7fff,acc0
34         set_fr_iimmed   0x4000,1,fr7    ; 16 bit result
35         set_fr_iimmed   0x0001,2,fr8
36         mcpxiu          fr7,fr8,acc0
37         test_accg_immed         0,accg0
38         test_acc_limmed 0x0000,0x8001,acc0
40         set_fr_iimmed   0x4000,1,fr7    ; 17 bit result
41         set_fr_iimmed   0x0001,4,fr8
42         mcpxiu          fr7,fr8,acc0
43         test_accg_immed         0,accg0
44         test_acc_immed  0x00010001,acc0
46         set_fr_iimmed   0x7fff,0x0000,fr7       ; max positive result
47         set_fr_iimmed   0x7fff,0x7fff,fr8
48         mcpxiu          fr7,fr8,acc0
49         test_accg_immed         0,accg0
50         test_acc_immed  0x3fff0001,acc0
52         set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
53         set_fr_iimmed   0x0000,0x8000,fr8
54         mcpxiu          fr7,fr8,acc0
55         test_accg_immed         0,accg0
56         test_acc_limmed 0x4000,0x0000,acc0
58         set_fr_iimmed   0xffff,0x0000,fr7       ; max positive result
59         set_fr_iimmed   0xffff,0xffff,fr8
60         mcpxiu          fr7,fr8,acc0
61         test_accg_immed         0,accg0
62         test_acc_limmed 0xfffe,0x0001,acc0
64         set_fr_iimmed   0xfffe,0xffff,fr7       ; almost max positive result
65         set_fr_iimmed   0xffff,0xffff,fr8
66         mcpxiu          fr7,fr8,acc0
67         test_accg_immed 1,accg0
68         test_acc_immed  0xfffb0003,acc0
70         set_fr_iimmed   0xffff,0xffff,fr7       ; max positive result
71         set_fr_iimmed   0xffff,0xffff,fr8
72         mcpxiu          fr7,fr8,acc0
73         test_accg_immed 1,accg0
74         test_acc_immed  0xfffc0002,acc0
76         pass