sim: testsuite: drop most specific istarget checks
[binutils-gdb.git] / sim / testsuite / sh / pshar.s
1 # sh testcase for psha <reg>
2 # mach: shdsp
3 # as(shdsp): -defsym sim_cpu=1 -dsp
4
5 .include "testutils.inc"
6
7 start
8
9 psha_reg: ! shift arithmetic, register operand
10 set_grs_a5a5
11 lds r0, a0
12 pcopy a0, a1
13 lds r0, x0
14 lds r0, x1
15 lds r0, y0
16 lds r0, y1
17 pcopy x0, m0
18 pcopy y1, m1
19
20 set_sreg 0x1, x0
21 set_sreg 0x0, y0
22 psha x0, y0, x0
23 assert_sreg 0x1, x0
24 pneg y0, y0
25 psha x0, y0, x0
26 assert_sreg 0x1, x0
27
28 set_sreg 0x10000, y0
29 psha x0, y0, x0
30 assert_sreg 0x2, x0
31 pneg y0, y0
32 psha x0, y0, x0
33 assert_sreg 0x1, x0
34
35 set_sreg 0x20000, y0
36 psha x0, y0, x0
37 assert_sreg 0x4, x0
38 pneg y0, y0
39 psha x0, y0, x0
40 assert_sreg 0x1, x0
41
42 set_sreg 0x30000, y0
43 psha x0, y0, x0
44 assert_sreg 0x8, x0
45 pneg y0, y0
46 psha x0, y0, x0
47 assert_sreg 0x1, x0
48
49 set_sreg 0x40000, y0
50 psha x0, y0, x0
51 assert_sreg 0x10, x0
52 pneg y0, y0
53 psha x0, y0, x0
54 assert_sreg 0x1, x0
55
56 set_sreg 0x50000, y0
57 psha x0, y0, x0
58 assert_sreg 0x20, x0
59 pneg y0, y0
60 psha x0, y0, x0
61 assert_sreg 0x1, x0
62
63 set_sreg 0x60000, y0
64 psha x0, y0, x0
65 assert_sreg 0x40, x0
66 pneg y0, y0
67 psha x0, y0, x0
68 assert_sreg 0x1, x0
69
70 set_sreg 0x70000, y0
71 psha x0, y0, x0
72 assert_sreg 0x80, x0
73 pneg y0, y0
74 psha x0, y0, x0
75 assert_sreg 0x1, x0
76
77 set_sreg 0x80000, y0
78 psha x0, y0, x0
79 assert_sreg 0x100, x0
80 pneg y0, y0
81 psha x0, y0, x0
82 assert_sreg 0x1, x0
83
84 set_sreg 0x90000, y0
85 psha x0, y0, x0
86 assert_sreg 0x200, x0
87 pneg y0, y0
88 psha x0, y0, x0
89 assert_sreg 0x1, x0
90
91 set_sreg 0xa0000, y0
92 psha x0, y0, x0
93 assert_sreg 0x400, x0
94 pneg y0, y0
95 psha x0, y0, x0
96 assert_sreg 0x1, x0
97
98 set_sreg 0xb0000, y0
99 psha x0, y0, x0
100 assert_sreg 0x800, x0
101 pneg y0, y0
102 psha x0, y0, x0
103 assert_sreg 0x1, x0
104
105 set_sreg 0xc0000, y0
106 psha x0, y0, x0
107 assert_sreg 0x1000, x0
108 pneg y0, y0
109 psha x0, y0, x0
110 assert_sreg 0x1, x0
111
112 set_sreg 0xd0000, y0
113 psha x0, y0, x0
114 assert_sreg 0x2000, x0
115 pneg y0, y0
116 psha x0, y0, x0
117 assert_sreg 0x1, x0
118
119 set_sreg 0xe0000, y0
120 psha x0, y0, x0
121 assert_sreg 0x4000, x0
122 pneg y0, y0
123 psha x0, y0, x0
124 assert_sreg 0x1, x0
125
126 set_sreg 0xf0000, y0
127 psha x0, y0, x0
128 assert_sreg 0x8000, x0
129 pneg y0, y0
130 psha x0, y0, x0
131 assert_sreg 0x1, x0
132
133 set_sreg 0x100000, y0
134 psha x0, y0, x0
135 assert_sreg 0x10000, x0
136 pneg y0, y0
137 psha x0, y0, x0
138 assert_sreg 0x1, x0
139
140 set_sreg 0x110000, y0
141 psha x0, y0, x0
142 assert_sreg 0x20000, x0
143 pneg y0, y0
144 psha x0, y0, x0
145 assert_sreg 0x1, x0
146
147 set_sreg 0x120000, y0
148 psha x0, y0, x0
149 assert_sreg 0x40000, x0
150 pneg y0, y0
151 psha x0, y0, x0
152 assert_sreg 0x1, x0
153
154 set_sreg 0x130000, y0
155 psha x0, y0, x0
156 assert_sreg 0x80000, x0
157 pneg y0, y0
158 psha x0, y0, x0
159 assert_sreg 0x1, x0
160
161 set_sreg 0x140000, y0
162 psha x0, y0, x0
163 assert_sreg 0x100000, x0
164 pneg y0, y0
165 psha x0, y0, x0
166 assert_sreg 0x1, x0
167
168 set_sreg 0x150000, y0
169 psha x0, y0, x0
170 assert_sreg 0x200000, x0
171 pneg y0, y0
172 psha x0, y0, x0
173 assert_sreg 0x1, x0
174
175 set_sreg 0x160000, y0
176 psha x0, y0, x0
177 assert_sreg 0x400000, x0
178 pneg y0, y0
179 psha x0, y0, x0
180 assert_sreg 0x1, x0
181
182 set_sreg 0x170000, y0
183 psha x0, y0, x0
184 assert_sreg 0x800000, x0
185 pneg y0, y0
186 psha x0, y0, x0
187 assert_sreg 0x1, x0
188
189 set_sreg 0x180000, y0
190 psha x0, y0, x0
191 assert_sreg 0x1000000, x0
192 pneg y0, y0
193 psha x0, y0, x0
194 assert_sreg 0x1, x0
195
196 set_sreg 0x190000, y0
197 psha x0, y0, x0
198 assert_sreg 0x2000000, x0
199 pneg y0, y0
200 psha x0, y0, x0
201 assert_sreg 0x1, x0
202
203 set_sreg 0x1a0000, y0
204 psha x0, y0, x0
205 assert_sreg 0x4000000, x0
206 pneg y0, y0
207 psha x0, y0, x0
208 assert_sreg 0x1, x0
209
210 set_sreg 0x1b0000, y0
211 psha x0, y0, x0
212 assert_sreg 0x8000000, x0
213 pneg y0, y0
214 psha x0, y0, x0
215 assert_sreg 0x1, x0
216
217 set_sreg 0x1c0000, y0
218 psha x0, y0, x0
219 assert_sreg 0x10000000, x0
220 pneg y0, y0
221 psha x0, y0, x0
222 assert_sreg 0x1, x0
223
224 set_sreg 0x1d0000, y0
225 psha x0, y0, x0
226 assert_sreg 0x20000000, x0
227 pneg y0, y0
228 psha x0, y0, x0
229 assert_sreg 0x1, x0
230
231 set_sreg 0x1e0000, y0
232 psha x0, y0, x0
233 assert_sreg 0x40000000, x0
234 pneg y0, y0
235 psha x0, y0, x0
236 assert_sreg 0x1, x0
237
238 set_sreg 0x1f0000, y0
239 psha x0, y0, x0
240 assert_sreg 0x80000000, x0
241 pneg y0, y0
242 psha x0, y0, x0
243 assert_sreg 0xffffffff, x0
244
245 set_sreg 0x200000, y0
246 psha x0, y0, x0
247 assert_sreg 0x00000000, x0
248 # I don't grok what should happen here...
249 # pneg y0, y0
250 # psha x0, y0, x0
251 # assert_sreg 0x0, x0
252
253 test_grs_a5a5
254 assert_sreg 0xa5a5a5a5, a0
255 assert_sreg2 0xa5a5a5a5, a1
256 assert_sreg 0xa5a5a5a5, x1
257 assert_sreg 0xa5a5a5a5, y1
258 assert_sreg2 0xa5a5a5a5, m0
259 assert_sreg2 0xa5a5a5a5, m1
260
261
262 pass
263 exit 0
264