sim: bfin: unify se_all*opcodes tests
[deliverable/binutils-gdb.git] / sim / testsuite / sim / bfin / se_all16bitopcodes.S
1 /*
2 * Blackfin testcase for testing illegal/legal 16-bit opcodes from userspace
3 * we track all instructions which cause some sort of exception when run from
4 * userspace, this is normally EXCAUSE :
5 * - 0x21 : illegal instruction
6 * - 0x22 : illegal instruction combination
7 * - 0x2e : use of supervisor resource from userspace
8 * and walk every instruction from 0x0000 to 0xbfff
9 */
10
11 # mach: bfin
12 # sim: --environment operating
13
14 #include "test.h"
15 #include "se_allopcodes.h"
16 .include "testutils.inc"
17
18 .macro se_all_load_insn
19 R2 = W[P5];
20 R0 = R2;
21 .endm
22 .macro se_all_load_table
23 R7 = W[P1++];
24 R6 = W[P1++];
25 R5 = W[P1++];
26 .endm
27
28 .macro se_all_next_insn
29 /* increment, and go again. */
30 R0 = R2;
31
32 R0 += 1;
33 /* finish once we hit the 32bit limit */
34 R1 = 0xC000 (Z);
35 CC = R1 == R0;
36 IF CC JUMP pass_lvl;
37
38 W[P5] = R0;
39 .endm
40
41 .macro se_all_new_insn_stub
42 jump _legal_instruction;
43 .endm
44 .macro se_all_new_insn_log
45 se_all_new_16bit_insn_log
46 .endm
47
48 .macro se_all_insn_init
49 .dw 0x0000;
50 .endm
51 .macro se_all_insn_table
52 /* this table must be sorted, and end with zero */
53 /* start end SEQSTAT */
54 .dw 0x0001, 0x000f, 0x21
55 .dw 0x0011, 0x0013, 0x2e
56 .ifndef BFIN_JTAG
57 .dw 0x0014, 0x0014, 0x2e /* anomaly - RTX works when emulator attached */
58 .endif
59 .dw 0x0015, 0x001F, 0x21
60 .dw 0x0021, 0x0022, 0x21
61 .dw 0x0026, 0x0026, 0x21
62 .ifndef BFIN_JTAG
63 .dw 0x0027, 0x0027, 0x21 /* anomaly 492 - unknown */
64 .endif
65 .dw 0x0028, 0x002F, 0x21
66 .dw 0x0030, 0x0037, 0x2e
67 .dw 0x0038, 0x003F, 0x21
68 .dw 0x0040, 0x0047, 0x2e
69 .dw 0x0048, 0x004F, 0x21
70 .dw 0x0058, 0x005F, 0x21
71 .dw 0x0068, 0x006F, 0x21
72 .dw 0x0078, 0x007F, 0x21
73 .dw 0x0088, 0x008F, 0x21
74 .dw 0x0090, 0x009F, 0x2E
75 .dw 0x00a0, 0x00a0, 0x00
76 .dw 0x00a1, 0x00a1, 0x01
77 .dw 0x00a2, 0x00a2, 0x02
78 .dw 0x00a3, 0x00a3, 0x03
79 .dw 0x00a4, 0x00a4, 0x04
80 .dw 0x00a5, 0x00a5, 0x05
81 .dw 0x00a6, 0x00a6, 0x06
82 .dw 0x00a7, 0x00a7, 0x07
83 .dw 0x00a8, 0x00a8, 0x08
84 .dw 0x00a9, 0x00a9, 0x09
85 .dw 0x00aa, 0x00aa, 0x0a
86 .dw 0x00ab, 0x00ab, 0x0b
87 .dw 0x00ac, 0x00ac, 0x0c
88 .dw 0x00ad, 0x00ad, 0x0d
89 .dw 0x00ae, 0x00ae, 0x0e
90 .dw 0x00af, 0x00af, 0x0f
91 .dw 0x00b6, 0x010f, 0x21
92 .dw 0x0124, 0x0124, 0x21
93 .ifndef BFIN_JTAG
94 .dw 0x0125, 0x0125, 0x21 /* anomaly 492 res = [SP++] */
95 .endif
96 .dw 0x0128, 0x012F, 0x21
97 .dw 0x0138, 0x0138, 0x22
98 .dw 0x0139, 0x013F, 0x2E
99 .dw 0x0164, 0x0164, 0x21
100 .ifndef BFIN_JTAG
101 .dw 0x0165, 0x0165, 0x21 /* anomaly 492 [--SP] = res */
102 .endif
103 .dw 0x0168, 0x016F, 0x21
104 .dw 0x0178, 0x017F, 0x2E
105 .dw 0x0180, 0x01FF, 0x21
106 .dw 0x0210, 0x0217, 0x21
107 .ifndef BFIN_JTAG
108 .dw 0x0219, 0x021F, 0x21 /* anomaly 492 CC = !CC opcode is 0000 0010 0001 1xxx */
109 .endif
110 .dw 0x0220, 0x023F, 0x21
111 .dw 0x0280, 0x02FF, 0x21
112 .dw 0x0305, 0x0305, 0x21
113 .dw 0x0325, 0x0325, 0x21
114 .dw 0x0345, 0x0345, 0x21
115 .dw 0x0365, 0x0365, 0x21
116 .dw 0x0385, 0x0385, 0x21
117 .dw 0x03a5, 0x03a5, 0x21
118 .dw 0x03c5, 0x03c5, 0x21
119 .dw 0x03e5, 0x03e5, 0x21
120 .dw 0x0400, 0x047F, 0x21
121 .dw 0x0486, 0x04Bf, 0x21
122 .dw 0x04c6, 0x04FF, 0x21
123 .dw 0x0501, 0x0507, 0x21
124 .dw 0x0509, 0x050F, 0x21
125 .dw 0x0511, 0x0517, 0x21
126 .dw 0x0519, 0x051F, 0x21
127 .dw 0x0521, 0x0527, 0x21
128 .dw 0x0529, 0x052F, 0x21
129 .dw 0x0531, 0x0537, 0x21
130 .dw 0x0539, 0x053F, 0x21
131 .dw 0x0541, 0x0547, 0x21
132 .dw 0x0549, 0x054F, 0x21
133 .dw 0x0551, 0x0557, 0x21
134 .dw 0x0559, 0x055F, 0x21
135 .dw 0x0561, 0x0567, 0x21
136 .dw 0x0569, 0x056F, 0x21
137 .dw 0x0571, 0x0577, 0x21
138 .dw 0x0579, 0x057F, 0x21
139 .dw 0x0586, 0x0587, 0x21
140 .dw 0x058e, 0x058F, 0x21
141 .dw 0x0596, 0x0597, 0x21
142 .dw 0x059e, 0x059f, 0x21
143 .dw 0x05a6, 0x05a7, 0x21
144 .dw 0x05ae, 0x05af, 0x21
145 .dw 0x05b6, 0x05b7, 0x21
146 .dw 0x05be, 0x05bf, 0x21
147 .dw 0x05c6, 0x05c7, 0x21
148 .dw 0x05ce, 0x05cf, 0x21
149 .dw 0x05d6, 0x05d7, 0x21
150 .dw 0x05de, 0x05df, 0x21
151 .dw 0x05e6, 0x05e7, 0x21
152 .dw 0x05ee, 0x05ef, 0x21
153 .dw 0x05f6, 0x05f7, 0x21
154 .dw 0x05fe, 0x05ff, 0x21
155 .dw 0x0a81, 0x0aff, 0x21
156 .dw 0x0b01, 0x0b7f, 0x21
157 .dw 0x0b81, 0x0bff, 0x21
158 .dw 0x0e80, 0x0fff, 0x21
159 .dw 0x3104, 0x3105, 0x21
160 .dw 0x310c, 0x310d, 0x21
161 .dw 0x3114, 0x3115, 0x21
162 .dw 0x311c, 0x311d, 0x21
163 .dw 0x3124, 0x3125, 0x21
164 .dw 0x312c, 0x312d, 0x21
165 .dw 0x3134, 0x3135, 0x21
166 .dw 0x313c, 0x313d, 0x21
167 .dw 0x3140, 0x317F, 0x21
168 .dw 0x31c0, 0x31ff, 0x2E
169 .dw 0x3304, 0x3305, 0x21
170 .dw 0x330c, 0x330d, 0x21
171 .dw 0x3314, 0x3315, 0x21
172 .dw 0x331c, 0x331d, 0x21
173 .dw 0x3324, 0x3325, 0x21
174 .dw 0x332c, 0x332d, 0x21
175 .dw 0x3334, 0x3335, 0x21
176 .dw 0x333c, 0x333d, 0x21
177 .dw 0x3340, 0x337f, 0x21
178 .dw 0x33c0, 0x33ff, 0x2e
179 .dw 0x3504, 0x3507, 0x21
180 .dw 0x350c, 0x350F, 0x21
181 .dw 0x3514, 0x3517, 0x21
182 .dw 0x351c, 0x351F, 0x21
183 .dw 0x3524, 0x3527, 0x21
184 .dw 0x352c, 0x352f, 0x21
185 .dw 0x3534, 0x3537, 0x21
186 .dw 0x353c, 0x353f, 0x21
187 .dw 0x3540, 0x35c6, 0x21
188 .dw 0x35c7, 0x35c7, 0x2e
189 .dw 0x35c8, 0x35ce, 0x21
190 .dw 0x35cf, 0x35cf, 0x2e
191 .dw 0x35d0, 0x35d6, 0x21
192 .dw 0x35d7, 0x35d7, 0x2e
193 .dw 0x35d8, 0x35de, 0x21
194 .dw 0x35df, 0x35df, 0x2e
195 .dw 0x35e0, 0x35e6, 0x21
196 .dw 0x35e7, 0x35e7, 0x2e
197 .dw 0x35e8, 0x35ee, 0x21
198 .dw 0x35ef, 0x35ef, 0x2e
199 .dw 0x35f0, 0x35f6, 0x21
200 .dw 0x35f7, 0x35f7, 0x2e
201 .dw 0x35f8, 0x35fe, 0x21
202 .dw 0x35ff, 0x35ff, 0x2e
203 .dw 0x3704, 0x3707, 0x21
204 .dw 0x370c, 0x370f, 0x21
205 .dw 0x3714, 0x3717, 0x21
206 .dw 0x371c, 0x371f, 0x21
207 .dw 0x3724, 0x3727, 0x21
208 .dw 0x372c, 0x372f, 0x21
209 .dw 0x3734, 0x3737, 0x21
210 .dw 0x373c, 0x37c6, 0x21
211 .dw 0x37c7, 0x37c7, 0x2e
212 .dw 0x37c8, 0x37ce, 0x21
213 .dw 0x37cf, 0x37cf, 0x2e
214 .dw 0x37d0, 0x37d6, 0x21
215 .dw 0x37d7, 0x37d7, 0x2e
216 .dw 0x37d8, 0x37de, 0x21
217 .dw 0x37df, 0x37df, 0x2e
218 .dw 0x37e0, 0x37e6, 0x21
219 .dw 0x37e7, 0x37e7, 0x2e
220 .dw 0x37e8, 0x37ee, 0x21
221 .dw 0x37ef, 0x37ef, 0x2e
222 .dw 0x37f0, 0x37f6, 0x21
223 .dw 0x37f7, 0x37f7, 0x2e
224 .dw 0x37f8, 0x37fe, 0x21
225 .dw 0x37ff, 0x37ff, 0x2e
226 .dw 0x3820, 0x382f, 0x21
227 .dw 0x3860, 0x386f, 0x21
228 .dw 0x38a0, 0x38af, 0x21
229 .dw 0x38b0, 0x38bf, 0x21
230 .dw 0x38e0, 0x38ef, 0x21
231 .dw 0x38f0, 0x38ff, 0x21
232 .dw 0x3904, 0x3907, 0x21
233 .dw 0x390c, 0x390f, 0x21
234 .dw 0x3914, 0x3917, 0x21
235 .dw 0x391c, 0x392f, 0x21
236 .dw 0x3934, 0x3937, 0x21
237 .dw 0x393c, 0x39bf, 0x21
238 .dw 0x397f, 0x397f, 0x2e
239 .dw 0x3980, 0x39bf, 0x21
240 .dw 0x39c0, 0x39c0, 0x2e
241 .dw 0x39c1, 0x39c7, 0x21
242 .dw 0x39c8, 0x39c8, 0x2e
243 .dw 0x39c9, 0x39cf, 0x21
244 .dw 0x39d0, 0x39d0, 0x2e
245 .dw 0x39d1, 0x39d7, 0x21
246 .dw 0x39d8, 0x39d8, 0x2e
247 .dw 0x39d9, 0x39ef, 0x21
248 .dw 0x39f0, 0x39f0, 0x2e
249 .dw 0x39f1, 0x39f6, 0x21
250 .dw 0x39f7, 0x39f8, 0x2e
251 .dw 0x39f9, 0x39fe, 0x21
252 .dw 0x39ff, 0x39ff, 0x2e
253 .dw 0x3a00, 0x3bff, 0x21
254 .dw 0x3c80, 0x3cff, 0x21
255 .dw 0x3d04, 0x3d07, 0x21
256 .dw 0x3d0c, 0x3d0f, 0x21
257 .dw 0x3d14, 0x3d17, 0x21
258 .dw 0x3d1c, 0x3d1f, 0x21
259 .dw 0x3d24, 0x3d27, 0x21
260 .dw 0x3d2c, 0x3d2f, 0x21
261 .dw 0x3d34, 0x3d37, 0x21
262 .dw 0x3d3c, 0x3dbf, 0X21
263 .dw 0x3dc0, 0x3dc0, 0x2e
264 .dw 0x3dc1, 0x3dc6, 0x21
265 .dw 0x3dc7, 0x3dc8, 0x2e
266 .dw 0x3dc9, 0x3dce, 0x21
267 .dw 0x3dcf, 0x3dd0, 0x2e
268 .dw 0x3dd1, 0x3dd6, 0x21
269 .dw 0x3dd7, 0x3dd8, 0x2e
270 .dw 0x3dd9, 0x3dde, 0x21
271 .dw 0x3ddf, 0x3de0, 0x2e
272 .dw 0x3de1, 0x3de6, 0x21
273 .dw 0x3de7, 0x3de8, 0x2e
274 .dw 0x3de9, 0x3dee, 0x21
275 .dw 0x3def, 0x3df0, 0x2e
276 .dw 0x3df1, 0x3df6, 0x21
277 .dw 0x3df7, 0x3df8, 0x2e
278 .dw 0x3df9, 0x3dfe, 0x21
279 .dw 0x3dff, 0x3e7f, 0x2e
280 .dw 0x3e80, 0x3eb7, 0x21
281 .dw 0x3eb8, 0x3ebf, 0x2e
282 .dw 0x3ec0, 0x3ef7, 0x21
283 .dw 0x3ef8, 0x3f03, 0x2e
284 .dw 0x3f04, 0x3f07, 0x21
285 .dw 0x3f08, 0x3f0b, 0x2e
286 .dw 0x3f0c, 0x3f0f, 0x21
287 .dw 0x3f10, 0x3f13, 0x2e
288 .dw 0x3f14, 0x3f17, 0x21
289 .dw 0x3f18, 0x3f1b, 0x2e
290 .dw 0x3f1c, 0x3f1f, 0x21
291 .dw 0x3f20, 0x3f23, 0x2e
292 .dw 0x3f24, 0x3f27, 0x21
293 .dw 0x3f28, 0x3f2b, 0x2e
294 .dw 0x3f2c, 0x3f2f, 0x21
295 .dw 0x3f30, 0x3f33, 0x2e
296 .dw 0x3f34, 0x3f37, 0x21
297 .dw 0x3f38, 0x3f3b, 0x2e
298 .dw 0x3f3c, 0x3f3d, 0x21
299 .dw 0x3f3e, 0x3f3f, 0x2e
300 .dw 0x3f40, 0x3fb7, 0x21
301 .dw 0x3fb8, 0x3fc0, 0x2e
302 .dw 0x3fc1, 0x3fc6, 0x21
303 .dw 0x3fc7, 0x3fc8, 0x2e
304 .dw 0x3fc9, 0x3fce, 0x21
305 .dw 0x3fcf, 0x3fd0, 0x2e
306 .dw 0x3fd1, 0x3fd6, 0x21
307 .dw 0x3fd7, 0x3fd8, 0x2e
308 .dw 0x3fd9, 0x3fde, 0x21
309 .dw 0x3fdf, 0x3fe0, 0x2e
310 .dw 0x3fe1, 0x3fe6, 0x21
311 .dw 0x3fe7, 0x3fe8, 0x2e
312 .dw 0x3fe9, 0x3fee, 0x21
313 .dw 0x3fef, 0x3ff0, 0x2e
314 .dw 0x3ff1, 0x3ff6, 0x21
315 .dw 0x3ff7, 0x3fff, 0x2e
316 .dw 0x4180, 0x41FF, 0x21
317 .dw 0x4480, 0x44bF, 0x21
318 .dw 0x4600, 0x47FF, 0x21
319 .dw 0x7000, 0x7FFF, 0x21
320 .dw 0x9040, 0x9040, 0x22
321 .dw 0x9049, 0x9049, 0x22
322 .dw 0x9052, 0x9052, 0x22
323 .dw 0x905b, 0x905b, 0x22
324 .dw 0x9064, 0x9064, 0x22
325 .dw 0x906d, 0x906d, 0x22
326 .dw 0x9076, 0x9076, 0x22
327 .dw 0x907f, 0x907f, 0x22
328 .dw 0x90c0, 0x90c0, 0x22
329 .dw 0x90c9, 0x90c9, 0x22
330 .dw 0x90d2, 0x90d2, 0x22
331 .dw 0x90db, 0x90db, 0x22
332 .dw 0x90e4, 0x90e4, 0x22
333 .dw 0x90ed, 0x90ed, 0x22
334 .dw 0x90f6, 0x90f6, 0x22
335 .dw 0x90ff, 0x90ff, 0x22
336 .dw 0x9180, 0x91ff, 0x21
337 .dw 0x9380, 0x93ff, 0x21
338 .dw 0x9580, 0x95ff, 0x21
339 .dw 0x9640, 0x967f, 0x21
340 .dw 0x96c0, 0x96ff, 0x21
341 .dw 0x9740, 0x97ff, 0x21
342 .dw 0x9980, 0x99ff, 0x21
343 .dw 0x9a40, 0x9a7f, 0x21
344 .dw 0x9ac0, 0x9aff, 0x21
345 .dw 0x9b40, 0x9bff, 0x21
346 .dw 0x9c60, 0x9c7f, 0x21
347 .dw 0x9ce0, 0x9cff, 0x21
348 .dw 0x9d60, 0x9d7f, 0x21
349 .dw 0x9ef0, 0x9eff, 0x21
350 .dw 0x9f70, 0x9f7f, 0x21
351 .dw 0x0000, 0x0000, 0x00
352 .endm
353
354 se_all_test
This page took 0.037289 seconds and 4 git commands to generate.