Automatic date update in version.in
[binutils-gdb.git] / sim / testsuite / frv / csub.cgs
blob7d07c14732730d54403bd8eabf8b48a6663c2403
1 # frv testcase for csub $GRi,$GRj,$GRk,$CCi,$cond
2 # mach: all
4         .include "testutils.inc"
6         start
8         .global csub
9 csub:
10         set_spr_immed   0x1b1b,cccr
12         set_gr_immed    1,gr7
13         set_gr_immed    2,gr8
14         csub            gr8,gr7,gr8,cc4,1
15         test_gr_immed   1,gr8
17         set_gr_immed    1,gr7
18         set_gr_limmed   0x8000,0x0000,gr8
19         csub            gr8,gr7,gr8,cc4,1
20         test_gr_limmed  0x7fff,0xffff,gr8
22         csub            gr8,gr8,gr8,cc4,1
23         test_gr_immed   0,gr8
25         csub            gr8,gr7,gr8,cc4,1
26         test_gr_immed   -1,gr8
28         set_gr_immed    1,gr7
29         set_gr_immed    2,gr8
30         csub            gr8,gr7,gr8,cc4,0
31         test_gr_immed   2,gr8
33         set_gr_immed    1,gr7
34         set_gr_limmed   0x8000,0x0000,gr8
35         csub            gr8,gr7,gr8,cc4,0
36         test_gr_limmed  0x8000,0x0000,gr8
38         csub            gr8,gr8,gr8,cc4,0
39         test_gr_limmed  0x8000,0x0000,gr8
41         csub            gr8,gr7,gr8,cc4,0
42         test_gr_limmed  0x8000,0x0000,gr8
44         set_gr_immed    1,gr7
45         set_gr_immed    2,gr8
46         csub            gr8,gr7,gr8,cc5,0
47         test_gr_immed   1,gr8
49         set_gr_immed    1,gr7
50         set_gr_limmed   0x8000,0x0000,gr8
51         csub            gr8,gr7,gr8,cc5,0
52         test_gr_limmed  0x7fff,0xffff,gr8
54         csub            gr8,gr8,gr8,cc5,0
55         test_gr_immed   0,gr8
57         csub            gr8,gr7,gr8,cc5,0
58         test_gr_immed   -1,gr8
60         set_gr_immed    1,gr7
61         set_gr_immed    2,gr8
62         csub            gr8,gr7,gr8,cc5,1
63         test_gr_immed   2,gr8
65         set_gr_immed    1,gr7
66         set_gr_limmed   0x8000,0x0000,gr8
67         csub            gr8,gr7,gr8,cc5,1
68         test_gr_limmed  0x8000,0x0000,gr8
70         csub            gr8,gr8,gr8,cc5,1
71         test_gr_limmed  0x8000,0x0000,gr8
73         csub            gr8,gr7,gr8,cc5,1
74         test_gr_limmed  0x8000,0x0000,gr8
76         set_gr_immed    1,gr7
77         set_gr_immed    2,gr8
78         csub            gr8,gr7,gr8,cc6,1
79         test_gr_immed   2,gr8
81         set_gr_immed    1,gr7
82         set_gr_limmed   0x8000,0x0000,gr8
83         csub            gr8,gr7,gr8,cc6,0
84         test_gr_limmed  0x8000,0x0000,gr8
86         csub            gr8,gr8,gr8,cc6,1
87         test_gr_limmed  0x8000,0x0000,gr8
89         csub            gr8,gr7,gr8,cc6,0
90         test_gr_limmed  0x8000,0x0000,gr8
92         set_gr_immed    1,gr7
93         set_gr_immed    2,gr8
94         csub            gr8,gr7,gr8,cc7,0
95         test_gr_immed   2,gr8
97         set_gr_immed    1,gr7
98         set_gr_limmed   0x8000,0x0000,gr8
99         csub            gr8,gr7,gr8,cc7,1
100         test_gr_limmed  0x8000,0x0000,gr8
102         csub            gr8,gr8,gr8,cc7,0
103         test_gr_limmed  0x8000,0x0000,gr8
105         csub            gr8,gr7,gr8,cc7,1
106         test_gr_limmed  0x8000,0x0000,gr8
108         pass