]>
Commit | Line | Data |
---|---|---|
f6bcefef HPN |
1 | /* Simulator model support for crisv32f. |
2 | ||
3 | THIS FILE IS MACHINE GENERATED WITH CGEN. | |
4 | ||
cce0efb5 | 5 | Copyright 1996-2005 Free Software Foundation, Inc. |
f6bcefef HPN |
6 | |
7 | This file is part of the GNU simulators. | |
8 | ||
9 | This program is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
11 | the Free Software Foundation; either version 2, or (at your option) | |
12 | any later version. | |
13 | ||
14 | This program is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License along | |
20 | with this program; if not, write to the Free Software Foundation, Inc., | |
cf2bf87e | 21 | 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. |
f6bcefef HPN |
22 | |
23 | */ | |
24 | ||
25 | #define WANT_CPU crisv32f | |
26 | #define WANT_CPU_CRISV32F | |
27 | ||
28 | #include "sim-main.h" | |
29 | ||
30 | /* The profiling data is recorded here, but is accessed via the profiling | |
31 | mechanism. After all, this is information for profiling. */ | |
32 | ||
33 | #if WITH_PROFILE_MODEL_P | |
34 | ||
35 | /* Model handlers for each insn. */ | |
36 | ||
37 | static int | |
38 | model_crisv32_move_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
39 | { | |
40 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
41 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
42 | const IDESC * UNUSED idesc = abuf->idesc; | |
43 | int cycles = 0; | |
44 | { | |
45 | int referenced = 0; | |
46 | int UNUSED insn_referenced = abuf->written; | |
47 | INT in_Rd = -1; | |
48 | INT in_Rs = -1; | |
49 | INT out_Rd = -1; | |
50 | in_Rs = FLD (in_Rs); | |
51 | referenced |= 1 << 1; | |
52 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
53 | } | |
54 | return cycles; | |
55 | #undef FLD | |
56 | } | |
57 | ||
58 | static int | |
59 | model_crisv32_move_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
60 | { | |
61 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
62 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
63 | const IDESC * UNUSED idesc = abuf->idesc; | |
64 | int cycles = 0; | |
65 | { | |
66 | int referenced = 0; | |
67 | int UNUSED insn_referenced = abuf->written; | |
68 | INT in_Rd = -1; | |
69 | INT in_Rs = -1; | |
70 | INT out_Rd = -1; | |
71 | in_Rs = FLD (in_Rs); | |
72 | referenced |= 1 << 1; | |
73 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
74 | } | |
75 | return cycles; | |
76 | #undef FLD | |
77 | } | |
78 | ||
79 | static int | |
80 | model_crisv32_move_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
81 | { | |
82 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
83 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
84 | const IDESC * UNUSED idesc = abuf->idesc; | |
85 | int cycles = 0; | |
86 | { | |
87 | int referenced = 0; | |
88 | int UNUSED insn_referenced = abuf->written; | |
89 | INT in_Rd = -1; | |
90 | INT in_Rs = -1; | |
91 | INT out_Rd = -1; | |
92 | in_Rs = FLD (in_Rs); | |
93 | referenced |= 1 << 1; | |
94 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
95 | } | |
96 | return cycles; | |
97 | #undef FLD | |
98 | } | |
99 | ||
100 | static int | |
101 | model_crisv32_moveq (SIM_CPU *current_cpu, void *sem_arg) | |
102 | { | |
103 | #define FLD(f) abuf->fields.sfmt_moveq.f | |
104 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
105 | const IDESC * UNUSED idesc = abuf->idesc; | |
106 | int cycles = 0; | |
107 | { | |
108 | int referenced = 0; | |
109 | int UNUSED insn_referenced = abuf->written; | |
110 | INT in_Rd = -1; | |
111 | INT in_Rs = -1; | |
112 | INT out_Rd = -1; | |
113 | out_Rd = FLD (out_Rd); | |
114 | referenced |= 1 << 2; | |
115 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
116 | } | |
117 | return cycles; | |
118 | #undef FLD | |
119 | } | |
120 | ||
121 | static int | |
122 | model_crisv32_movs_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
123 | { | |
124 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
125 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
126 | const IDESC * UNUSED idesc = abuf->idesc; | |
127 | int cycles = 0; | |
128 | { | |
129 | int referenced = 0; | |
130 | int UNUSED insn_referenced = abuf->written; | |
131 | INT in_Rd = -1; | |
132 | INT in_Rs = -1; | |
133 | INT out_Rd = -1; | |
134 | in_Rs = FLD (in_Rs); | |
135 | out_Rd = FLD (out_Rd); | |
136 | referenced |= 1 << 1; | |
137 | referenced |= 1 << 2; | |
138 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
139 | } | |
140 | return cycles; | |
141 | #undef FLD | |
142 | } | |
143 | ||
144 | static int | |
145 | model_crisv32_movs_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
146 | { | |
147 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
148 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
149 | const IDESC * UNUSED idesc = abuf->idesc; | |
150 | int cycles = 0; | |
151 | { | |
152 | int referenced = 0; | |
153 | int UNUSED insn_referenced = abuf->written; | |
154 | INT in_Rd = -1; | |
155 | INT in_Rs = -1; | |
156 | INT out_Rd = -1; | |
157 | in_Rs = FLD (in_Rs); | |
158 | out_Rd = FLD (out_Rd); | |
159 | referenced |= 1 << 1; | |
160 | referenced |= 1 << 2; | |
161 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
162 | } | |
163 | return cycles; | |
164 | #undef FLD | |
165 | } | |
166 | ||
167 | static int | |
168 | model_crisv32_movu_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
169 | { | |
170 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
171 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
172 | const IDESC * UNUSED idesc = abuf->idesc; | |
173 | int cycles = 0; | |
174 | { | |
175 | int referenced = 0; | |
176 | int UNUSED insn_referenced = abuf->written; | |
177 | INT in_Rd = -1; | |
178 | INT in_Rs = -1; | |
179 | INT out_Rd = -1; | |
180 | in_Rs = FLD (in_Rs); | |
181 | out_Rd = FLD (out_Rd); | |
182 | referenced |= 1 << 1; | |
183 | referenced |= 1 << 2; | |
184 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
185 | } | |
186 | return cycles; | |
187 | #undef FLD | |
188 | } | |
189 | ||
190 | static int | |
191 | model_crisv32_movu_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
192 | { | |
193 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
194 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
195 | const IDESC * UNUSED idesc = abuf->idesc; | |
196 | int cycles = 0; | |
197 | { | |
198 | int referenced = 0; | |
199 | int UNUSED insn_referenced = abuf->written; | |
200 | INT in_Rd = -1; | |
201 | INT in_Rs = -1; | |
202 | INT out_Rd = -1; | |
203 | in_Rs = FLD (in_Rs); | |
204 | out_Rd = FLD (out_Rd); | |
205 | referenced |= 1 << 1; | |
206 | referenced |= 1 << 2; | |
207 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
208 | } | |
209 | return cycles; | |
210 | #undef FLD | |
211 | } | |
212 | ||
213 | static int | |
214 | model_crisv32_movecbr (SIM_CPU *current_cpu, void *sem_arg) | |
215 | { | |
216 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
217 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
218 | const IDESC * UNUSED idesc = abuf->idesc; | |
219 | int cycles = 0; | |
220 | { | |
221 | int referenced = 0; | |
222 | int UNUSED insn_referenced = abuf->written; | |
223 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
224 | } | |
225 | { | |
226 | int referenced = 0; | |
227 | int UNUSED insn_referenced = abuf->written; | |
228 | INT in_Rd = -1; | |
229 | INT in_Rs = -1; | |
230 | INT out_Rd = -1; | |
231 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
232 | } | |
233 | return cycles; | |
234 | #undef FLD | |
235 | } | |
236 | ||
237 | static int | |
238 | model_crisv32_movecwr (SIM_CPU *current_cpu, void *sem_arg) | |
239 | { | |
240 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
241 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
242 | const IDESC * UNUSED idesc = abuf->idesc; | |
243 | int cycles = 0; | |
244 | { | |
245 | int referenced = 0; | |
246 | int UNUSED insn_referenced = abuf->written; | |
247 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
248 | } | |
249 | { | |
250 | int referenced = 0; | |
251 | int UNUSED insn_referenced = abuf->written; | |
252 | INT in_Rd = -1; | |
253 | INT in_Rs = -1; | |
254 | INT out_Rd = -1; | |
255 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
256 | } | |
257 | return cycles; | |
258 | #undef FLD | |
259 | } | |
260 | ||
261 | static int | |
262 | model_crisv32_movecdr (SIM_CPU *current_cpu, void *sem_arg) | |
263 | { | |
264 | #define FLD(f) abuf->fields.sfmt_bound_cd.f | |
265 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
266 | const IDESC * UNUSED idesc = abuf->idesc; | |
267 | int cycles = 0; | |
268 | { | |
269 | int referenced = 0; | |
270 | int UNUSED insn_referenced = abuf->written; | |
271 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
272 | } | |
273 | { | |
274 | int referenced = 0; | |
275 | int UNUSED insn_referenced = abuf->written; | |
276 | INT in_Rd = -1; | |
277 | INT in_Rs = -1; | |
278 | INT out_Rd = -1; | |
279 | out_Rd = FLD (out_Rd); | |
280 | referenced |= 1 << 2; | |
281 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
282 | } | |
283 | return cycles; | |
284 | #undef FLD | |
285 | } | |
286 | ||
287 | static int | |
288 | model_crisv32_movscbr (SIM_CPU *current_cpu, void *sem_arg) | |
289 | { | |
290 | #define FLD(f) abuf->fields.sfmt_bound_cb.f | |
291 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
292 | const IDESC * UNUSED idesc = abuf->idesc; | |
293 | int cycles = 0; | |
294 | { | |
295 | int referenced = 0; | |
296 | int UNUSED insn_referenced = abuf->written; | |
297 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
298 | } | |
299 | { | |
300 | int referenced = 0; | |
301 | int UNUSED insn_referenced = abuf->written; | |
302 | INT in_Rd = -1; | |
303 | INT in_Rs = -1; | |
304 | INT out_Rd = -1; | |
305 | out_Rd = FLD (out_Rd); | |
306 | referenced |= 1 << 2; | |
307 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
308 | } | |
309 | return cycles; | |
310 | #undef FLD | |
311 | } | |
312 | ||
313 | static int | |
314 | model_crisv32_movscwr (SIM_CPU *current_cpu, void *sem_arg) | |
315 | { | |
316 | #define FLD(f) abuf->fields.sfmt_bound_cw.f | |
317 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
318 | const IDESC * UNUSED idesc = abuf->idesc; | |
319 | int cycles = 0; | |
320 | { | |
321 | int referenced = 0; | |
322 | int UNUSED insn_referenced = abuf->written; | |
323 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
324 | } | |
325 | { | |
326 | int referenced = 0; | |
327 | int UNUSED insn_referenced = abuf->written; | |
328 | INT in_Rd = -1; | |
329 | INT in_Rs = -1; | |
330 | INT out_Rd = -1; | |
331 | out_Rd = FLD (out_Rd); | |
332 | referenced |= 1 << 2; | |
333 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
334 | } | |
335 | return cycles; | |
336 | #undef FLD | |
337 | } | |
338 | ||
339 | static int | |
340 | model_crisv32_movucbr (SIM_CPU *current_cpu, void *sem_arg) | |
341 | { | |
342 | #define FLD(f) abuf->fields.sfmt_bound_cb.f | |
343 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
344 | const IDESC * UNUSED idesc = abuf->idesc; | |
345 | int cycles = 0; | |
346 | { | |
347 | int referenced = 0; | |
348 | int UNUSED insn_referenced = abuf->written; | |
349 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
350 | } | |
351 | { | |
352 | int referenced = 0; | |
353 | int UNUSED insn_referenced = abuf->written; | |
354 | INT in_Rd = -1; | |
355 | INT in_Rs = -1; | |
356 | INT out_Rd = -1; | |
357 | out_Rd = FLD (out_Rd); | |
358 | referenced |= 1 << 2; | |
359 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
360 | } | |
361 | return cycles; | |
362 | #undef FLD | |
363 | } | |
364 | ||
365 | static int | |
366 | model_crisv32_movucwr (SIM_CPU *current_cpu, void *sem_arg) | |
367 | { | |
368 | #define FLD(f) abuf->fields.sfmt_bound_cw.f | |
369 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
370 | const IDESC * UNUSED idesc = abuf->idesc; | |
371 | int cycles = 0; | |
372 | { | |
373 | int referenced = 0; | |
374 | int UNUSED insn_referenced = abuf->written; | |
375 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
376 | } | |
377 | { | |
378 | int referenced = 0; | |
379 | int UNUSED insn_referenced = abuf->written; | |
380 | INT in_Rd = -1; | |
381 | INT in_Rs = -1; | |
382 | INT out_Rd = -1; | |
383 | out_Rd = FLD (out_Rd); | |
384 | referenced |= 1 << 2; | |
385 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
386 | } | |
387 | return cycles; | |
388 | #undef FLD | |
389 | } | |
390 | ||
391 | static int | |
392 | model_crisv32_addq (SIM_CPU *current_cpu, void *sem_arg) | |
393 | { | |
394 | #define FLD(f) abuf->fields.sfmt_addq.f | |
395 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
396 | const IDESC * UNUSED idesc = abuf->idesc; | |
397 | int cycles = 0; | |
398 | { | |
399 | int referenced = 0; | |
400 | int UNUSED insn_referenced = abuf->written; | |
401 | INT in_Rd = -1; | |
402 | INT in_Rs = -1; | |
403 | INT out_Rd = -1; | |
404 | in_Rd = FLD (in_Rd); | |
405 | referenced |= 1 << 0; | |
406 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
407 | } | |
408 | return cycles; | |
409 | #undef FLD | |
410 | } | |
411 | ||
412 | static int | |
413 | model_crisv32_subq (SIM_CPU *current_cpu, void *sem_arg) | |
414 | { | |
415 | #define FLD(f) abuf->fields.sfmt_addq.f | |
416 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
417 | const IDESC * UNUSED idesc = abuf->idesc; | |
418 | int cycles = 0; | |
419 | { | |
420 | int referenced = 0; | |
421 | int UNUSED insn_referenced = abuf->written; | |
422 | INT in_Rd = -1; | |
423 | INT in_Rs = -1; | |
424 | INT out_Rd = -1; | |
425 | in_Rd = FLD (in_Rd); | |
426 | referenced |= 1 << 0; | |
427 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
428 | } | |
429 | return cycles; | |
430 | #undef FLD | |
431 | } | |
432 | ||
433 | static int | |
434 | model_crisv32_cmp_r_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
435 | { | |
436 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
437 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
438 | const IDESC * UNUSED idesc = abuf->idesc; | |
439 | int cycles = 0; | |
440 | { | |
441 | int referenced = 0; | |
442 | int UNUSED insn_referenced = abuf->written; | |
443 | INT in_Rd = -1; | |
444 | INT in_Rs = -1; | |
445 | INT out_Rd = -1; | |
446 | in_Rd = FLD (in_Rd); | |
447 | in_Rs = FLD (in_Rs); | |
448 | referenced |= 1 << 0; | |
449 | referenced |= 1 << 1; | |
450 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
451 | } | |
452 | return cycles; | |
453 | #undef FLD | |
454 | } | |
455 | ||
456 | static int | |
457 | model_crisv32_cmp_r_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
458 | { | |
459 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
460 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
461 | const IDESC * UNUSED idesc = abuf->idesc; | |
462 | int cycles = 0; | |
463 | { | |
464 | int referenced = 0; | |
465 | int UNUSED insn_referenced = abuf->written; | |
466 | INT in_Rd = -1; | |
467 | INT in_Rs = -1; | |
468 | INT out_Rd = -1; | |
469 | in_Rd = FLD (in_Rd); | |
470 | in_Rs = FLD (in_Rs); | |
471 | referenced |= 1 << 0; | |
472 | referenced |= 1 << 1; | |
473 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
474 | } | |
475 | return cycles; | |
476 | #undef FLD | |
477 | } | |
478 | ||
479 | static int | |
480 | model_crisv32_cmp_r_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
481 | { | |
482 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
483 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
484 | const IDESC * UNUSED idesc = abuf->idesc; | |
485 | int cycles = 0; | |
486 | { | |
487 | int referenced = 0; | |
488 | int UNUSED insn_referenced = abuf->written; | |
489 | INT in_Rd = -1; | |
490 | INT in_Rs = -1; | |
491 | INT out_Rd = -1; | |
492 | in_Rd = FLD (in_Rd); | |
493 | in_Rs = FLD (in_Rs); | |
494 | referenced |= 1 << 0; | |
495 | referenced |= 1 << 1; | |
496 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
497 | } | |
498 | return cycles; | |
499 | #undef FLD | |
500 | } | |
501 | ||
502 | static int | |
503 | model_crisv32_cmp_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
504 | { | |
505 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
506 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
507 | const IDESC * UNUSED idesc = abuf->idesc; | |
508 | int cycles = 0; | |
509 | { | |
510 | int referenced = 0; | |
511 | int UNUSED insn_referenced = abuf->written; | |
512 | INT in_Rs = -1; | |
513 | in_Rs = FLD (in_Rs); | |
514 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
515 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
516 | } | |
517 | { | |
518 | int referenced = 0; | |
519 | int UNUSED insn_referenced = abuf->written; | |
520 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
521 | } | |
522 | { | |
523 | int referenced = 0; | |
524 | int UNUSED insn_referenced = abuf->written; | |
525 | INT in_Rd = -1; | |
526 | INT in_Rs = -1; | |
527 | INT out_Rd = -1; | |
528 | in_Rd = FLD (in_Rd); | |
529 | in_Rs = FLD (in_Rs); | |
530 | referenced |= 1 << 0; | |
531 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
532 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
533 | } | |
534 | return cycles; | |
535 | #undef FLD | |
536 | } | |
537 | ||
538 | static int | |
539 | model_crisv32_cmp_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
540 | { | |
541 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
542 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
543 | const IDESC * UNUSED idesc = abuf->idesc; | |
544 | int cycles = 0; | |
545 | { | |
546 | int referenced = 0; | |
547 | int UNUSED insn_referenced = abuf->written; | |
548 | INT in_Rs = -1; | |
549 | in_Rs = FLD (in_Rs); | |
550 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
551 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
552 | } | |
553 | { | |
554 | int referenced = 0; | |
555 | int UNUSED insn_referenced = abuf->written; | |
556 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
557 | } | |
558 | { | |
559 | int referenced = 0; | |
560 | int UNUSED insn_referenced = abuf->written; | |
561 | INT in_Rd = -1; | |
562 | INT in_Rs = -1; | |
563 | INT out_Rd = -1; | |
564 | in_Rd = FLD (in_Rd); | |
565 | in_Rs = FLD (in_Rs); | |
566 | referenced |= 1 << 0; | |
567 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
568 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
569 | } | |
570 | return cycles; | |
571 | #undef FLD | |
572 | } | |
573 | ||
574 | static int | |
575 | model_crisv32_cmp_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
576 | { | |
577 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
578 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
579 | const IDESC * UNUSED idesc = abuf->idesc; | |
580 | int cycles = 0; | |
581 | { | |
582 | int referenced = 0; | |
583 | int UNUSED insn_referenced = abuf->written; | |
584 | INT in_Rs = -1; | |
585 | in_Rs = FLD (in_Rs); | |
586 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
587 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
588 | } | |
589 | { | |
590 | int referenced = 0; | |
591 | int UNUSED insn_referenced = abuf->written; | |
592 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
593 | } | |
594 | { | |
595 | int referenced = 0; | |
596 | int UNUSED insn_referenced = abuf->written; | |
597 | INT in_Rd = -1; | |
598 | INT in_Rs = -1; | |
599 | INT out_Rd = -1; | |
600 | in_Rd = FLD (in_Rd); | |
601 | in_Rs = FLD (in_Rs); | |
602 | referenced |= 1 << 0; | |
603 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
604 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
605 | } | |
606 | return cycles; | |
607 | #undef FLD | |
608 | } | |
609 | ||
610 | static int | |
611 | model_crisv32_cmpcbr (SIM_CPU *current_cpu, void *sem_arg) | |
612 | { | |
613 | #define FLD(f) abuf->fields.sfmt_bound_cb.f | |
614 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
615 | const IDESC * UNUSED idesc = abuf->idesc; | |
616 | int cycles = 0; | |
617 | { | |
618 | int referenced = 0; | |
619 | int UNUSED insn_referenced = abuf->written; | |
620 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
621 | } | |
622 | { | |
623 | int referenced = 0; | |
624 | int UNUSED insn_referenced = abuf->written; | |
625 | INT in_Rd = -1; | |
626 | INT in_Rs = -1; | |
627 | INT out_Rd = -1; | |
628 | in_Rd = FLD (in_Rd); | |
629 | referenced |= 1 << 0; | |
630 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
631 | } | |
632 | return cycles; | |
633 | #undef FLD | |
634 | } | |
635 | ||
636 | static int | |
637 | model_crisv32_cmpcwr (SIM_CPU *current_cpu, void *sem_arg) | |
638 | { | |
639 | #define FLD(f) abuf->fields.sfmt_bound_cw.f | |
640 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
641 | const IDESC * UNUSED idesc = abuf->idesc; | |
642 | int cycles = 0; | |
643 | { | |
644 | int referenced = 0; | |
645 | int UNUSED insn_referenced = abuf->written; | |
646 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
647 | } | |
648 | { | |
649 | int referenced = 0; | |
650 | int UNUSED insn_referenced = abuf->written; | |
651 | INT in_Rd = -1; | |
652 | INT in_Rs = -1; | |
653 | INT out_Rd = -1; | |
654 | in_Rd = FLD (in_Rd); | |
655 | referenced |= 1 << 0; | |
656 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
657 | } | |
658 | return cycles; | |
659 | #undef FLD | |
660 | } | |
661 | ||
662 | static int | |
663 | model_crisv32_cmpcdr (SIM_CPU *current_cpu, void *sem_arg) | |
664 | { | |
665 | #define FLD(f) abuf->fields.sfmt_bound_cd.f | |
666 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
667 | const IDESC * UNUSED idesc = abuf->idesc; | |
668 | int cycles = 0; | |
669 | { | |
670 | int referenced = 0; | |
671 | int UNUSED insn_referenced = abuf->written; | |
672 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
673 | } | |
674 | { | |
675 | int referenced = 0; | |
676 | int UNUSED insn_referenced = abuf->written; | |
677 | INT in_Rd = -1; | |
678 | INT in_Rs = -1; | |
679 | INT out_Rd = -1; | |
680 | in_Rd = FLD (in_Rd); | |
681 | referenced |= 1 << 0; | |
682 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
683 | } | |
684 | return cycles; | |
685 | #undef FLD | |
686 | } | |
687 | ||
688 | static int | |
689 | model_crisv32_cmpq (SIM_CPU *current_cpu, void *sem_arg) | |
690 | { | |
691 | #define FLD(f) abuf->fields.sfmt_andq.f | |
692 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
693 | const IDESC * UNUSED idesc = abuf->idesc; | |
694 | int cycles = 0; | |
695 | { | |
696 | int referenced = 0; | |
697 | int UNUSED insn_referenced = abuf->written; | |
698 | INT in_Rd = -1; | |
699 | INT in_Rs = -1; | |
700 | INT out_Rd = -1; | |
701 | in_Rd = FLD (in_Rd); | |
702 | referenced |= 1 << 0; | |
703 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
704 | } | |
705 | return cycles; | |
706 | #undef FLD | |
707 | } | |
708 | ||
709 | static int | |
710 | model_crisv32_cmps_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
711 | { | |
712 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
713 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
714 | const IDESC * UNUSED idesc = abuf->idesc; | |
715 | int cycles = 0; | |
716 | { | |
717 | int referenced = 0; | |
718 | int UNUSED insn_referenced = abuf->written; | |
719 | INT in_Rs = -1; | |
720 | in_Rs = FLD (in_Rs); | |
721 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
722 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
723 | } | |
724 | { | |
725 | int referenced = 0; | |
726 | int UNUSED insn_referenced = abuf->written; | |
727 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
728 | } | |
729 | { | |
730 | int referenced = 0; | |
731 | int UNUSED insn_referenced = abuf->written; | |
732 | INT in_Rd = -1; | |
733 | INT in_Rs = -1; | |
734 | INT out_Rd = -1; | |
735 | in_Rd = FLD (in_Rd); | |
736 | in_Rs = FLD (in_Rs); | |
737 | referenced |= 1 << 0; | |
738 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
739 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
740 | } | |
741 | return cycles; | |
742 | #undef FLD | |
743 | } | |
744 | ||
745 | static int | |
746 | model_crisv32_cmps_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
747 | { | |
748 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
749 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
750 | const IDESC * UNUSED idesc = abuf->idesc; | |
751 | int cycles = 0; | |
752 | { | |
753 | int referenced = 0; | |
754 | int UNUSED insn_referenced = abuf->written; | |
755 | INT in_Rs = -1; | |
756 | in_Rs = FLD (in_Rs); | |
757 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
758 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
759 | } | |
760 | { | |
761 | int referenced = 0; | |
762 | int UNUSED insn_referenced = abuf->written; | |
763 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
764 | } | |
765 | { | |
766 | int referenced = 0; | |
767 | int UNUSED insn_referenced = abuf->written; | |
768 | INT in_Rd = -1; | |
769 | INT in_Rs = -1; | |
770 | INT out_Rd = -1; | |
771 | in_Rd = FLD (in_Rd); | |
772 | in_Rs = FLD (in_Rs); | |
773 | referenced |= 1 << 0; | |
774 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
775 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
776 | } | |
777 | return cycles; | |
778 | #undef FLD | |
779 | } | |
780 | ||
781 | static int | |
782 | model_crisv32_cmpscbr (SIM_CPU *current_cpu, void *sem_arg) | |
783 | { | |
784 | #define FLD(f) abuf->fields.sfmt_bound_cb.f | |
785 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
786 | const IDESC * UNUSED idesc = abuf->idesc; | |
787 | int cycles = 0; | |
788 | { | |
789 | int referenced = 0; | |
790 | int UNUSED insn_referenced = abuf->written; | |
791 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
792 | } | |
793 | { | |
794 | int referenced = 0; | |
795 | int UNUSED insn_referenced = abuf->written; | |
796 | INT in_Rd = -1; | |
797 | INT in_Rs = -1; | |
798 | INT out_Rd = -1; | |
799 | in_Rd = FLD (in_Rd); | |
800 | referenced |= 1 << 0; | |
801 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
802 | } | |
803 | return cycles; | |
804 | #undef FLD | |
805 | } | |
806 | ||
807 | static int | |
808 | model_crisv32_cmpscwr (SIM_CPU *current_cpu, void *sem_arg) | |
809 | { | |
810 | #define FLD(f) abuf->fields.sfmt_bound_cw.f | |
811 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
812 | const IDESC * UNUSED idesc = abuf->idesc; | |
813 | int cycles = 0; | |
814 | { | |
815 | int referenced = 0; | |
816 | int UNUSED insn_referenced = abuf->written; | |
817 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
818 | } | |
819 | { | |
820 | int referenced = 0; | |
821 | int UNUSED insn_referenced = abuf->written; | |
822 | INT in_Rd = -1; | |
823 | INT in_Rs = -1; | |
824 | INT out_Rd = -1; | |
825 | in_Rd = FLD (in_Rd); | |
826 | referenced |= 1 << 0; | |
827 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
828 | } | |
829 | return cycles; | |
830 | #undef FLD | |
831 | } | |
832 | ||
833 | static int | |
834 | model_crisv32_cmpu_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
835 | { | |
836 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
837 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
838 | const IDESC * UNUSED idesc = abuf->idesc; | |
839 | int cycles = 0; | |
840 | { | |
841 | int referenced = 0; | |
842 | int UNUSED insn_referenced = abuf->written; | |
843 | INT in_Rs = -1; | |
844 | in_Rs = FLD (in_Rs); | |
845 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
846 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
847 | } | |
848 | { | |
849 | int referenced = 0; | |
850 | int UNUSED insn_referenced = abuf->written; | |
851 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
852 | } | |
853 | { | |
854 | int referenced = 0; | |
855 | int UNUSED insn_referenced = abuf->written; | |
856 | INT in_Rd = -1; | |
857 | INT in_Rs = -1; | |
858 | INT out_Rd = -1; | |
859 | in_Rd = FLD (in_Rd); | |
860 | in_Rs = FLD (in_Rs); | |
861 | referenced |= 1 << 0; | |
862 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
863 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
864 | } | |
865 | return cycles; | |
866 | #undef FLD | |
867 | } | |
868 | ||
869 | static int | |
870 | model_crisv32_cmpu_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
871 | { | |
872 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
873 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
874 | const IDESC * UNUSED idesc = abuf->idesc; | |
875 | int cycles = 0; | |
876 | { | |
877 | int referenced = 0; | |
878 | int UNUSED insn_referenced = abuf->written; | |
879 | INT in_Rs = -1; | |
880 | in_Rs = FLD (in_Rs); | |
881 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
882 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
883 | } | |
884 | { | |
885 | int referenced = 0; | |
886 | int UNUSED insn_referenced = abuf->written; | |
887 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
888 | } | |
889 | { | |
890 | int referenced = 0; | |
891 | int UNUSED insn_referenced = abuf->written; | |
892 | INT in_Rd = -1; | |
893 | INT in_Rs = -1; | |
894 | INT out_Rd = -1; | |
895 | in_Rd = FLD (in_Rd); | |
896 | in_Rs = FLD (in_Rs); | |
897 | referenced |= 1 << 0; | |
898 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
899 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
900 | } | |
901 | return cycles; | |
902 | #undef FLD | |
903 | } | |
904 | ||
905 | static int | |
906 | model_crisv32_cmpucbr (SIM_CPU *current_cpu, void *sem_arg) | |
907 | { | |
908 | #define FLD(f) abuf->fields.sfmt_bound_cb.f | |
909 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
910 | const IDESC * UNUSED idesc = abuf->idesc; | |
911 | int cycles = 0; | |
912 | { | |
913 | int referenced = 0; | |
914 | int UNUSED insn_referenced = abuf->written; | |
915 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
916 | } | |
917 | { | |
918 | int referenced = 0; | |
919 | int UNUSED insn_referenced = abuf->written; | |
920 | INT in_Rd = -1; | |
921 | INT in_Rs = -1; | |
922 | INT out_Rd = -1; | |
923 | in_Rd = FLD (in_Rd); | |
924 | referenced |= 1 << 0; | |
925 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
926 | } | |
927 | return cycles; | |
928 | #undef FLD | |
929 | } | |
930 | ||
931 | static int | |
932 | model_crisv32_cmpucwr (SIM_CPU *current_cpu, void *sem_arg) | |
933 | { | |
934 | #define FLD(f) abuf->fields.sfmt_bound_cw.f | |
935 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
936 | const IDESC * UNUSED idesc = abuf->idesc; | |
937 | int cycles = 0; | |
938 | { | |
939 | int referenced = 0; | |
940 | int UNUSED insn_referenced = abuf->written; | |
941 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
942 | } | |
943 | { | |
944 | int referenced = 0; | |
945 | int UNUSED insn_referenced = abuf->written; | |
946 | INT in_Rd = -1; | |
947 | INT in_Rs = -1; | |
948 | INT out_Rd = -1; | |
949 | in_Rd = FLD (in_Rd); | |
950 | referenced |= 1 << 0; | |
951 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
952 | } | |
953 | return cycles; | |
954 | #undef FLD | |
955 | } | |
956 | ||
957 | static int | |
958 | model_crisv32_move_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
959 | { | |
960 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
961 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
962 | const IDESC * UNUSED idesc = abuf->idesc; | |
963 | int cycles = 0; | |
964 | { | |
965 | int referenced = 0; | |
966 | int UNUSED insn_referenced = abuf->written; | |
967 | INT in_Rs = -1; | |
968 | in_Rs = FLD (in_Rs); | |
969 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
970 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
971 | } | |
972 | { | |
973 | int referenced = 0; | |
974 | int UNUSED insn_referenced = abuf->written; | |
975 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
976 | } | |
977 | { | |
978 | int referenced = 0; | |
979 | int UNUSED insn_referenced = abuf->written; | |
980 | INT in_Rd = -1; | |
981 | INT in_Rs = -1; | |
982 | INT out_Rd = -1; | |
983 | in_Rs = FLD (in_Rs); | |
984 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
985 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
986 | } | |
987 | return cycles; | |
988 | #undef FLD | |
989 | } | |
990 | ||
991 | static int | |
992 | model_crisv32_move_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
993 | { | |
994 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
995 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
996 | const IDESC * UNUSED idesc = abuf->idesc; | |
997 | int cycles = 0; | |
998 | { | |
999 | int referenced = 0; | |
1000 | int UNUSED insn_referenced = abuf->written; | |
1001 | INT in_Rs = -1; | |
1002 | in_Rs = FLD (in_Rs); | |
1003 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
1004 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1005 | } | |
1006 | { | |
1007 | int referenced = 0; | |
1008 | int UNUSED insn_referenced = abuf->written; | |
1009 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1010 | } | |
1011 | { | |
1012 | int referenced = 0; | |
1013 | int UNUSED insn_referenced = abuf->written; | |
1014 | INT in_Rd = -1; | |
1015 | INT in_Rs = -1; | |
1016 | INT out_Rd = -1; | |
1017 | in_Rs = FLD (in_Rs); | |
1018 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
1019 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
1020 | } | |
1021 | return cycles; | |
1022 | #undef FLD | |
1023 | } | |
1024 | ||
1025 | static int | |
1026 | model_crisv32_move_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
1027 | { | |
1028 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
1029 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1030 | const IDESC * UNUSED idesc = abuf->idesc; | |
1031 | int cycles = 0; | |
1032 | { | |
1033 | int referenced = 0; | |
1034 | int UNUSED insn_referenced = abuf->written; | |
1035 | INT in_Rs = -1; | |
1036 | in_Rs = FLD (in_Rs); | |
1037 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
1038 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1039 | } | |
1040 | { | |
1041 | int referenced = 0; | |
1042 | int UNUSED insn_referenced = abuf->written; | |
1043 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1044 | } | |
1045 | { | |
1046 | int referenced = 0; | |
1047 | int UNUSED insn_referenced = abuf->written; | |
1048 | INT in_Rd = -1; | |
1049 | INT in_Rs = -1; | |
1050 | INT out_Rd = -1; | |
1051 | in_Rs = FLD (in_Rs); | |
1052 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
1053 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
1054 | } | |
1055 | return cycles; | |
1056 | #undef FLD | |
1057 | } | |
1058 | ||
1059 | static int | |
1060 | model_crisv32_movs_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
1061 | { | |
1062 | #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f | |
1063 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1064 | const IDESC * UNUSED idesc = abuf->idesc; | |
1065 | int cycles = 0; | |
1066 | { | |
1067 | int referenced = 0; | |
1068 | int UNUSED insn_referenced = abuf->written; | |
1069 | INT in_Rs = -1; | |
1070 | in_Rs = FLD (in_Rs); | |
1071 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
1072 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1073 | } | |
1074 | { | |
1075 | int referenced = 0; | |
1076 | int UNUSED insn_referenced = abuf->written; | |
1077 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1078 | } | |
1079 | { | |
1080 | int referenced = 0; | |
1081 | int UNUSED insn_referenced = abuf->written; | |
1082 | INT in_Rd = -1; | |
1083 | INT in_Rs = -1; | |
1084 | INT out_Rd = -1; | |
1085 | in_Rs = FLD (in_Rs); | |
1086 | out_Rd = FLD (out_Rd); | |
1087 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
1088 | if (insn_referenced & (1 << 7)) referenced |= 1 << 2; | |
1089 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
1090 | } | |
1091 | return cycles; | |
1092 | #undef FLD | |
1093 | } | |
1094 | ||
1095 | static int | |
1096 | model_crisv32_movs_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
1097 | { | |
1098 | #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f | |
1099 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1100 | const IDESC * UNUSED idesc = abuf->idesc; | |
1101 | int cycles = 0; | |
1102 | { | |
1103 | int referenced = 0; | |
1104 | int UNUSED insn_referenced = abuf->written; | |
1105 | INT in_Rs = -1; | |
1106 | in_Rs = FLD (in_Rs); | |
1107 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
1108 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1109 | } | |
1110 | { | |
1111 | int referenced = 0; | |
1112 | int UNUSED insn_referenced = abuf->written; | |
1113 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1114 | } | |
1115 | { | |
1116 | int referenced = 0; | |
1117 | int UNUSED insn_referenced = abuf->written; | |
1118 | INT in_Rd = -1; | |
1119 | INT in_Rs = -1; | |
1120 | INT out_Rd = -1; | |
1121 | in_Rs = FLD (in_Rs); | |
1122 | out_Rd = FLD (out_Rd); | |
1123 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
1124 | if (insn_referenced & (1 << 7)) referenced |= 1 << 2; | |
1125 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
1126 | } | |
1127 | return cycles; | |
1128 | #undef FLD | |
1129 | } | |
1130 | ||
1131 | static int | |
1132 | model_crisv32_movu_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
1133 | { | |
1134 | #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f | |
1135 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1136 | const IDESC * UNUSED idesc = abuf->idesc; | |
1137 | int cycles = 0; | |
1138 | { | |
1139 | int referenced = 0; | |
1140 | int UNUSED insn_referenced = abuf->written; | |
1141 | INT in_Rs = -1; | |
1142 | in_Rs = FLD (in_Rs); | |
1143 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
1144 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1145 | } | |
1146 | { | |
1147 | int referenced = 0; | |
1148 | int UNUSED insn_referenced = abuf->written; | |
1149 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1150 | } | |
1151 | { | |
1152 | int referenced = 0; | |
1153 | int UNUSED insn_referenced = abuf->written; | |
1154 | INT in_Rd = -1; | |
1155 | INT in_Rs = -1; | |
1156 | INT out_Rd = -1; | |
1157 | in_Rs = FLD (in_Rs); | |
1158 | out_Rd = FLD (out_Rd); | |
1159 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
1160 | if (insn_referenced & (1 << 7)) referenced |= 1 << 2; | |
1161 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
1162 | } | |
1163 | return cycles; | |
1164 | #undef FLD | |
1165 | } | |
1166 | ||
1167 | static int | |
1168 | model_crisv32_movu_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
1169 | { | |
1170 | #define FLD(f) abuf->fields.sfmt_movs_m_b_m.f | |
1171 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1172 | const IDESC * UNUSED idesc = abuf->idesc; | |
1173 | int cycles = 0; | |
1174 | { | |
1175 | int referenced = 0; | |
1176 | int UNUSED insn_referenced = abuf->written; | |
1177 | INT in_Rs = -1; | |
1178 | in_Rs = FLD (in_Rs); | |
1179 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
1180 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1181 | } | |
1182 | { | |
1183 | int referenced = 0; | |
1184 | int UNUSED insn_referenced = abuf->written; | |
1185 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1186 | } | |
1187 | { | |
1188 | int referenced = 0; | |
1189 | int UNUSED insn_referenced = abuf->written; | |
1190 | INT in_Rd = -1; | |
1191 | INT in_Rs = -1; | |
1192 | INT out_Rd = -1; | |
1193 | in_Rs = FLD (in_Rs); | |
1194 | out_Rd = FLD (out_Rd); | |
1195 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
1196 | if (insn_referenced & (1 << 7)) referenced |= 1 << 2; | |
1197 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
1198 | } | |
1199 | return cycles; | |
1200 | #undef FLD | |
1201 | } | |
1202 | ||
1203 | static int | |
1204 | model_crisv32_move_r_sprv32 (SIM_CPU *current_cpu, void *sem_arg) | |
1205 | { | |
1206 | #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f | |
1207 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1208 | const IDESC * UNUSED idesc = abuf->idesc; | |
1209 | int cycles = 0; | |
1210 | { | |
1211 | int referenced = 0; | |
1212 | int UNUSED insn_referenced = abuf->written; | |
1213 | INT in_Rs = -1; | |
1214 | INT out_Pd = -1; | |
1215 | in_Rs = FLD (in_Rs); | |
1216 | out_Pd = FLD (out_Pd); | |
1217 | referenced |= 1 << 0; | |
1218 | if (insn_referenced & (1 << 2)) referenced |= 1 << 1; | |
1219 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 0, referenced, in_Rs, out_Pd); | |
1220 | } | |
1221 | return cycles; | |
1222 | #undef FLD | |
1223 | } | |
1224 | ||
1225 | static int | |
1226 | model_crisv32_move_spr_rv32 (SIM_CPU *current_cpu, void *sem_arg) | |
1227 | { | |
1228 | #define FLD(f) abuf->fields.sfmt_mcp.f | |
1229 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1230 | const IDESC * UNUSED idesc = abuf->idesc; | |
1231 | int cycles = 0; | |
1232 | { | |
1233 | int referenced = 0; | |
1234 | int UNUSED insn_referenced = abuf->written; | |
1235 | INT in_Rd = -1; | |
1236 | INT in_Rs = -1; | |
1237 | INT out_Rd = -1; | |
1238 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
1239 | } | |
1240 | return cycles; | |
1241 | #undef FLD | |
1242 | } | |
1243 | ||
1244 | static int | |
1245 | model_crisv32_move_m_sprv32 (SIM_CPU *current_cpu, void *sem_arg) | |
1246 | { | |
1247 | #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f | |
1248 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1249 | const IDESC * UNUSED idesc = abuf->idesc; | |
1250 | int cycles = 0; | |
1251 | { | |
1252 | int referenced = 0; | |
1253 | int UNUSED insn_referenced = abuf->written; | |
1254 | INT in_Rs = -1; | |
1255 | in_Rs = FLD (in_Rs); | |
1256 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
1257 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1258 | } | |
1259 | { | |
1260 | int referenced = 0; | |
1261 | int UNUSED insn_referenced = abuf->written; | |
1262 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1263 | } | |
1264 | { | |
1265 | int referenced = 0; | |
1266 | int UNUSED insn_referenced = abuf->written; | |
1267 | INT in_Rs = -1; | |
1268 | INT out_Pd = -1; | |
1269 | in_Rs = FLD (in_Rs); | |
1270 | out_Pd = FLD (out_Pd); | |
1271 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
1272 | referenced |= 1 << 1; | |
1273 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 2, referenced, in_Rs, out_Pd); | |
1274 | } | |
1275 | return cycles; | |
1276 | #undef FLD | |
1277 | } | |
1278 | ||
1279 | static int | |
1280 | model_crisv32_move_c_sprv32_p0 (SIM_CPU *current_cpu, void *sem_arg) | |
1281 | { | |
1282 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1283 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1284 | const IDESC * UNUSED idesc = abuf->idesc; | |
1285 | int cycles = 0; | |
1286 | { | |
1287 | int referenced = 0; | |
1288 | int UNUSED insn_referenced = abuf->written; | |
1289 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1290 | } | |
1291 | { | |
1292 | int referenced = 0; | |
1293 | int UNUSED insn_referenced = abuf->written; | |
1294 | INT in_Rs = -1; | |
1295 | INT out_Pd = -1; | |
1296 | out_Pd = FLD (out_Pd); | |
1297 | referenced |= 1 << 1; | |
1298 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1299 | } | |
1300 | return cycles; | |
1301 | #undef FLD | |
1302 | } | |
1303 | ||
1304 | static int | |
1305 | model_crisv32_move_c_sprv32_p1 (SIM_CPU *current_cpu, void *sem_arg) | |
1306 | { | |
1307 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1308 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1309 | const IDESC * UNUSED idesc = abuf->idesc; | |
1310 | int cycles = 0; | |
1311 | { | |
1312 | int referenced = 0; | |
1313 | int UNUSED insn_referenced = abuf->written; | |
1314 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1315 | } | |
1316 | { | |
1317 | int referenced = 0; | |
1318 | int UNUSED insn_referenced = abuf->written; | |
1319 | INT in_Rs = -1; | |
1320 | INT out_Pd = -1; | |
1321 | out_Pd = FLD (out_Pd); | |
1322 | referenced |= 1 << 1; | |
1323 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1324 | } | |
1325 | return cycles; | |
1326 | #undef FLD | |
1327 | } | |
1328 | ||
1329 | static int | |
1330 | model_crisv32_move_c_sprv32_p2 (SIM_CPU *current_cpu, void *sem_arg) | |
1331 | { | |
1332 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1333 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1334 | const IDESC * UNUSED idesc = abuf->idesc; | |
1335 | int cycles = 0; | |
1336 | { | |
1337 | int referenced = 0; | |
1338 | int UNUSED insn_referenced = abuf->written; | |
1339 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1340 | } | |
1341 | { | |
1342 | int referenced = 0; | |
1343 | int UNUSED insn_referenced = abuf->written; | |
1344 | INT in_Rs = -1; | |
1345 | INT out_Pd = -1; | |
1346 | out_Pd = FLD (out_Pd); | |
1347 | referenced |= 1 << 1; | |
1348 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1349 | } | |
1350 | return cycles; | |
1351 | #undef FLD | |
1352 | } | |
1353 | ||
1354 | static int | |
1355 | model_crisv32_move_c_sprv32_p3 (SIM_CPU *current_cpu, void *sem_arg) | |
1356 | { | |
1357 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1358 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1359 | const IDESC * UNUSED idesc = abuf->idesc; | |
1360 | int cycles = 0; | |
1361 | { | |
1362 | int referenced = 0; | |
1363 | int UNUSED insn_referenced = abuf->written; | |
1364 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1365 | } | |
1366 | { | |
1367 | int referenced = 0; | |
1368 | int UNUSED insn_referenced = abuf->written; | |
1369 | INT in_Rs = -1; | |
1370 | INT out_Pd = -1; | |
1371 | out_Pd = FLD (out_Pd); | |
1372 | referenced |= 1 << 1; | |
1373 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1374 | } | |
1375 | return cycles; | |
1376 | #undef FLD | |
1377 | } | |
1378 | ||
1379 | static int | |
1380 | model_crisv32_move_c_sprv32_p4 (SIM_CPU *current_cpu, void *sem_arg) | |
1381 | { | |
1382 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1383 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1384 | const IDESC * UNUSED idesc = abuf->idesc; | |
1385 | int cycles = 0; | |
1386 | { | |
1387 | int referenced = 0; | |
1388 | int UNUSED insn_referenced = abuf->written; | |
1389 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1390 | } | |
1391 | { | |
1392 | int referenced = 0; | |
1393 | int UNUSED insn_referenced = abuf->written; | |
1394 | INT in_Rs = -1; | |
1395 | INT out_Pd = -1; | |
1396 | out_Pd = FLD (out_Pd); | |
1397 | referenced |= 1 << 1; | |
1398 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1399 | } | |
1400 | return cycles; | |
1401 | #undef FLD | |
1402 | } | |
1403 | ||
1404 | static int | |
1405 | model_crisv32_move_c_sprv32_p5 (SIM_CPU *current_cpu, void *sem_arg) | |
1406 | { | |
1407 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1408 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1409 | const IDESC * UNUSED idesc = abuf->idesc; | |
1410 | int cycles = 0; | |
1411 | { | |
1412 | int referenced = 0; | |
1413 | int UNUSED insn_referenced = abuf->written; | |
1414 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1415 | } | |
1416 | { | |
1417 | int referenced = 0; | |
1418 | int UNUSED insn_referenced = abuf->written; | |
1419 | INT in_Rs = -1; | |
1420 | INT out_Pd = -1; | |
1421 | out_Pd = FLD (out_Pd); | |
1422 | referenced |= 1 << 1; | |
1423 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1424 | } | |
1425 | return cycles; | |
1426 | #undef FLD | |
1427 | } | |
1428 | ||
1429 | static int | |
1430 | model_crisv32_move_c_sprv32_p6 (SIM_CPU *current_cpu, void *sem_arg) | |
1431 | { | |
1432 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1433 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1434 | const IDESC * UNUSED idesc = abuf->idesc; | |
1435 | int cycles = 0; | |
1436 | { | |
1437 | int referenced = 0; | |
1438 | int UNUSED insn_referenced = abuf->written; | |
1439 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1440 | } | |
1441 | { | |
1442 | int referenced = 0; | |
1443 | int UNUSED insn_referenced = abuf->written; | |
1444 | INT in_Rs = -1; | |
1445 | INT out_Pd = -1; | |
1446 | out_Pd = FLD (out_Pd); | |
1447 | referenced |= 1 << 1; | |
1448 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1449 | } | |
1450 | return cycles; | |
1451 | #undef FLD | |
1452 | } | |
1453 | ||
1454 | static int | |
1455 | model_crisv32_move_c_sprv32_p7 (SIM_CPU *current_cpu, void *sem_arg) | |
1456 | { | |
1457 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1458 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1459 | const IDESC * UNUSED idesc = abuf->idesc; | |
1460 | int cycles = 0; | |
1461 | { | |
1462 | int referenced = 0; | |
1463 | int UNUSED insn_referenced = abuf->written; | |
1464 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1465 | } | |
1466 | { | |
1467 | int referenced = 0; | |
1468 | int UNUSED insn_referenced = abuf->written; | |
1469 | INT in_Rs = -1; | |
1470 | INT out_Pd = -1; | |
1471 | out_Pd = FLD (out_Pd); | |
1472 | referenced |= 1 << 1; | |
1473 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1474 | } | |
1475 | return cycles; | |
1476 | #undef FLD | |
1477 | } | |
1478 | ||
1479 | static int | |
1480 | model_crisv32_move_c_sprv32_p8 (SIM_CPU *current_cpu, void *sem_arg) | |
1481 | { | |
1482 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1483 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1484 | const IDESC * UNUSED idesc = abuf->idesc; | |
1485 | int cycles = 0; | |
1486 | { | |
1487 | int referenced = 0; | |
1488 | int UNUSED insn_referenced = abuf->written; | |
1489 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1490 | } | |
1491 | { | |
1492 | int referenced = 0; | |
1493 | int UNUSED insn_referenced = abuf->written; | |
1494 | INT in_Rs = -1; | |
1495 | INT out_Pd = -1; | |
1496 | out_Pd = FLD (out_Pd); | |
1497 | referenced |= 1 << 1; | |
1498 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1499 | } | |
1500 | return cycles; | |
1501 | #undef FLD | |
1502 | } | |
1503 | ||
1504 | static int | |
1505 | model_crisv32_move_c_sprv32_p9 (SIM_CPU *current_cpu, void *sem_arg) | |
1506 | { | |
1507 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1508 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1509 | const IDESC * UNUSED idesc = abuf->idesc; | |
1510 | int cycles = 0; | |
1511 | { | |
1512 | int referenced = 0; | |
1513 | int UNUSED insn_referenced = abuf->written; | |
1514 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1515 | } | |
1516 | { | |
1517 | int referenced = 0; | |
1518 | int UNUSED insn_referenced = abuf->written; | |
1519 | INT in_Rs = -1; | |
1520 | INT out_Pd = -1; | |
1521 | out_Pd = FLD (out_Pd); | |
1522 | referenced |= 1 << 1; | |
1523 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1524 | } | |
1525 | return cycles; | |
1526 | #undef FLD | |
1527 | } | |
1528 | ||
1529 | static int | |
1530 | model_crisv32_move_c_sprv32_p10 (SIM_CPU *current_cpu, void *sem_arg) | |
1531 | { | |
1532 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1533 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1534 | const IDESC * UNUSED idesc = abuf->idesc; | |
1535 | int cycles = 0; | |
1536 | { | |
1537 | int referenced = 0; | |
1538 | int UNUSED insn_referenced = abuf->written; | |
1539 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1540 | } | |
1541 | { | |
1542 | int referenced = 0; | |
1543 | int UNUSED insn_referenced = abuf->written; | |
1544 | INT in_Rs = -1; | |
1545 | INT out_Pd = -1; | |
1546 | out_Pd = FLD (out_Pd); | |
1547 | referenced |= 1 << 1; | |
1548 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1549 | } | |
1550 | return cycles; | |
1551 | #undef FLD | |
1552 | } | |
1553 | ||
1554 | static int | |
1555 | model_crisv32_move_c_sprv32_p11 (SIM_CPU *current_cpu, void *sem_arg) | |
1556 | { | |
1557 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1558 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1559 | const IDESC * UNUSED idesc = abuf->idesc; | |
1560 | int cycles = 0; | |
1561 | { | |
1562 | int referenced = 0; | |
1563 | int UNUSED insn_referenced = abuf->written; | |
1564 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1565 | } | |
1566 | { | |
1567 | int referenced = 0; | |
1568 | int UNUSED insn_referenced = abuf->written; | |
1569 | INT in_Rs = -1; | |
1570 | INT out_Pd = -1; | |
1571 | out_Pd = FLD (out_Pd); | |
1572 | referenced |= 1 << 1; | |
1573 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1574 | } | |
1575 | return cycles; | |
1576 | #undef FLD | |
1577 | } | |
1578 | ||
1579 | static int | |
1580 | model_crisv32_move_c_sprv32_p12 (SIM_CPU *current_cpu, void *sem_arg) | |
1581 | { | |
1582 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1583 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1584 | const IDESC * UNUSED idesc = abuf->idesc; | |
1585 | int cycles = 0; | |
1586 | { | |
1587 | int referenced = 0; | |
1588 | int UNUSED insn_referenced = abuf->written; | |
1589 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1590 | } | |
1591 | { | |
1592 | int referenced = 0; | |
1593 | int UNUSED insn_referenced = abuf->written; | |
1594 | INT in_Rs = -1; | |
1595 | INT out_Pd = -1; | |
1596 | out_Pd = FLD (out_Pd); | |
1597 | referenced |= 1 << 1; | |
1598 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1599 | } | |
1600 | return cycles; | |
1601 | #undef FLD | |
1602 | } | |
1603 | ||
1604 | static int | |
1605 | model_crisv32_move_c_sprv32_p13 (SIM_CPU *current_cpu, void *sem_arg) | |
1606 | { | |
1607 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1608 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1609 | const IDESC * UNUSED idesc = abuf->idesc; | |
1610 | int cycles = 0; | |
1611 | { | |
1612 | int referenced = 0; | |
1613 | int UNUSED insn_referenced = abuf->written; | |
1614 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1615 | } | |
1616 | { | |
1617 | int referenced = 0; | |
1618 | int UNUSED insn_referenced = abuf->written; | |
1619 | INT in_Rs = -1; | |
1620 | INT out_Pd = -1; | |
1621 | out_Pd = FLD (out_Pd); | |
1622 | referenced |= 1 << 1; | |
1623 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1624 | } | |
1625 | return cycles; | |
1626 | #undef FLD | |
1627 | } | |
1628 | ||
1629 | static int | |
1630 | model_crisv32_move_c_sprv32_p14 (SIM_CPU *current_cpu, void *sem_arg) | |
1631 | { | |
1632 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1633 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1634 | const IDESC * UNUSED idesc = abuf->idesc; | |
1635 | int cycles = 0; | |
1636 | { | |
1637 | int referenced = 0; | |
1638 | int UNUSED insn_referenced = abuf->written; | |
1639 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1640 | } | |
1641 | { | |
1642 | int referenced = 0; | |
1643 | int UNUSED insn_referenced = abuf->written; | |
1644 | INT in_Rs = -1; | |
1645 | INT out_Pd = -1; | |
1646 | out_Pd = FLD (out_Pd); | |
1647 | referenced |= 1 << 1; | |
1648 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1649 | } | |
1650 | return cycles; | |
1651 | #undef FLD | |
1652 | } | |
1653 | ||
1654 | static int | |
1655 | model_crisv32_move_c_sprv32_p15 (SIM_CPU *current_cpu, void *sem_arg) | |
1656 | { | |
1657 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
1658 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1659 | const IDESC * UNUSED idesc = abuf->idesc; | |
1660 | int cycles = 0; | |
1661 | { | |
1662 | int referenced = 0; | |
1663 | int UNUSED insn_referenced = abuf->written; | |
1664 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
1665 | } | |
1666 | { | |
1667 | int referenced = 0; | |
1668 | int UNUSED insn_referenced = abuf->written; | |
1669 | INT in_Rs = -1; | |
1670 | INT out_Pd = -1; | |
1671 | out_Pd = FLD (out_Pd); | |
1672 | referenced |= 1 << 1; | |
1673 | cycles += crisv32f_model_crisv32_u_exec_to_sr (current_cpu, idesc, 1, referenced, in_Rs, out_Pd); | |
1674 | } | |
1675 | return cycles; | |
1676 | #undef FLD | |
1677 | } | |
1678 | ||
1679 | static int | |
1680 | model_crisv32_move_spr_mv32 (SIM_CPU *current_cpu, void *sem_arg) | |
1681 | { | |
1682 | #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f | |
1683 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1684 | const IDESC * UNUSED idesc = abuf->idesc; | |
1685 | int cycles = 0; | |
1686 | { | |
1687 | int referenced = 0; | |
1688 | int UNUSED insn_referenced = abuf->written; | |
1689 | INT in_Rs = -1; | |
1690 | in_Rs = FLD (in_Rs); | |
1691 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
1692 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1693 | } | |
1694 | { | |
1695 | int referenced = 0; | |
1696 | int UNUSED insn_referenced = abuf->written; | |
1697 | INT in_Rd = -1; | |
1698 | INT in_Rs = -1; | |
1699 | INT out_Rd = -1; | |
1700 | in_Rs = FLD (in_Rs); | |
1701 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
1702 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
1703 | } | |
1704 | { | |
1705 | int referenced = 0; | |
1706 | int UNUSED insn_referenced = abuf->written; | |
1707 | cycles += crisv32f_model_crisv32_u_mem_w (current_cpu, idesc, 2, referenced); | |
1708 | } | |
1709 | return cycles; | |
1710 | #undef FLD | |
1711 | } | |
1712 | ||
1713 | static int | |
1714 | model_crisv32_move_ss_r (SIM_CPU *current_cpu, void *sem_arg) | |
1715 | { | |
1716 | #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f | |
1717 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1718 | const IDESC * UNUSED idesc = abuf->idesc; | |
1719 | int cycles = 0; | |
1720 | { | |
1721 | int referenced = 0; | |
1722 | int UNUSED insn_referenced = abuf->written; | |
1723 | INT in_Rd = -1; | |
1724 | INT in_Rs = -1; | |
1725 | INT out_Rd = -1; | |
1726 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
1727 | } | |
1728 | return cycles; | |
1729 | #undef FLD | |
1730 | } | |
1731 | ||
1732 | static int | |
1733 | model_crisv32_move_r_ss (SIM_CPU *current_cpu, void *sem_arg) | |
1734 | { | |
1735 | #define FLD(f) abuf->fields.sfmt_mcp.f | |
1736 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1737 | const IDESC * UNUSED idesc = abuf->idesc; | |
1738 | int cycles = 0; | |
1739 | { | |
1740 | int referenced = 0; | |
1741 | int UNUSED insn_referenced = abuf->written; | |
1742 | INT in_Rd = -1; | |
1743 | INT in_Rs = -1; | |
1744 | INT out_Rd = -1; | |
1745 | in_Rs = FLD (in_Rs); | |
1746 | referenced |= 1 << 1; | |
1747 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
1748 | } | |
1749 | return cycles; | |
1750 | #undef FLD | |
1751 | } | |
1752 | ||
1753 | static int | |
1754 | model_crisv32_movem_r_m_v32 (SIM_CPU *current_cpu, void *sem_arg) | |
1755 | { | |
1756 | #define FLD(f) abuf->fields.sfmt_movem_r_m_v32.f | |
1757 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1758 | const IDESC * UNUSED idesc = abuf->idesc; | |
1759 | int cycles = 0; | |
1760 | { | |
1761 | int referenced = 0; | |
1762 | int UNUSED insn_referenced = abuf->written; | |
1763 | INT in_Rs = -1; | |
1764 | in_Rs = FLD (in_Rs); | |
1765 | referenced |= 1 << 0; | |
1766 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1767 | } | |
1768 | { | |
1769 | int referenced = 0; | |
1770 | int UNUSED insn_referenced = abuf->written; | |
1771 | INT in_Rs = -1; | |
1772 | INT in_Rd = -1; | |
1773 | in_Rs = FLD (in_Rs); | |
1774 | in_Rd = FLD (in_Rd); | |
1775 | referenced |= 1 << 0; | |
1776 | referenced |= 1 << 1; | |
1777 | cycles += crisv32f_model_crisv32_u_movem_rtom (current_cpu, idesc, 1, referenced, in_Rs, in_Rd); | |
1778 | } | |
1779 | { | |
1780 | int referenced = 0; | |
1781 | int UNUSED insn_referenced = abuf->written; | |
1782 | INT in_Rs = -1; | |
1783 | INT out_Rd = -1; | |
1784 | in_Rs = FLD (in_Rs); | |
1785 | referenced |= 1 << 0; | |
1786 | cycles += crisv32f_model_crisv32_u_exec_movem (current_cpu, idesc, 2, referenced, in_Rs, out_Rd); | |
1787 | } | |
1788 | { | |
1789 | int referenced = 0; | |
1790 | int UNUSED insn_referenced = abuf->written; | |
1791 | cycles += crisv32f_model_crisv32_u_mem_w (current_cpu, idesc, 3, referenced); | |
1792 | } | |
1793 | return cycles; | |
1794 | #undef FLD | |
1795 | } | |
1796 | ||
1797 | static int | |
1798 | model_crisv32_movem_m_r_v32 (SIM_CPU *current_cpu, void *sem_arg) | |
1799 | { | |
1800 | #define FLD(f) abuf->fields.sfmt_movem_m_r_v32.f | |
1801 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1802 | const IDESC * UNUSED idesc = abuf->idesc; | |
1803 | int cycles = 0; | |
1804 | { | |
1805 | int referenced = 0; | |
1806 | int UNUSED insn_referenced = abuf->written; | |
1807 | INT in_Rs = -1; | |
1808 | in_Rs = FLD (in_Rs); | |
1809 | referenced |= 1 << 0; | |
1810 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1811 | } | |
1812 | { | |
1813 | int referenced = 0; | |
1814 | int UNUSED insn_referenced = abuf->written; | |
1815 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1816 | } | |
1817 | { | |
1818 | int referenced = 0; | |
1819 | int UNUSED insn_referenced = abuf->written; | |
1820 | INT in_Rs = -1; | |
1821 | INT in_Rd = -1; | |
1822 | in_Rs = FLD (in_Rs); | |
1823 | in_Rd = FLD (in_Rd); | |
1824 | referenced |= 1 << 0; | |
1825 | referenced |= 1 << 1; | |
1826 | cycles += crisv32f_model_crisv32_u_movem_mtor (current_cpu, idesc, 2, referenced, in_Rs, in_Rd); | |
1827 | } | |
1828 | { | |
1829 | int referenced = 0; | |
1830 | int UNUSED insn_referenced = abuf->written; | |
1831 | INT in_Rs = -1; | |
1832 | INT out_Rd = -1; | |
1833 | in_Rs = FLD (in_Rs); | |
1834 | referenced |= 1 << 0; | |
1835 | cycles += crisv32f_model_crisv32_u_exec_movem (current_cpu, idesc, 3, referenced, in_Rs, out_Rd); | |
1836 | } | |
1837 | return cycles; | |
1838 | #undef FLD | |
1839 | } | |
1840 | ||
1841 | static int | |
1842 | model_crisv32_add_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
1843 | { | |
1844 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
1845 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1846 | const IDESC * UNUSED idesc = abuf->idesc; | |
1847 | int cycles = 0; | |
1848 | { | |
1849 | int referenced = 0; | |
1850 | int UNUSED insn_referenced = abuf->written; | |
1851 | INT in_Rd = -1; | |
1852 | INT in_Rs = -1; | |
1853 | INT out_Rd = -1; | |
1854 | in_Rd = FLD (in_Rd); | |
1855 | in_Rs = FLD (in_Rs); | |
1856 | referenced |= 1 << 0; | |
1857 | referenced |= 1 << 1; | |
1858 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
1859 | } | |
1860 | return cycles; | |
1861 | #undef FLD | |
1862 | } | |
1863 | ||
1864 | static int | |
1865 | model_crisv32_add_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
1866 | { | |
1867 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
1868 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1869 | const IDESC * UNUSED idesc = abuf->idesc; | |
1870 | int cycles = 0; | |
1871 | { | |
1872 | int referenced = 0; | |
1873 | int UNUSED insn_referenced = abuf->written; | |
1874 | INT in_Rd = -1; | |
1875 | INT in_Rs = -1; | |
1876 | INT out_Rd = -1; | |
1877 | in_Rd = FLD (in_Rd); | |
1878 | in_Rs = FLD (in_Rs); | |
1879 | referenced |= 1 << 0; | |
1880 | referenced |= 1 << 1; | |
1881 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
1882 | } | |
1883 | return cycles; | |
1884 | #undef FLD | |
1885 | } | |
1886 | ||
1887 | static int | |
1888 | model_crisv32_add_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
1889 | { | |
1890 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
1891 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1892 | const IDESC * UNUSED idesc = abuf->idesc; | |
1893 | int cycles = 0; | |
1894 | { | |
1895 | int referenced = 0; | |
1896 | int UNUSED insn_referenced = abuf->written; | |
1897 | INT in_Rd = -1; | |
1898 | INT in_Rs = -1; | |
1899 | INT out_Rd = -1; | |
1900 | in_Rd = FLD (in_Rd); | |
1901 | in_Rs = FLD (in_Rs); | |
1902 | referenced |= 1 << 0; | |
1903 | referenced |= 1 << 1; | |
1904 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
1905 | } | |
1906 | return cycles; | |
1907 | #undef FLD | |
1908 | } | |
1909 | ||
1910 | static int | |
1911 | model_crisv32_add_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
1912 | { | |
1913 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
1914 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1915 | const IDESC * UNUSED idesc = abuf->idesc; | |
1916 | int cycles = 0; | |
1917 | { | |
1918 | int referenced = 0; | |
1919 | int UNUSED insn_referenced = abuf->written; | |
1920 | INT in_Rs = -1; | |
1921 | in_Rs = FLD (in_Rs); | |
1922 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
1923 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1924 | } | |
1925 | { | |
1926 | int referenced = 0; | |
1927 | int UNUSED insn_referenced = abuf->written; | |
1928 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1929 | } | |
1930 | { | |
1931 | int referenced = 0; | |
1932 | int UNUSED insn_referenced = abuf->written; | |
1933 | INT in_Rd = -1; | |
1934 | INT in_Rs = -1; | |
1935 | INT out_Rd = -1; | |
1936 | in_Rd = FLD (in_Rd); | |
1937 | in_Rs = FLD (in_Rs); | |
1938 | referenced |= 1 << 0; | |
1939 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
1940 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
1941 | } | |
1942 | return cycles; | |
1943 | #undef FLD | |
1944 | } | |
1945 | ||
1946 | static int | |
1947 | model_crisv32_add_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
1948 | { | |
1949 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
1950 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1951 | const IDESC * UNUSED idesc = abuf->idesc; | |
1952 | int cycles = 0; | |
1953 | { | |
1954 | int referenced = 0; | |
1955 | int UNUSED insn_referenced = abuf->written; | |
1956 | INT in_Rs = -1; | |
1957 | in_Rs = FLD (in_Rs); | |
1958 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
1959 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1960 | } | |
1961 | { | |
1962 | int referenced = 0; | |
1963 | int UNUSED insn_referenced = abuf->written; | |
1964 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
1965 | } | |
1966 | { | |
1967 | int referenced = 0; | |
1968 | int UNUSED insn_referenced = abuf->written; | |
1969 | INT in_Rd = -1; | |
1970 | INT in_Rs = -1; | |
1971 | INT out_Rd = -1; | |
1972 | in_Rd = FLD (in_Rd); | |
1973 | in_Rs = FLD (in_Rs); | |
1974 | referenced |= 1 << 0; | |
1975 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
1976 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
1977 | } | |
1978 | return cycles; | |
1979 | #undef FLD | |
1980 | } | |
1981 | ||
1982 | static int | |
1983 | model_crisv32_add_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
1984 | { | |
1985 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
1986 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
1987 | const IDESC * UNUSED idesc = abuf->idesc; | |
1988 | int cycles = 0; | |
1989 | { | |
1990 | int referenced = 0; | |
1991 | int UNUSED insn_referenced = abuf->written; | |
1992 | INT in_Rs = -1; | |
1993 | in_Rs = FLD (in_Rs); | |
1994 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
1995 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
1996 | } | |
1997 | { | |
1998 | int referenced = 0; | |
1999 | int UNUSED insn_referenced = abuf->written; | |
2000 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2001 | } | |
2002 | { | |
2003 | int referenced = 0; | |
2004 | int UNUSED insn_referenced = abuf->written; | |
2005 | INT in_Rd = -1; | |
2006 | INT in_Rs = -1; | |
2007 | INT out_Rd = -1; | |
2008 | in_Rd = FLD (in_Rd); | |
2009 | in_Rs = FLD (in_Rs); | |
2010 | referenced |= 1 << 0; | |
2011 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2012 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2013 | } | |
2014 | return cycles; | |
2015 | #undef FLD | |
2016 | } | |
2017 | ||
2018 | static int | |
2019 | model_crisv32_addcbr (SIM_CPU *current_cpu, void *sem_arg) | |
2020 | { | |
2021 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
2022 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2023 | const IDESC * UNUSED idesc = abuf->idesc; | |
2024 | int cycles = 0; | |
2025 | { | |
2026 | int referenced = 0; | |
2027 | int UNUSED insn_referenced = abuf->written; | |
2028 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2029 | } | |
2030 | { | |
2031 | int referenced = 0; | |
2032 | int UNUSED insn_referenced = abuf->written; | |
2033 | INT in_Rd = -1; | |
2034 | INT in_Rs = -1; | |
2035 | INT out_Rd = -1; | |
2036 | in_Rd = FLD (in_Rd); | |
2037 | referenced |= 1 << 0; | |
2038 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2039 | } | |
2040 | return cycles; | |
2041 | #undef FLD | |
2042 | } | |
2043 | ||
2044 | static int | |
2045 | model_crisv32_addcwr (SIM_CPU *current_cpu, void *sem_arg) | |
2046 | { | |
2047 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
2048 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2049 | const IDESC * UNUSED idesc = abuf->idesc; | |
2050 | int cycles = 0; | |
2051 | { | |
2052 | int referenced = 0; | |
2053 | int UNUSED insn_referenced = abuf->written; | |
2054 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2055 | } | |
2056 | { | |
2057 | int referenced = 0; | |
2058 | int UNUSED insn_referenced = abuf->written; | |
2059 | INT in_Rd = -1; | |
2060 | INT in_Rs = -1; | |
2061 | INT out_Rd = -1; | |
2062 | in_Rd = FLD (in_Rd); | |
2063 | referenced |= 1 << 0; | |
2064 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2065 | } | |
2066 | return cycles; | |
2067 | #undef FLD | |
2068 | } | |
2069 | ||
2070 | static int | |
2071 | model_crisv32_addcdr (SIM_CPU *current_cpu, void *sem_arg) | |
2072 | { | |
2073 | #define FLD(f) abuf->fields.sfmt_addcdr.f | |
2074 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2075 | const IDESC * UNUSED idesc = abuf->idesc; | |
2076 | int cycles = 0; | |
2077 | { | |
2078 | int referenced = 0; | |
2079 | int UNUSED insn_referenced = abuf->written; | |
2080 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
2081 | } | |
2082 | { | |
2083 | int referenced = 0; | |
2084 | int UNUSED insn_referenced = abuf->written; | |
2085 | INT in_Rd = -1; | |
2086 | INT in_Rs = -1; | |
2087 | INT out_Rd = -1; | |
2088 | in_Rd = FLD (in_Rd); | |
2089 | referenced |= 1 << 0; | |
2090 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2091 | } | |
2092 | return cycles; | |
2093 | #undef FLD | |
2094 | } | |
2095 | ||
2096 | static int | |
2097 | model_crisv32_adds_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
2098 | { | |
2099 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2100 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2101 | const IDESC * UNUSED idesc = abuf->idesc; | |
2102 | int cycles = 0; | |
2103 | { | |
2104 | int referenced = 0; | |
2105 | int UNUSED insn_referenced = abuf->written; | |
2106 | INT in_Rd = -1; | |
2107 | INT in_Rs = -1; | |
2108 | INT out_Rd = -1; | |
2109 | in_Rd = FLD (in_Rd); | |
2110 | in_Rs = FLD (in_Rs); | |
2111 | referenced |= 1 << 0; | |
2112 | referenced |= 1 << 1; | |
2113 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2114 | } | |
2115 | return cycles; | |
2116 | #undef FLD | |
2117 | } | |
2118 | ||
2119 | static int | |
2120 | model_crisv32_adds_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
2121 | { | |
2122 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2123 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2124 | const IDESC * UNUSED idesc = abuf->idesc; | |
2125 | int cycles = 0; | |
2126 | { | |
2127 | int referenced = 0; | |
2128 | int UNUSED insn_referenced = abuf->written; | |
2129 | INT in_Rd = -1; | |
2130 | INT in_Rs = -1; | |
2131 | INT out_Rd = -1; | |
2132 | in_Rd = FLD (in_Rd); | |
2133 | in_Rs = FLD (in_Rs); | |
2134 | referenced |= 1 << 0; | |
2135 | referenced |= 1 << 1; | |
2136 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2137 | } | |
2138 | return cycles; | |
2139 | #undef FLD | |
2140 | } | |
2141 | ||
2142 | static int | |
2143 | model_crisv32_adds_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
2144 | { | |
2145 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2146 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2147 | const IDESC * UNUSED idesc = abuf->idesc; | |
2148 | int cycles = 0; | |
2149 | { | |
2150 | int referenced = 0; | |
2151 | int UNUSED insn_referenced = abuf->written; | |
2152 | INT in_Rs = -1; | |
2153 | in_Rs = FLD (in_Rs); | |
2154 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2155 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2156 | } | |
2157 | { | |
2158 | int referenced = 0; | |
2159 | int UNUSED insn_referenced = abuf->written; | |
2160 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2161 | } | |
2162 | { | |
2163 | int referenced = 0; | |
2164 | int UNUSED insn_referenced = abuf->written; | |
2165 | INT in_Rd = -1; | |
2166 | INT in_Rs = -1; | |
2167 | INT out_Rd = -1; | |
2168 | in_Rd = FLD (in_Rd); | |
2169 | in_Rs = FLD (in_Rs); | |
2170 | referenced |= 1 << 0; | |
2171 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2172 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2173 | } | |
2174 | return cycles; | |
2175 | #undef FLD | |
2176 | } | |
2177 | ||
2178 | static int | |
2179 | model_crisv32_adds_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
2180 | { | |
2181 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2182 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2183 | const IDESC * UNUSED idesc = abuf->idesc; | |
2184 | int cycles = 0; | |
2185 | { | |
2186 | int referenced = 0; | |
2187 | int UNUSED insn_referenced = abuf->written; | |
2188 | INT in_Rs = -1; | |
2189 | in_Rs = FLD (in_Rs); | |
2190 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2191 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2192 | } | |
2193 | { | |
2194 | int referenced = 0; | |
2195 | int UNUSED insn_referenced = abuf->written; | |
2196 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2197 | } | |
2198 | { | |
2199 | int referenced = 0; | |
2200 | int UNUSED insn_referenced = abuf->written; | |
2201 | INT in_Rd = -1; | |
2202 | INT in_Rs = -1; | |
2203 | INT out_Rd = -1; | |
2204 | in_Rd = FLD (in_Rd); | |
2205 | in_Rs = FLD (in_Rs); | |
2206 | referenced |= 1 << 0; | |
2207 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2208 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2209 | } | |
2210 | return cycles; | |
2211 | #undef FLD | |
2212 | } | |
2213 | ||
2214 | static int | |
2215 | model_crisv32_addscbr (SIM_CPU *current_cpu, void *sem_arg) | |
2216 | { | |
2217 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
2218 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2219 | const IDESC * UNUSED idesc = abuf->idesc; | |
2220 | int cycles = 0; | |
2221 | { | |
2222 | int referenced = 0; | |
2223 | int UNUSED insn_referenced = abuf->written; | |
2224 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2225 | } | |
2226 | { | |
2227 | int referenced = 0; | |
2228 | int UNUSED insn_referenced = abuf->written; | |
2229 | INT in_Rd = -1; | |
2230 | INT in_Rs = -1; | |
2231 | INT out_Rd = -1; | |
2232 | in_Rd = FLD (in_Rd); | |
2233 | referenced |= 1 << 0; | |
2234 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2235 | } | |
2236 | return cycles; | |
2237 | #undef FLD | |
2238 | } | |
2239 | ||
2240 | static int | |
2241 | model_crisv32_addscwr (SIM_CPU *current_cpu, void *sem_arg) | |
2242 | { | |
2243 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
2244 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2245 | const IDESC * UNUSED idesc = abuf->idesc; | |
2246 | int cycles = 0; | |
2247 | { | |
2248 | int referenced = 0; | |
2249 | int UNUSED insn_referenced = abuf->written; | |
2250 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2251 | } | |
2252 | { | |
2253 | int referenced = 0; | |
2254 | int UNUSED insn_referenced = abuf->written; | |
2255 | INT in_Rd = -1; | |
2256 | INT in_Rs = -1; | |
2257 | INT out_Rd = -1; | |
2258 | in_Rd = FLD (in_Rd); | |
2259 | referenced |= 1 << 0; | |
2260 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2261 | } | |
2262 | return cycles; | |
2263 | #undef FLD | |
2264 | } | |
2265 | ||
2266 | static int | |
2267 | model_crisv32_addu_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
2268 | { | |
2269 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2270 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2271 | const IDESC * UNUSED idesc = abuf->idesc; | |
2272 | int cycles = 0; | |
2273 | { | |
2274 | int referenced = 0; | |
2275 | int UNUSED insn_referenced = abuf->written; | |
2276 | INT in_Rd = -1; | |
2277 | INT in_Rs = -1; | |
2278 | INT out_Rd = -1; | |
2279 | in_Rd = FLD (in_Rd); | |
2280 | in_Rs = FLD (in_Rs); | |
2281 | referenced |= 1 << 0; | |
2282 | referenced |= 1 << 1; | |
2283 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2284 | } | |
2285 | return cycles; | |
2286 | #undef FLD | |
2287 | } | |
2288 | ||
2289 | static int | |
2290 | model_crisv32_addu_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
2291 | { | |
2292 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2293 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2294 | const IDESC * UNUSED idesc = abuf->idesc; | |
2295 | int cycles = 0; | |
2296 | { | |
2297 | int referenced = 0; | |
2298 | int UNUSED insn_referenced = abuf->written; | |
2299 | INT in_Rd = -1; | |
2300 | INT in_Rs = -1; | |
2301 | INT out_Rd = -1; | |
2302 | in_Rd = FLD (in_Rd); | |
2303 | in_Rs = FLD (in_Rs); | |
2304 | referenced |= 1 << 0; | |
2305 | referenced |= 1 << 1; | |
2306 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2307 | } | |
2308 | return cycles; | |
2309 | #undef FLD | |
2310 | } | |
2311 | ||
2312 | static int | |
2313 | model_crisv32_addu_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
2314 | { | |
2315 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2316 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2317 | const IDESC * UNUSED idesc = abuf->idesc; | |
2318 | int cycles = 0; | |
2319 | { | |
2320 | int referenced = 0; | |
2321 | int UNUSED insn_referenced = abuf->written; | |
2322 | INT in_Rs = -1; | |
2323 | in_Rs = FLD (in_Rs); | |
2324 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2325 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2326 | } | |
2327 | { | |
2328 | int referenced = 0; | |
2329 | int UNUSED insn_referenced = abuf->written; | |
2330 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2331 | } | |
2332 | { | |
2333 | int referenced = 0; | |
2334 | int UNUSED insn_referenced = abuf->written; | |
2335 | INT in_Rd = -1; | |
2336 | INT in_Rs = -1; | |
2337 | INT out_Rd = -1; | |
2338 | in_Rd = FLD (in_Rd); | |
2339 | in_Rs = FLD (in_Rs); | |
2340 | referenced |= 1 << 0; | |
2341 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2342 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2343 | } | |
2344 | return cycles; | |
2345 | #undef FLD | |
2346 | } | |
2347 | ||
2348 | static int | |
2349 | model_crisv32_addu_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
2350 | { | |
2351 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2352 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2353 | const IDESC * UNUSED idesc = abuf->idesc; | |
2354 | int cycles = 0; | |
2355 | { | |
2356 | int referenced = 0; | |
2357 | int UNUSED insn_referenced = abuf->written; | |
2358 | INT in_Rs = -1; | |
2359 | in_Rs = FLD (in_Rs); | |
2360 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2361 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2362 | } | |
2363 | { | |
2364 | int referenced = 0; | |
2365 | int UNUSED insn_referenced = abuf->written; | |
2366 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2367 | } | |
2368 | { | |
2369 | int referenced = 0; | |
2370 | int UNUSED insn_referenced = abuf->written; | |
2371 | INT in_Rd = -1; | |
2372 | INT in_Rs = -1; | |
2373 | INT out_Rd = -1; | |
2374 | in_Rd = FLD (in_Rd); | |
2375 | in_Rs = FLD (in_Rs); | |
2376 | referenced |= 1 << 0; | |
2377 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2378 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2379 | } | |
2380 | return cycles; | |
2381 | #undef FLD | |
2382 | } | |
2383 | ||
2384 | static int | |
2385 | model_crisv32_adducbr (SIM_CPU *current_cpu, void *sem_arg) | |
2386 | { | |
2387 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
2388 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2389 | const IDESC * UNUSED idesc = abuf->idesc; | |
2390 | int cycles = 0; | |
2391 | { | |
2392 | int referenced = 0; | |
2393 | int UNUSED insn_referenced = abuf->written; | |
2394 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2395 | } | |
2396 | { | |
2397 | int referenced = 0; | |
2398 | int UNUSED insn_referenced = abuf->written; | |
2399 | INT in_Rd = -1; | |
2400 | INT in_Rs = -1; | |
2401 | INT out_Rd = -1; | |
2402 | in_Rd = FLD (in_Rd); | |
2403 | referenced |= 1 << 0; | |
2404 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2405 | } | |
2406 | return cycles; | |
2407 | #undef FLD | |
2408 | } | |
2409 | ||
2410 | static int | |
2411 | model_crisv32_adducwr (SIM_CPU *current_cpu, void *sem_arg) | |
2412 | { | |
2413 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
2414 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2415 | const IDESC * UNUSED idesc = abuf->idesc; | |
2416 | int cycles = 0; | |
2417 | { | |
2418 | int referenced = 0; | |
2419 | int UNUSED insn_referenced = abuf->written; | |
2420 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2421 | } | |
2422 | { | |
2423 | int referenced = 0; | |
2424 | int UNUSED insn_referenced = abuf->written; | |
2425 | INT in_Rd = -1; | |
2426 | INT in_Rs = -1; | |
2427 | INT out_Rd = -1; | |
2428 | in_Rd = FLD (in_Rd); | |
2429 | referenced |= 1 << 0; | |
2430 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2431 | } | |
2432 | return cycles; | |
2433 | #undef FLD | |
2434 | } | |
2435 | ||
2436 | static int | |
2437 | model_crisv32_sub_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
2438 | { | |
2439 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2440 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2441 | const IDESC * UNUSED idesc = abuf->idesc; | |
2442 | int cycles = 0; | |
2443 | { | |
2444 | int referenced = 0; | |
2445 | int UNUSED insn_referenced = abuf->written; | |
2446 | INT in_Rd = -1; | |
2447 | INT in_Rs = -1; | |
2448 | INT out_Rd = -1; | |
2449 | in_Rd = FLD (in_Rd); | |
2450 | in_Rs = FLD (in_Rs); | |
2451 | referenced |= 1 << 0; | |
2452 | referenced |= 1 << 1; | |
2453 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2454 | } | |
2455 | return cycles; | |
2456 | #undef FLD | |
2457 | } | |
2458 | ||
2459 | static int | |
2460 | model_crisv32_sub_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
2461 | { | |
2462 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2463 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2464 | const IDESC * UNUSED idesc = abuf->idesc; | |
2465 | int cycles = 0; | |
2466 | { | |
2467 | int referenced = 0; | |
2468 | int UNUSED insn_referenced = abuf->written; | |
2469 | INT in_Rd = -1; | |
2470 | INT in_Rs = -1; | |
2471 | INT out_Rd = -1; | |
2472 | in_Rd = FLD (in_Rd); | |
2473 | in_Rs = FLD (in_Rs); | |
2474 | referenced |= 1 << 0; | |
2475 | referenced |= 1 << 1; | |
2476 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2477 | } | |
2478 | return cycles; | |
2479 | #undef FLD | |
2480 | } | |
2481 | ||
2482 | static int | |
2483 | model_crisv32_sub_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
2484 | { | |
2485 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2486 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2487 | const IDESC * UNUSED idesc = abuf->idesc; | |
2488 | int cycles = 0; | |
2489 | { | |
2490 | int referenced = 0; | |
2491 | int UNUSED insn_referenced = abuf->written; | |
2492 | INT in_Rd = -1; | |
2493 | INT in_Rs = -1; | |
2494 | INT out_Rd = -1; | |
2495 | in_Rd = FLD (in_Rd); | |
2496 | in_Rs = FLD (in_Rs); | |
2497 | referenced |= 1 << 0; | |
2498 | referenced |= 1 << 1; | |
2499 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2500 | } | |
2501 | return cycles; | |
2502 | #undef FLD | |
2503 | } | |
2504 | ||
2505 | static int | |
2506 | model_crisv32_sub_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
2507 | { | |
2508 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2509 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2510 | const IDESC * UNUSED idesc = abuf->idesc; | |
2511 | int cycles = 0; | |
2512 | { | |
2513 | int referenced = 0; | |
2514 | int UNUSED insn_referenced = abuf->written; | |
2515 | INT in_Rs = -1; | |
2516 | in_Rs = FLD (in_Rs); | |
2517 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2518 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2519 | } | |
2520 | { | |
2521 | int referenced = 0; | |
2522 | int UNUSED insn_referenced = abuf->written; | |
2523 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2524 | } | |
2525 | { | |
2526 | int referenced = 0; | |
2527 | int UNUSED insn_referenced = abuf->written; | |
2528 | INT in_Rd = -1; | |
2529 | INT in_Rs = -1; | |
2530 | INT out_Rd = -1; | |
2531 | in_Rd = FLD (in_Rd); | |
2532 | in_Rs = FLD (in_Rs); | |
2533 | referenced |= 1 << 0; | |
2534 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2535 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2536 | } | |
2537 | return cycles; | |
2538 | #undef FLD | |
2539 | } | |
2540 | ||
2541 | static int | |
2542 | model_crisv32_sub_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
2543 | { | |
2544 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2545 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2546 | const IDESC * UNUSED idesc = abuf->idesc; | |
2547 | int cycles = 0; | |
2548 | { | |
2549 | int referenced = 0; | |
2550 | int UNUSED insn_referenced = abuf->written; | |
2551 | INT in_Rs = -1; | |
2552 | in_Rs = FLD (in_Rs); | |
2553 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2554 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2555 | } | |
2556 | { | |
2557 | int referenced = 0; | |
2558 | int UNUSED insn_referenced = abuf->written; | |
2559 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2560 | } | |
2561 | { | |
2562 | int referenced = 0; | |
2563 | int UNUSED insn_referenced = abuf->written; | |
2564 | INT in_Rd = -1; | |
2565 | INT in_Rs = -1; | |
2566 | INT out_Rd = -1; | |
2567 | in_Rd = FLD (in_Rd); | |
2568 | in_Rs = FLD (in_Rs); | |
2569 | referenced |= 1 << 0; | |
2570 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2571 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2572 | } | |
2573 | return cycles; | |
2574 | #undef FLD | |
2575 | } | |
2576 | ||
2577 | static int | |
2578 | model_crisv32_sub_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
2579 | { | |
2580 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2581 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2582 | const IDESC * UNUSED idesc = abuf->idesc; | |
2583 | int cycles = 0; | |
2584 | { | |
2585 | int referenced = 0; | |
2586 | int UNUSED insn_referenced = abuf->written; | |
2587 | INT in_Rs = -1; | |
2588 | in_Rs = FLD (in_Rs); | |
2589 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2590 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2591 | } | |
2592 | { | |
2593 | int referenced = 0; | |
2594 | int UNUSED insn_referenced = abuf->written; | |
2595 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2596 | } | |
2597 | { | |
2598 | int referenced = 0; | |
2599 | int UNUSED insn_referenced = abuf->written; | |
2600 | INT in_Rd = -1; | |
2601 | INT in_Rs = -1; | |
2602 | INT out_Rd = -1; | |
2603 | in_Rd = FLD (in_Rd); | |
2604 | in_Rs = FLD (in_Rs); | |
2605 | referenced |= 1 << 0; | |
2606 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2607 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2608 | } | |
2609 | return cycles; | |
2610 | #undef FLD | |
2611 | } | |
2612 | ||
2613 | static int | |
2614 | model_crisv32_subcbr (SIM_CPU *current_cpu, void *sem_arg) | |
2615 | { | |
2616 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
2617 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2618 | const IDESC * UNUSED idesc = abuf->idesc; | |
2619 | int cycles = 0; | |
2620 | { | |
2621 | int referenced = 0; | |
2622 | int UNUSED insn_referenced = abuf->written; | |
2623 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2624 | } | |
2625 | { | |
2626 | int referenced = 0; | |
2627 | int UNUSED insn_referenced = abuf->written; | |
2628 | INT in_Rd = -1; | |
2629 | INT in_Rs = -1; | |
2630 | INT out_Rd = -1; | |
2631 | in_Rd = FLD (in_Rd); | |
2632 | referenced |= 1 << 0; | |
2633 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2634 | } | |
2635 | return cycles; | |
2636 | #undef FLD | |
2637 | } | |
2638 | ||
2639 | static int | |
2640 | model_crisv32_subcwr (SIM_CPU *current_cpu, void *sem_arg) | |
2641 | { | |
2642 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
2643 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2644 | const IDESC * UNUSED idesc = abuf->idesc; | |
2645 | int cycles = 0; | |
2646 | { | |
2647 | int referenced = 0; | |
2648 | int UNUSED insn_referenced = abuf->written; | |
2649 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2650 | } | |
2651 | { | |
2652 | int referenced = 0; | |
2653 | int UNUSED insn_referenced = abuf->written; | |
2654 | INT in_Rd = -1; | |
2655 | INT in_Rs = -1; | |
2656 | INT out_Rd = -1; | |
2657 | in_Rd = FLD (in_Rd); | |
2658 | referenced |= 1 << 0; | |
2659 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2660 | } | |
2661 | return cycles; | |
2662 | #undef FLD | |
2663 | } | |
2664 | ||
2665 | static int | |
2666 | model_crisv32_subcdr (SIM_CPU *current_cpu, void *sem_arg) | |
2667 | { | |
2668 | #define FLD(f) abuf->fields.sfmt_addcdr.f | |
2669 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2670 | const IDESC * UNUSED idesc = abuf->idesc; | |
2671 | int cycles = 0; | |
2672 | { | |
2673 | int referenced = 0; | |
2674 | int UNUSED insn_referenced = abuf->written; | |
2675 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
2676 | } | |
2677 | { | |
2678 | int referenced = 0; | |
2679 | int UNUSED insn_referenced = abuf->written; | |
2680 | INT in_Rd = -1; | |
2681 | INT in_Rs = -1; | |
2682 | INT out_Rd = -1; | |
2683 | in_Rd = FLD (in_Rd); | |
2684 | referenced |= 1 << 0; | |
2685 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2686 | } | |
2687 | return cycles; | |
2688 | #undef FLD | |
2689 | } | |
2690 | ||
2691 | static int | |
2692 | model_crisv32_subs_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
2693 | { | |
2694 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2695 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2696 | const IDESC * UNUSED idesc = abuf->idesc; | |
2697 | int cycles = 0; | |
2698 | { | |
2699 | int referenced = 0; | |
2700 | int UNUSED insn_referenced = abuf->written; | |
2701 | INT in_Rd = -1; | |
2702 | INT in_Rs = -1; | |
2703 | INT out_Rd = -1; | |
2704 | in_Rd = FLD (in_Rd); | |
2705 | in_Rs = FLD (in_Rs); | |
2706 | referenced |= 1 << 0; | |
2707 | referenced |= 1 << 1; | |
2708 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2709 | } | |
2710 | return cycles; | |
2711 | #undef FLD | |
2712 | } | |
2713 | ||
2714 | static int | |
2715 | model_crisv32_subs_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
2716 | { | |
2717 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2718 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2719 | const IDESC * UNUSED idesc = abuf->idesc; | |
2720 | int cycles = 0; | |
2721 | { | |
2722 | int referenced = 0; | |
2723 | int UNUSED insn_referenced = abuf->written; | |
2724 | INT in_Rd = -1; | |
2725 | INT in_Rs = -1; | |
2726 | INT out_Rd = -1; | |
2727 | in_Rd = FLD (in_Rd); | |
2728 | in_Rs = FLD (in_Rs); | |
2729 | referenced |= 1 << 0; | |
2730 | referenced |= 1 << 1; | |
2731 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2732 | } | |
2733 | return cycles; | |
2734 | #undef FLD | |
2735 | } | |
2736 | ||
2737 | static int | |
2738 | model_crisv32_subs_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
2739 | { | |
2740 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2741 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2742 | const IDESC * UNUSED idesc = abuf->idesc; | |
2743 | int cycles = 0; | |
2744 | { | |
2745 | int referenced = 0; | |
2746 | int UNUSED insn_referenced = abuf->written; | |
2747 | INT in_Rs = -1; | |
2748 | in_Rs = FLD (in_Rs); | |
2749 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2750 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2751 | } | |
2752 | { | |
2753 | int referenced = 0; | |
2754 | int UNUSED insn_referenced = abuf->written; | |
2755 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2756 | } | |
2757 | { | |
2758 | int referenced = 0; | |
2759 | int UNUSED insn_referenced = abuf->written; | |
2760 | INT in_Rd = -1; | |
2761 | INT in_Rs = -1; | |
2762 | INT out_Rd = -1; | |
2763 | in_Rd = FLD (in_Rd); | |
2764 | in_Rs = FLD (in_Rs); | |
2765 | referenced |= 1 << 0; | |
2766 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2767 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2768 | } | |
2769 | return cycles; | |
2770 | #undef FLD | |
2771 | } | |
2772 | ||
2773 | static int | |
2774 | model_crisv32_subs_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
2775 | { | |
2776 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2777 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2778 | const IDESC * UNUSED idesc = abuf->idesc; | |
2779 | int cycles = 0; | |
2780 | { | |
2781 | int referenced = 0; | |
2782 | int UNUSED insn_referenced = abuf->written; | |
2783 | INT in_Rs = -1; | |
2784 | in_Rs = FLD (in_Rs); | |
2785 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2786 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2787 | } | |
2788 | { | |
2789 | int referenced = 0; | |
2790 | int UNUSED insn_referenced = abuf->written; | |
2791 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2792 | } | |
2793 | { | |
2794 | int referenced = 0; | |
2795 | int UNUSED insn_referenced = abuf->written; | |
2796 | INT in_Rd = -1; | |
2797 | INT in_Rs = -1; | |
2798 | INT out_Rd = -1; | |
2799 | in_Rd = FLD (in_Rd); | |
2800 | in_Rs = FLD (in_Rs); | |
2801 | referenced |= 1 << 0; | |
2802 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2803 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2804 | } | |
2805 | return cycles; | |
2806 | #undef FLD | |
2807 | } | |
2808 | ||
2809 | static int | |
2810 | model_crisv32_subscbr (SIM_CPU *current_cpu, void *sem_arg) | |
2811 | { | |
2812 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
2813 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2814 | const IDESC * UNUSED idesc = abuf->idesc; | |
2815 | int cycles = 0; | |
2816 | { | |
2817 | int referenced = 0; | |
2818 | int UNUSED insn_referenced = abuf->written; | |
2819 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2820 | } | |
2821 | { | |
2822 | int referenced = 0; | |
2823 | int UNUSED insn_referenced = abuf->written; | |
2824 | INT in_Rd = -1; | |
2825 | INT in_Rs = -1; | |
2826 | INT out_Rd = -1; | |
2827 | in_Rd = FLD (in_Rd); | |
2828 | referenced |= 1 << 0; | |
2829 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2830 | } | |
2831 | return cycles; | |
2832 | #undef FLD | |
2833 | } | |
2834 | ||
2835 | static int | |
2836 | model_crisv32_subscwr (SIM_CPU *current_cpu, void *sem_arg) | |
2837 | { | |
2838 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
2839 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2840 | const IDESC * UNUSED idesc = abuf->idesc; | |
2841 | int cycles = 0; | |
2842 | { | |
2843 | int referenced = 0; | |
2844 | int UNUSED insn_referenced = abuf->written; | |
2845 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2846 | } | |
2847 | { | |
2848 | int referenced = 0; | |
2849 | int UNUSED insn_referenced = abuf->written; | |
2850 | INT in_Rd = -1; | |
2851 | INT in_Rs = -1; | |
2852 | INT out_Rd = -1; | |
2853 | in_Rd = FLD (in_Rd); | |
2854 | referenced |= 1 << 0; | |
2855 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
2856 | } | |
2857 | return cycles; | |
2858 | #undef FLD | |
2859 | } | |
2860 | ||
2861 | static int | |
2862 | model_crisv32_subu_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
2863 | { | |
2864 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2865 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2866 | const IDESC * UNUSED idesc = abuf->idesc; | |
2867 | int cycles = 0; | |
2868 | { | |
2869 | int referenced = 0; | |
2870 | int UNUSED insn_referenced = abuf->written; | |
2871 | INT in_Rd = -1; | |
2872 | INT in_Rs = -1; | |
2873 | INT out_Rd = -1; | |
2874 | in_Rd = FLD (in_Rd); | |
2875 | in_Rs = FLD (in_Rs); | |
2876 | referenced |= 1 << 0; | |
2877 | referenced |= 1 << 1; | |
2878 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2879 | } | |
2880 | return cycles; | |
2881 | #undef FLD | |
2882 | } | |
2883 | ||
2884 | static int | |
2885 | model_crisv32_subu_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
2886 | { | |
2887 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
2888 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2889 | const IDESC * UNUSED idesc = abuf->idesc; | |
2890 | int cycles = 0; | |
2891 | { | |
2892 | int referenced = 0; | |
2893 | int UNUSED insn_referenced = abuf->written; | |
2894 | INT in_Rd = -1; | |
2895 | INT in_Rs = -1; | |
2896 | INT out_Rd = -1; | |
2897 | in_Rd = FLD (in_Rd); | |
2898 | in_Rs = FLD (in_Rs); | |
2899 | referenced |= 1 << 0; | |
2900 | referenced |= 1 << 1; | |
2901 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
2902 | } | |
2903 | return cycles; | |
2904 | #undef FLD | |
2905 | } | |
2906 | ||
2907 | static int | |
2908 | model_crisv32_subu_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
2909 | { | |
2910 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2911 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2912 | const IDESC * UNUSED idesc = abuf->idesc; | |
2913 | int cycles = 0; | |
2914 | { | |
2915 | int referenced = 0; | |
2916 | int UNUSED insn_referenced = abuf->written; | |
2917 | INT in_Rs = -1; | |
2918 | in_Rs = FLD (in_Rs); | |
2919 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2920 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2921 | } | |
2922 | { | |
2923 | int referenced = 0; | |
2924 | int UNUSED insn_referenced = abuf->written; | |
2925 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2926 | } | |
2927 | { | |
2928 | int referenced = 0; | |
2929 | int UNUSED insn_referenced = abuf->written; | |
2930 | INT in_Rd = -1; | |
2931 | INT in_Rs = -1; | |
2932 | INT out_Rd = -1; | |
2933 | in_Rd = FLD (in_Rd); | |
2934 | in_Rs = FLD (in_Rs); | |
2935 | referenced |= 1 << 0; | |
2936 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2937 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2938 | } | |
2939 | return cycles; | |
2940 | #undef FLD | |
2941 | } | |
2942 | ||
2943 | static int | |
2944 | model_crisv32_subu_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
2945 | { | |
2946 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
2947 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2948 | const IDESC * UNUSED idesc = abuf->idesc; | |
2949 | int cycles = 0; | |
2950 | { | |
2951 | int referenced = 0; | |
2952 | int UNUSED insn_referenced = abuf->written; | |
2953 | INT in_Rs = -1; | |
2954 | in_Rs = FLD (in_Rs); | |
2955 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
2956 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
2957 | } | |
2958 | { | |
2959 | int referenced = 0; | |
2960 | int UNUSED insn_referenced = abuf->written; | |
2961 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
2962 | } | |
2963 | { | |
2964 | int referenced = 0; | |
2965 | int UNUSED insn_referenced = abuf->written; | |
2966 | INT in_Rd = -1; | |
2967 | INT in_Rs = -1; | |
2968 | INT out_Rd = -1; | |
2969 | in_Rd = FLD (in_Rd); | |
2970 | in_Rs = FLD (in_Rs); | |
2971 | referenced |= 1 << 0; | |
2972 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
2973 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
2974 | } | |
2975 | return cycles; | |
2976 | #undef FLD | |
2977 | } | |
2978 | ||
2979 | static int | |
2980 | model_crisv32_subucbr (SIM_CPU *current_cpu, void *sem_arg) | |
2981 | { | |
2982 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
2983 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
2984 | const IDESC * UNUSED idesc = abuf->idesc; | |
2985 | int cycles = 0; | |
2986 | { | |
2987 | int referenced = 0; | |
2988 | int UNUSED insn_referenced = abuf->written; | |
2989 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
2990 | } | |
2991 | { | |
2992 | int referenced = 0; | |
2993 | int UNUSED insn_referenced = abuf->written; | |
2994 | INT in_Rd = -1; | |
2995 | INT in_Rs = -1; | |
2996 | INT out_Rd = -1; | |
2997 | in_Rd = FLD (in_Rd); | |
2998 | referenced |= 1 << 0; | |
2999 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3000 | } | |
3001 | return cycles; | |
3002 | #undef FLD | |
3003 | } | |
3004 | ||
3005 | static int | |
3006 | model_crisv32_subucwr (SIM_CPU *current_cpu, void *sem_arg) | |
3007 | { | |
3008 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
3009 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3010 | const IDESC * UNUSED idesc = abuf->idesc; | |
3011 | int cycles = 0; | |
3012 | { | |
3013 | int referenced = 0; | |
3014 | int UNUSED insn_referenced = abuf->written; | |
3015 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
3016 | } | |
3017 | { | |
3018 | int referenced = 0; | |
3019 | int UNUSED insn_referenced = abuf->written; | |
3020 | INT in_Rd = -1; | |
3021 | INT in_Rs = -1; | |
3022 | INT out_Rd = -1; | |
3023 | in_Rd = FLD (in_Rd); | |
3024 | referenced |= 1 << 0; | |
3025 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3026 | } | |
3027 | return cycles; | |
3028 | #undef FLD | |
3029 | } | |
3030 | ||
3031 | static int | |
3032 | model_crisv32_addc_r (SIM_CPU *current_cpu, void *sem_arg) | |
3033 | { | |
3034 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3035 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3036 | const IDESC * UNUSED idesc = abuf->idesc; | |
3037 | int cycles = 0; | |
3038 | { | |
3039 | int referenced = 0; | |
3040 | int UNUSED insn_referenced = abuf->written; | |
3041 | INT in_Rd = -1; | |
3042 | INT in_Rs = -1; | |
3043 | INT out_Rd = -1; | |
3044 | in_Rd = FLD (in_Rd); | |
3045 | in_Rs = FLD (in_Rs); | |
3046 | referenced |= 1 << 0; | |
3047 | referenced |= 1 << 1; | |
3048 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3049 | } | |
3050 | return cycles; | |
3051 | #undef FLD | |
3052 | } | |
3053 | ||
3054 | static int | |
3055 | model_crisv32_addc_m (SIM_CPU *current_cpu, void *sem_arg) | |
3056 | { | |
3057 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3058 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3059 | const IDESC * UNUSED idesc = abuf->idesc; | |
3060 | int cycles = 0; | |
3061 | { | |
3062 | int referenced = 0; | |
3063 | int UNUSED insn_referenced = abuf->written; | |
3064 | INT in_Rs = -1; | |
3065 | in_Rs = FLD (in_Rs); | |
3066 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
3067 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3068 | } | |
3069 | { | |
3070 | int referenced = 0; | |
3071 | int UNUSED insn_referenced = abuf->written; | |
3072 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
3073 | } | |
3074 | { | |
3075 | int referenced = 0; | |
3076 | int UNUSED insn_referenced = abuf->written; | |
3077 | INT in_Rd = -1; | |
3078 | INT in_Rs = -1; | |
3079 | INT out_Rd = -1; | |
3080 | in_Rd = FLD (in_Rd); | |
3081 | in_Rs = FLD (in_Rs); | |
3082 | referenced |= 1 << 0; | |
3083 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
3084 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
3085 | } | |
3086 | return cycles; | |
3087 | #undef FLD | |
3088 | } | |
3089 | ||
3090 | static int | |
3091 | model_crisv32_addc_c (SIM_CPU *current_cpu, void *sem_arg) | |
3092 | { | |
3093 | #define FLD(f) abuf->fields.sfmt_addcdr.f | |
3094 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3095 | const IDESC * UNUSED idesc = abuf->idesc; | |
3096 | int cycles = 0; | |
3097 | { | |
3098 | int referenced = 0; | |
3099 | int UNUSED insn_referenced = abuf->written; | |
3100 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
3101 | } | |
3102 | { | |
3103 | int referenced = 0; | |
3104 | int UNUSED insn_referenced = abuf->written; | |
3105 | INT in_Rd = -1; | |
3106 | INT in_Rs = -1; | |
3107 | INT out_Rd = -1; | |
3108 | in_Rd = FLD (in_Rd); | |
3109 | referenced |= 1 << 0; | |
3110 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3111 | } | |
3112 | return cycles; | |
3113 | #undef FLD | |
3114 | } | |
3115 | ||
3116 | static int | |
3117 | model_crisv32_lapc_d (SIM_CPU *current_cpu, void *sem_arg) | |
3118 | { | |
3119 | #define FLD(f) abuf->fields.sfmt_lapc_d.f | |
3120 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3121 | const IDESC * UNUSED idesc = abuf->idesc; | |
3122 | int cycles = 0; | |
3123 | { | |
3124 | int referenced = 0; | |
3125 | int UNUSED insn_referenced = abuf->written; | |
3126 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
3127 | } | |
3128 | { | |
3129 | int referenced = 0; | |
3130 | int UNUSED insn_referenced = abuf->written; | |
3131 | INT in_Rd = -1; | |
3132 | INT in_Rs = -1; | |
3133 | INT out_Rd = -1; | |
3134 | out_Rd = FLD (out_Rd); | |
3135 | referenced |= 1 << 2; | |
3136 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3137 | } | |
3138 | return cycles; | |
3139 | #undef FLD | |
3140 | } | |
3141 | ||
3142 | static int | |
3143 | model_crisv32_lapcq (SIM_CPU *current_cpu, void *sem_arg) | |
3144 | { | |
3145 | #define FLD(f) abuf->fields.sfmt_lapcq.f | |
3146 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3147 | const IDESC * UNUSED idesc = abuf->idesc; | |
3148 | int cycles = 0; | |
3149 | { | |
3150 | int referenced = 0; | |
3151 | int UNUSED insn_referenced = abuf->written; | |
3152 | INT in_Rd = -1; | |
3153 | INT in_Rs = -1; | |
3154 | INT out_Rd = -1; | |
3155 | out_Rd = FLD (out_Rd); | |
3156 | referenced |= 1 << 2; | |
3157 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3158 | } | |
3159 | return cycles; | |
3160 | #undef FLD | |
3161 | } | |
3162 | ||
3163 | static int | |
3164 | model_crisv32_addi_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
3165 | { | |
3166 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3167 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3168 | const IDESC * UNUSED idesc = abuf->idesc; | |
3169 | int cycles = 0; | |
3170 | { | |
3171 | int referenced = 0; | |
3172 | int UNUSED insn_referenced = abuf->written; | |
3173 | INT in_Rd = -1; | |
3174 | INT in_Rs = -1; | |
3175 | INT out_Rd = -1; | |
3176 | in_Rd = FLD (in_Rd); | |
3177 | in_Rs = FLD (in_Rs); | |
3178 | referenced |= 1 << 0; | |
3179 | referenced |= 1 << 1; | |
3180 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3181 | } | |
3182 | return cycles; | |
3183 | #undef FLD | |
3184 | } | |
3185 | ||
3186 | static int | |
3187 | model_crisv32_addi_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
3188 | { | |
3189 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3190 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3191 | const IDESC * UNUSED idesc = abuf->idesc; | |
3192 | int cycles = 0; | |
3193 | { | |
3194 | int referenced = 0; | |
3195 | int UNUSED insn_referenced = abuf->written; | |
3196 | INT in_Rd = -1; | |
3197 | INT in_Rs = -1; | |
3198 | INT out_Rd = -1; | |
3199 | in_Rd = FLD (in_Rd); | |
3200 | in_Rs = FLD (in_Rs); | |
3201 | referenced |= 1 << 0; | |
3202 | referenced |= 1 << 1; | |
3203 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3204 | } | |
3205 | return cycles; | |
3206 | #undef FLD | |
3207 | } | |
3208 | ||
3209 | static int | |
3210 | model_crisv32_addi_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
3211 | { | |
3212 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3213 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3214 | const IDESC * UNUSED idesc = abuf->idesc; | |
3215 | int cycles = 0; | |
3216 | { | |
3217 | int referenced = 0; | |
3218 | int UNUSED insn_referenced = abuf->written; | |
3219 | INT in_Rd = -1; | |
3220 | INT in_Rs = -1; | |
3221 | INT out_Rd = -1; | |
3222 | in_Rd = FLD (in_Rd); | |
3223 | in_Rs = FLD (in_Rs); | |
3224 | referenced |= 1 << 0; | |
3225 | referenced |= 1 << 1; | |
3226 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3227 | } | |
3228 | return cycles; | |
3229 | #undef FLD | |
3230 | } | |
3231 | ||
3232 | static int | |
3233 | model_crisv32_neg_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
3234 | { | |
3235 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3236 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3237 | const IDESC * UNUSED idesc = abuf->idesc; | |
3238 | int cycles = 0; | |
3239 | { | |
3240 | int referenced = 0; | |
3241 | int UNUSED insn_referenced = abuf->written; | |
3242 | INT in_Rd = -1; | |
3243 | INT in_Rs = -1; | |
3244 | INT out_Rd = -1; | |
3245 | in_Rs = FLD (in_Rs); | |
3246 | referenced |= 1 << 1; | |
3247 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3248 | } | |
3249 | return cycles; | |
3250 | #undef FLD | |
3251 | } | |
3252 | ||
3253 | static int | |
3254 | model_crisv32_neg_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
3255 | { | |
3256 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3257 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3258 | const IDESC * UNUSED idesc = abuf->idesc; | |
3259 | int cycles = 0; | |
3260 | { | |
3261 | int referenced = 0; | |
3262 | int UNUSED insn_referenced = abuf->written; | |
3263 | INT in_Rd = -1; | |
3264 | INT in_Rs = -1; | |
3265 | INT out_Rd = -1; | |
3266 | in_Rs = FLD (in_Rs); | |
3267 | referenced |= 1 << 1; | |
3268 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3269 | } | |
3270 | return cycles; | |
3271 | #undef FLD | |
3272 | } | |
3273 | ||
3274 | static int | |
3275 | model_crisv32_neg_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
3276 | { | |
3277 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3278 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3279 | const IDESC * UNUSED idesc = abuf->idesc; | |
3280 | int cycles = 0; | |
3281 | { | |
3282 | int referenced = 0; | |
3283 | int UNUSED insn_referenced = abuf->written; | |
3284 | INT in_Rd = -1; | |
3285 | INT in_Rs = -1; | |
3286 | INT out_Rd = -1; | |
3287 | in_Rs = FLD (in_Rs); | |
3288 | referenced |= 1 << 1; | |
3289 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3290 | } | |
3291 | return cycles; | |
3292 | #undef FLD | |
3293 | } | |
3294 | ||
3295 | static int | |
3296 | model_crisv32_test_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
3297 | { | |
3298 | #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f | |
3299 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3300 | const IDESC * UNUSED idesc = abuf->idesc; | |
3301 | int cycles = 0; | |
3302 | { | |
3303 | int referenced = 0; | |
3304 | int UNUSED insn_referenced = abuf->written; | |
3305 | INT in_Rs = -1; | |
3306 | in_Rs = FLD (in_Rs); | |
3307 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
3308 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3309 | } | |
3310 | { | |
3311 | int referenced = 0; | |
3312 | int UNUSED insn_referenced = abuf->written; | |
3313 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
3314 | } | |
3315 | { | |
3316 | int referenced = 0; | |
3317 | int UNUSED insn_referenced = abuf->written; | |
3318 | INT in_Rd = -1; | |
3319 | INT in_Rs = -1; | |
3320 | INT out_Rd = -1; | |
3321 | in_Rs = FLD (in_Rs); | |
3322 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
3323 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
3324 | } | |
3325 | return cycles; | |
3326 | #undef FLD | |
3327 | } | |
3328 | ||
3329 | static int | |
3330 | model_crisv32_test_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
3331 | { | |
3332 | #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f | |
3333 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3334 | const IDESC * UNUSED idesc = abuf->idesc; | |
3335 | int cycles = 0; | |
3336 | { | |
3337 | int referenced = 0; | |
3338 | int UNUSED insn_referenced = abuf->written; | |
3339 | INT in_Rs = -1; | |
3340 | in_Rs = FLD (in_Rs); | |
3341 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
3342 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3343 | } | |
3344 | { | |
3345 | int referenced = 0; | |
3346 | int UNUSED insn_referenced = abuf->written; | |
3347 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
3348 | } | |
3349 | { | |
3350 | int referenced = 0; | |
3351 | int UNUSED insn_referenced = abuf->written; | |
3352 | INT in_Rd = -1; | |
3353 | INT in_Rs = -1; | |
3354 | INT out_Rd = -1; | |
3355 | in_Rs = FLD (in_Rs); | |
3356 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
3357 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
3358 | } | |
3359 | return cycles; | |
3360 | #undef FLD | |
3361 | } | |
3362 | ||
3363 | static int | |
3364 | model_crisv32_test_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
3365 | { | |
3366 | #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f | |
3367 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3368 | const IDESC * UNUSED idesc = abuf->idesc; | |
3369 | int cycles = 0; | |
3370 | { | |
3371 | int referenced = 0; | |
3372 | int UNUSED insn_referenced = abuf->written; | |
3373 | INT in_Rs = -1; | |
3374 | in_Rs = FLD (in_Rs); | |
3375 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
3376 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3377 | } | |
3378 | { | |
3379 | int referenced = 0; | |
3380 | int UNUSED insn_referenced = abuf->written; | |
3381 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
3382 | } | |
3383 | { | |
3384 | int referenced = 0; | |
3385 | int UNUSED insn_referenced = abuf->written; | |
3386 | INT in_Rd = -1; | |
3387 | INT in_Rs = -1; | |
3388 | INT out_Rd = -1; | |
3389 | in_Rs = FLD (in_Rs); | |
3390 | if (insn_referenced & (1 << 0)) referenced |= 1 << 1; | |
3391 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
3392 | } | |
3393 | return cycles; | |
3394 | #undef FLD | |
3395 | } | |
3396 | ||
3397 | static int | |
3398 | model_crisv32_move_r_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
3399 | { | |
3400 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3401 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3402 | const IDESC * UNUSED idesc = abuf->idesc; | |
3403 | int cycles = 0; | |
3404 | { | |
3405 | int referenced = 0; | |
3406 | int UNUSED insn_referenced = abuf->written; | |
3407 | INT in_Rs = -1; | |
3408 | in_Rs = FLD (in_Rs); | |
3409 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
3410 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3411 | } | |
3412 | { | |
3413 | int referenced = 0; | |
3414 | int UNUSED insn_referenced = abuf->written; | |
3415 | INT in_Rd = -1; | |
3416 | INT in_Rs = -1; | |
3417 | INT out_Rd = -1; | |
3418 | in_Rd = FLD (in_Rd); | |
3419 | in_Rs = FLD (in_Rs); | |
3420 | referenced |= 1 << 0; | |
3421 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
3422 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3423 | } | |
3424 | { | |
3425 | int referenced = 0; | |
3426 | int UNUSED insn_referenced = abuf->written; | |
3427 | cycles += crisv32f_model_crisv32_u_mem_w (current_cpu, idesc, 2, referenced); | |
3428 | } | |
3429 | return cycles; | |
3430 | #undef FLD | |
3431 | } | |
3432 | ||
3433 | static int | |
3434 | model_crisv32_move_r_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
3435 | { | |
3436 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3437 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3438 | const IDESC * UNUSED idesc = abuf->idesc; | |
3439 | int cycles = 0; | |
3440 | { | |
3441 | int referenced = 0; | |
3442 | int UNUSED insn_referenced = abuf->written; | |
3443 | INT in_Rs = -1; | |
3444 | in_Rs = FLD (in_Rs); | |
3445 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
3446 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3447 | } | |
3448 | { | |
3449 | int referenced = 0; | |
3450 | int UNUSED insn_referenced = abuf->written; | |
3451 | INT in_Rd = -1; | |
3452 | INT in_Rs = -1; | |
3453 | INT out_Rd = -1; | |
3454 | in_Rd = FLD (in_Rd); | |
3455 | in_Rs = FLD (in_Rs); | |
3456 | referenced |= 1 << 0; | |
3457 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
3458 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3459 | } | |
3460 | { | |
3461 | int referenced = 0; | |
3462 | int UNUSED insn_referenced = abuf->written; | |
3463 | cycles += crisv32f_model_crisv32_u_mem_w (current_cpu, idesc, 2, referenced); | |
3464 | } | |
3465 | return cycles; | |
3466 | #undef FLD | |
3467 | } | |
3468 | ||
3469 | static int | |
3470 | model_crisv32_move_r_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
3471 | { | |
3472 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3473 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3474 | const IDESC * UNUSED idesc = abuf->idesc; | |
3475 | int cycles = 0; | |
3476 | { | |
3477 | int referenced = 0; | |
3478 | int UNUSED insn_referenced = abuf->written; | |
3479 | INT in_Rs = -1; | |
3480 | in_Rs = FLD (in_Rs); | |
3481 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
3482 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3483 | } | |
3484 | { | |
3485 | int referenced = 0; | |
3486 | int UNUSED insn_referenced = abuf->written; | |
3487 | INT in_Rd = -1; | |
3488 | INT in_Rs = -1; | |
3489 | INT out_Rd = -1; | |
3490 | in_Rd = FLD (in_Rd); | |
3491 | in_Rs = FLD (in_Rs); | |
3492 | referenced |= 1 << 0; | |
3493 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
3494 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3495 | } | |
3496 | { | |
3497 | int referenced = 0; | |
3498 | int UNUSED insn_referenced = abuf->written; | |
3499 | cycles += crisv32f_model_crisv32_u_mem_w (current_cpu, idesc, 2, referenced); | |
3500 | } | |
3501 | return cycles; | |
3502 | #undef FLD | |
3503 | } | |
3504 | ||
3505 | static int | |
3506 | model_crisv32_muls_b (SIM_CPU *current_cpu, void *sem_arg) | |
3507 | { | |
3508 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
3509 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3510 | const IDESC * UNUSED idesc = abuf->idesc; | |
3511 | int cycles = 0; | |
3512 | { | |
3513 | int referenced = 0; | |
3514 | int UNUSED insn_referenced = abuf->written; | |
3515 | INT in_Rs = -1; | |
3516 | INT in_Rd = -1; | |
3517 | in_Rs = FLD (in_Rs); | |
3518 | in_Rd = FLD (in_Rd); | |
3519 | referenced |= 1 << 0; | |
3520 | referenced |= 1 << 1; | |
3521 | cycles += crisv32f_model_crisv32_u_multiply (current_cpu, idesc, 0, referenced, in_Rs, in_Rd); | |
3522 | } | |
3523 | { | |
3524 | int referenced = 0; | |
3525 | int UNUSED insn_referenced = abuf->written; | |
3526 | INT in_Rd = -1; | |
3527 | INT in_Rs = -1; | |
3528 | INT out_Rd = -1; | |
3529 | in_Rd = FLD (in_Rd); | |
3530 | in_Rs = FLD (in_Rs); | |
3531 | out_Rd = FLD (out_Rd); | |
3532 | referenced |= 1 << 0; | |
3533 | referenced |= 1 << 1; | |
3534 | referenced |= 1 << 2; | |
3535 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3536 | } | |
3537 | return cycles; | |
3538 | #undef FLD | |
3539 | } | |
3540 | ||
3541 | static int | |
3542 | model_crisv32_muls_w (SIM_CPU *current_cpu, void *sem_arg) | |
3543 | { | |
3544 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
3545 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3546 | const IDESC * UNUSED idesc = abuf->idesc; | |
3547 | int cycles = 0; | |
3548 | { | |
3549 | int referenced = 0; | |
3550 | int UNUSED insn_referenced = abuf->written; | |
3551 | INT in_Rs = -1; | |
3552 | INT in_Rd = -1; | |
3553 | in_Rs = FLD (in_Rs); | |
3554 | in_Rd = FLD (in_Rd); | |
3555 | referenced |= 1 << 0; | |
3556 | referenced |= 1 << 1; | |
3557 | cycles += crisv32f_model_crisv32_u_multiply (current_cpu, idesc, 0, referenced, in_Rs, in_Rd); | |
3558 | } | |
3559 | { | |
3560 | int referenced = 0; | |
3561 | int UNUSED insn_referenced = abuf->written; | |
3562 | INT in_Rd = -1; | |
3563 | INT in_Rs = -1; | |
3564 | INT out_Rd = -1; | |
3565 | in_Rd = FLD (in_Rd); | |
3566 | in_Rs = FLD (in_Rs); | |
3567 | out_Rd = FLD (out_Rd); | |
3568 | referenced |= 1 << 0; | |
3569 | referenced |= 1 << 1; | |
3570 | referenced |= 1 << 2; | |
3571 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3572 | } | |
3573 | return cycles; | |
3574 | #undef FLD | |
3575 | } | |
3576 | ||
3577 | static int | |
3578 | model_crisv32_muls_d (SIM_CPU *current_cpu, void *sem_arg) | |
3579 | { | |
3580 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
3581 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3582 | const IDESC * UNUSED idesc = abuf->idesc; | |
3583 | int cycles = 0; | |
3584 | { | |
3585 | int referenced = 0; | |
3586 | int UNUSED insn_referenced = abuf->written; | |
3587 | INT in_Rs = -1; | |
3588 | INT in_Rd = -1; | |
3589 | in_Rs = FLD (in_Rs); | |
3590 | in_Rd = FLD (in_Rd); | |
3591 | referenced |= 1 << 0; | |
3592 | referenced |= 1 << 1; | |
3593 | cycles += crisv32f_model_crisv32_u_multiply (current_cpu, idesc, 0, referenced, in_Rs, in_Rd); | |
3594 | } | |
3595 | { | |
3596 | int referenced = 0; | |
3597 | int UNUSED insn_referenced = abuf->written; | |
3598 | INT in_Rd = -1; | |
3599 | INT in_Rs = -1; | |
3600 | INT out_Rd = -1; | |
3601 | in_Rd = FLD (in_Rd); | |
3602 | in_Rs = FLD (in_Rs); | |
3603 | out_Rd = FLD (out_Rd); | |
3604 | referenced |= 1 << 0; | |
3605 | referenced |= 1 << 1; | |
3606 | referenced |= 1 << 2; | |
3607 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3608 | } | |
3609 | return cycles; | |
3610 | #undef FLD | |
3611 | } | |
3612 | ||
3613 | static int | |
3614 | model_crisv32_mulu_b (SIM_CPU *current_cpu, void *sem_arg) | |
3615 | { | |
3616 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
3617 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3618 | const IDESC * UNUSED idesc = abuf->idesc; | |
3619 | int cycles = 0; | |
3620 | { | |
3621 | int referenced = 0; | |
3622 | int UNUSED insn_referenced = abuf->written; | |
3623 | INT in_Rs = -1; | |
3624 | INT in_Rd = -1; | |
3625 | in_Rs = FLD (in_Rs); | |
3626 | in_Rd = FLD (in_Rd); | |
3627 | referenced |= 1 << 0; | |
3628 | referenced |= 1 << 1; | |
3629 | cycles += crisv32f_model_crisv32_u_multiply (current_cpu, idesc, 0, referenced, in_Rs, in_Rd); | |
3630 | } | |
3631 | { | |
3632 | int referenced = 0; | |
3633 | int UNUSED insn_referenced = abuf->written; | |
3634 | INT in_Rd = -1; | |
3635 | INT in_Rs = -1; | |
3636 | INT out_Rd = -1; | |
3637 | in_Rd = FLD (in_Rd); | |
3638 | in_Rs = FLD (in_Rs); | |
3639 | out_Rd = FLD (out_Rd); | |
3640 | referenced |= 1 << 0; | |
3641 | referenced |= 1 << 1; | |
3642 | referenced |= 1 << 2; | |
3643 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3644 | } | |
3645 | return cycles; | |
3646 | #undef FLD | |
3647 | } | |
3648 | ||
3649 | static int | |
3650 | model_crisv32_mulu_w (SIM_CPU *current_cpu, void *sem_arg) | |
3651 | { | |
3652 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
3653 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3654 | const IDESC * UNUSED idesc = abuf->idesc; | |
3655 | int cycles = 0; | |
3656 | { | |
3657 | int referenced = 0; | |
3658 | int UNUSED insn_referenced = abuf->written; | |
3659 | INT in_Rs = -1; | |
3660 | INT in_Rd = -1; | |
3661 | in_Rs = FLD (in_Rs); | |
3662 | in_Rd = FLD (in_Rd); | |
3663 | referenced |= 1 << 0; | |
3664 | referenced |= 1 << 1; | |
3665 | cycles += crisv32f_model_crisv32_u_multiply (current_cpu, idesc, 0, referenced, in_Rs, in_Rd); | |
3666 | } | |
3667 | { | |
3668 | int referenced = 0; | |
3669 | int UNUSED insn_referenced = abuf->written; | |
3670 | INT in_Rd = -1; | |
3671 | INT in_Rs = -1; | |
3672 | INT out_Rd = -1; | |
3673 | in_Rd = FLD (in_Rd); | |
3674 | in_Rs = FLD (in_Rs); | |
3675 | out_Rd = FLD (out_Rd); | |
3676 | referenced |= 1 << 0; | |
3677 | referenced |= 1 << 1; | |
3678 | referenced |= 1 << 2; | |
3679 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3680 | } | |
3681 | return cycles; | |
3682 | #undef FLD | |
3683 | } | |
3684 | ||
3685 | static int | |
3686 | model_crisv32_mulu_d (SIM_CPU *current_cpu, void *sem_arg) | |
3687 | { | |
3688 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
3689 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3690 | const IDESC * UNUSED idesc = abuf->idesc; | |
3691 | int cycles = 0; | |
3692 | { | |
3693 | int referenced = 0; | |
3694 | int UNUSED insn_referenced = abuf->written; | |
3695 | INT in_Rs = -1; | |
3696 | INT in_Rd = -1; | |
3697 | in_Rs = FLD (in_Rs); | |
3698 | in_Rd = FLD (in_Rd); | |
3699 | referenced |= 1 << 0; | |
3700 | referenced |= 1 << 1; | |
3701 | cycles += crisv32f_model_crisv32_u_multiply (current_cpu, idesc, 0, referenced, in_Rs, in_Rd); | |
3702 | } | |
3703 | { | |
3704 | int referenced = 0; | |
3705 | int UNUSED insn_referenced = abuf->written; | |
3706 | INT in_Rd = -1; | |
3707 | INT in_Rs = -1; | |
3708 | INT out_Rd = -1; | |
3709 | in_Rd = FLD (in_Rd); | |
3710 | in_Rs = FLD (in_Rs); | |
3711 | out_Rd = FLD (out_Rd); | |
3712 | referenced |= 1 << 0; | |
3713 | referenced |= 1 << 1; | |
3714 | referenced |= 1 << 2; | |
3715 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3716 | } | |
3717 | return cycles; | |
3718 | #undef FLD | |
3719 | } | |
3720 | ||
3721 | static int | |
3722 | model_crisv32_mcp (SIM_CPU *current_cpu, void *sem_arg) | |
3723 | { | |
3724 | #define FLD(f) abuf->fields.sfmt_mcp.f | |
3725 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3726 | const IDESC * UNUSED idesc = abuf->idesc; | |
3727 | int cycles = 0; | |
3728 | { | |
3729 | int referenced = 0; | |
3730 | int UNUSED insn_referenced = abuf->written; | |
3731 | INT in_Rd = -1; | |
3732 | INT in_Rs = -1; | |
3733 | INT out_Rd = -1; | |
3734 | in_Rs = FLD (in_Rs); | |
3735 | referenced |= 1 << 1; | |
3736 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3737 | } | |
3738 | return cycles; | |
3739 | #undef FLD | |
3740 | } | |
3741 | ||
3742 | static int | |
3743 | model_crisv32_dstep (SIM_CPU *current_cpu, void *sem_arg) | |
3744 | { | |
3745 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
3746 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3747 | const IDESC * UNUSED idesc = abuf->idesc; | |
3748 | int cycles = 0; | |
3749 | { | |
3750 | int referenced = 0; | |
3751 | int UNUSED insn_referenced = abuf->written; | |
3752 | INT in_Rd = -1; | |
3753 | INT in_Rs = -1; | |
3754 | INT out_Rd = -1; | |
3755 | in_Rd = FLD (in_Rd); | |
3756 | in_Rs = FLD (in_Rs); | |
3757 | out_Rd = FLD (out_Rd); | |
3758 | referenced |= 1 << 0; | |
3759 | referenced |= 1 << 1; | |
3760 | referenced |= 1 << 2; | |
3761 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3762 | } | |
3763 | return cycles; | |
3764 | #undef FLD | |
3765 | } | |
3766 | ||
3767 | static int | |
3768 | model_crisv32_abs (SIM_CPU *current_cpu, void *sem_arg) | |
3769 | { | |
3770 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
3771 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3772 | const IDESC * UNUSED idesc = abuf->idesc; | |
3773 | int cycles = 0; | |
3774 | { | |
3775 | int referenced = 0; | |
3776 | int UNUSED insn_referenced = abuf->written; | |
3777 | INT in_Rd = -1; | |
3778 | INT in_Rs = -1; | |
3779 | INT out_Rd = -1; | |
3780 | in_Rs = FLD (in_Rs); | |
3781 | out_Rd = FLD (out_Rd); | |
3782 | referenced |= 1 << 1; | |
3783 | referenced |= 1 << 2; | |
3784 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3785 | } | |
3786 | return cycles; | |
3787 | #undef FLD | |
3788 | } | |
3789 | ||
3790 | static int | |
3791 | model_crisv32_and_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
3792 | { | |
3793 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3794 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3795 | const IDESC * UNUSED idesc = abuf->idesc; | |
3796 | int cycles = 0; | |
3797 | { | |
3798 | int referenced = 0; | |
3799 | int UNUSED insn_referenced = abuf->written; | |
3800 | INT in_Rd = -1; | |
3801 | INT in_Rs = -1; | |
3802 | INT out_Rd = -1; | |
3803 | in_Rd = FLD (in_Rd); | |
3804 | in_Rs = FLD (in_Rs); | |
3805 | referenced |= 1 << 0; | |
3806 | referenced |= 1 << 1; | |
3807 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3808 | } | |
3809 | return cycles; | |
3810 | #undef FLD | |
3811 | } | |
3812 | ||
3813 | static int | |
3814 | model_crisv32_and_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
3815 | { | |
3816 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3817 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3818 | const IDESC * UNUSED idesc = abuf->idesc; | |
3819 | int cycles = 0; | |
3820 | { | |
3821 | int referenced = 0; | |
3822 | int UNUSED insn_referenced = abuf->written; | |
3823 | INT in_Rd = -1; | |
3824 | INT in_Rs = -1; | |
3825 | INT out_Rd = -1; | |
3826 | in_Rd = FLD (in_Rd); | |
3827 | in_Rs = FLD (in_Rs); | |
3828 | referenced |= 1 << 0; | |
3829 | referenced |= 1 << 1; | |
3830 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3831 | } | |
3832 | return cycles; | |
3833 | #undef FLD | |
3834 | } | |
3835 | ||
3836 | static int | |
3837 | model_crisv32_and_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
3838 | { | |
3839 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
3840 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3841 | const IDESC * UNUSED idesc = abuf->idesc; | |
3842 | int cycles = 0; | |
3843 | { | |
3844 | int referenced = 0; | |
3845 | int UNUSED insn_referenced = abuf->written; | |
3846 | INT in_Rd = -1; | |
3847 | INT in_Rs = -1; | |
3848 | INT out_Rd = -1; | |
3849 | in_Rd = FLD (in_Rd); | |
3850 | in_Rs = FLD (in_Rs); | |
3851 | referenced |= 1 << 0; | |
3852 | referenced |= 1 << 1; | |
3853 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
3854 | } | |
3855 | return cycles; | |
3856 | #undef FLD | |
3857 | } | |
3858 | ||
3859 | static int | |
3860 | model_crisv32_and_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
3861 | { | |
3862 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
3863 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3864 | const IDESC * UNUSED idesc = abuf->idesc; | |
3865 | int cycles = 0; | |
3866 | { | |
3867 | int referenced = 0; | |
3868 | int UNUSED insn_referenced = abuf->written; | |
3869 | INT in_Rs = -1; | |
3870 | in_Rs = FLD (in_Rs); | |
3871 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
3872 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3873 | } | |
3874 | { | |
3875 | int referenced = 0; | |
3876 | int UNUSED insn_referenced = abuf->written; | |
3877 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
3878 | } | |
3879 | { | |
3880 | int referenced = 0; | |
3881 | int UNUSED insn_referenced = abuf->written; | |
3882 | INT in_Rd = -1; | |
3883 | INT in_Rs = -1; | |
3884 | INT out_Rd = -1; | |
3885 | in_Rd = FLD (in_Rd); | |
3886 | in_Rs = FLD (in_Rs); | |
3887 | referenced |= 1 << 0; | |
3888 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
3889 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
3890 | } | |
3891 | return cycles; | |
3892 | #undef FLD | |
3893 | } | |
3894 | ||
3895 | static int | |
3896 | model_crisv32_and_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
3897 | { | |
3898 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
3899 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3900 | const IDESC * UNUSED idesc = abuf->idesc; | |
3901 | int cycles = 0; | |
3902 | { | |
3903 | int referenced = 0; | |
3904 | int UNUSED insn_referenced = abuf->written; | |
3905 | INT in_Rs = -1; | |
3906 | in_Rs = FLD (in_Rs); | |
3907 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
3908 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3909 | } | |
3910 | { | |
3911 | int referenced = 0; | |
3912 | int UNUSED insn_referenced = abuf->written; | |
3913 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
3914 | } | |
3915 | { | |
3916 | int referenced = 0; | |
3917 | int UNUSED insn_referenced = abuf->written; | |
3918 | INT in_Rd = -1; | |
3919 | INT in_Rs = -1; | |
3920 | INT out_Rd = -1; | |
3921 | in_Rd = FLD (in_Rd); | |
3922 | in_Rs = FLD (in_Rs); | |
3923 | referenced |= 1 << 0; | |
3924 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
3925 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
3926 | } | |
3927 | return cycles; | |
3928 | #undef FLD | |
3929 | } | |
3930 | ||
3931 | static int | |
3932 | model_crisv32_and_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
3933 | { | |
3934 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
3935 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3936 | const IDESC * UNUSED idesc = abuf->idesc; | |
3937 | int cycles = 0; | |
3938 | { | |
3939 | int referenced = 0; | |
3940 | int UNUSED insn_referenced = abuf->written; | |
3941 | INT in_Rs = -1; | |
3942 | in_Rs = FLD (in_Rs); | |
3943 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
3944 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
3945 | } | |
3946 | { | |
3947 | int referenced = 0; | |
3948 | int UNUSED insn_referenced = abuf->written; | |
3949 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
3950 | } | |
3951 | { | |
3952 | int referenced = 0; | |
3953 | int UNUSED insn_referenced = abuf->written; | |
3954 | INT in_Rd = -1; | |
3955 | INT in_Rs = -1; | |
3956 | INT out_Rd = -1; | |
3957 | in_Rd = FLD (in_Rd); | |
3958 | in_Rs = FLD (in_Rs); | |
3959 | referenced |= 1 << 0; | |
3960 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
3961 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
3962 | } | |
3963 | return cycles; | |
3964 | #undef FLD | |
3965 | } | |
3966 | ||
3967 | static int | |
3968 | model_crisv32_andcbr (SIM_CPU *current_cpu, void *sem_arg) | |
3969 | { | |
3970 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
3971 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3972 | const IDESC * UNUSED idesc = abuf->idesc; | |
3973 | int cycles = 0; | |
3974 | { | |
3975 | int referenced = 0; | |
3976 | int UNUSED insn_referenced = abuf->written; | |
3977 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
3978 | } | |
3979 | { | |
3980 | int referenced = 0; | |
3981 | int UNUSED insn_referenced = abuf->written; | |
3982 | INT in_Rd = -1; | |
3983 | INT in_Rs = -1; | |
3984 | INT out_Rd = -1; | |
3985 | in_Rd = FLD (in_Rd); | |
3986 | referenced |= 1 << 0; | |
3987 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
3988 | } | |
3989 | return cycles; | |
3990 | #undef FLD | |
3991 | } | |
3992 | ||
3993 | static int | |
3994 | model_crisv32_andcwr (SIM_CPU *current_cpu, void *sem_arg) | |
3995 | { | |
3996 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
3997 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
3998 | const IDESC * UNUSED idesc = abuf->idesc; | |
3999 | int cycles = 0; | |
4000 | { | |
4001 | int referenced = 0; | |
4002 | int UNUSED insn_referenced = abuf->written; | |
4003 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
4004 | } | |
4005 | { | |
4006 | int referenced = 0; | |
4007 | int UNUSED insn_referenced = abuf->written; | |
4008 | INT in_Rd = -1; | |
4009 | INT in_Rs = -1; | |
4010 | INT out_Rd = -1; | |
4011 | in_Rd = FLD (in_Rd); | |
4012 | referenced |= 1 << 0; | |
4013 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
4014 | } | |
4015 | return cycles; | |
4016 | #undef FLD | |
4017 | } | |
4018 | ||
4019 | static int | |
4020 | model_crisv32_andcdr (SIM_CPU *current_cpu, void *sem_arg) | |
4021 | { | |
4022 | #define FLD(f) abuf->fields.sfmt_addcdr.f | |
4023 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4024 | const IDESC * UNUSED idesc = abuf->idesc; | |
4025 | int cycles = 0; | |
4026 | { | |
4027 | int referenced = 0; | |
4028 | int UNUSED insn_referenced = abuf->written; | |
4029 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
4030 | } | |
4031 | { | |
4032 | int referenced = 0; | |
4033 | int UNUSED insn_referenced = abuf->written; | |
4034 | INT in_Rd = -1; | |
4035 | INT in_Rs = -1; | |
4036 | INT out_Rd = -1; | |
4037 | in_Rd = FLD (in_Rd); | |
4038 | referenced |= 1 << 0; | |
4039 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
4040 | } | |
4041 | return cycles; | |
4042 | #undef FLD | |
4043 | } | |
4044 | ||
4045 | static int | |
4046 | model_crisv32_andq (SIM_CPU *current_cpu, void *sem_arg) | |
4047 | { | |
4048 | #define FLD(f) abuf->fields.sfmt_andq.f | |
4049 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4050 | const IDESC * UNUSED idesc = abuf->idesc; | |
4051 | int cycles = 0; | |
4052 | { | |
4053 | int referenced = 0; | |
4054 | int UNUSED insn_referenced = abuf->written; | |
4055 | INT in_Rd = -1; | |
4056 | INT in_Rs = -1; | |
4057 | INT out_Rd = -1; | |
4058 | in_Rd = FLD (in_Rd); | |
4059 | referenced |= 1 << 0; | |
4060 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4061 | } | |
4062 | return cycles; | |
4063 | #undef FLD | |
4064 | } | |
4065 | ||
4066 | static int | |
4067 | model_crisv32_orr_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
4068 | { | |
4069 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4070 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4071 | const IDESC * UNUSED idesc = abuf->idesc; | |
4072 | int cycles = 0; | |
4073 | { | |
4074 | int referenced = 0; | |
4075 | int UNUSED insn_referenced = abuf->written; | |
4076 | INT in_Rd = -1; | |
4077 | INT in_Rs = -1; | |
4078 | INT out_Rd = -1; | |
4079 | in_Rd = FLD (in_Rd); | |
4080 | in_Rs = FLD (in_Rs); | |
4081 | referenced |= 1 << 0; | |
4082 | referenced |= 1 << 1; | |
4083 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4084 | } | |
4085 | return cycles; | |
4086 | #undef FLD | |
4087 | } | |
4088 | ||
4089 | static int | |
4090 | model_crisv32_orr_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
4091 | { | |
4092 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4093 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4094 | const IDESC * UNUSED idesc = abuf->idesc; | |
4095 | int cycles = 0; | |
4096 | { | |
4097 | int referenced = 0; | |
4098 | int UNUSED insn_referenced = abuf->written; | |
4099 | INT in_Rd = -1; | |
4100 | INT in_Rs = -1; | |
4101 | INT out_Rd = -1; | |
4102 | in_Rd = FLD (in_Rd); | |
4103 | in_Rs = FLD (in_Rs); | |
4104 | referenced |= 1 << 0; | |
4105 | referenced |= 1 << 1; | |
4106 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4107 | } | |
4108 | return cycles; | |
4109 | #undef FLD | |
4110 | } | |
4111 | ||
4112 | static int | |
4113 | model_crisv32_orr_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
4114 | { | |
4115 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4116 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4117 | const IDESC * UNUSED idesc = abuf->idesc; | |
4118 | int cycles = 0; | |
4119 | { | |
4120 | int referenced = 0; | |
4121 | int UNUSED insn_referenced = abuf->written; | |
4122 | INT in_Rd = -1; | |
4123 | INT in_Rs = -1; | |
4124 | INT out_Rd = -1; | |
4125 | in_Rd = FLD (in_Rd); | |
4126 | in_Rs = FLD (in_Rs); | |
4127 | referenced |= 1 << 0; | |
4128 | referenced |= 1 << 1; | |
4129 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4130 | } | |
4131 | return cycles; | |
4132 | #undef FLD | |
4133 | } | |
4134 | ||
4135 | static int | |
4136 | model_crisv32_or_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
4137 | { | |
4138 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
4139 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4140 | const IDESC * UNUSED idesc = abuf->idesc; | |
4141 | int cycles = 0; | |
4142 | { | |
4143 | int referenced = 0; | |
4144 | int UNUSED insn_referenced = abuf->written; | |
4145 | INT in_Rs = -1; | |
4146 | in_Rs = FLD (in_Rs); | |
4147 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
4148 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
4149 | } | |
4150 | { | |
4151 | int referenced = 0; | |
4152 | int UNUSED insn_referenced = abuf->written; | |
4153 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
4154 | } | |
4155 | { | |
4156 | int referenced = 0; | |
4157 | int UNUSED insn_referenced = abuf->written; | |
4158 | INT in_Rd = -1; | |
4159 | INT in_Rs = -1; | |
4160 | INT out_Rd = -1; | |
4161 | in_Rd = FLD (in_Rd); | |
4162 | in_Rs = FLD (in_Rs); | |
4163 | referenced |= 1 << 0; | |
4164 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
4165 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
4166 | } | |
4167 | return cycles; | |
4168 | #undef FLD | |
4169 | } | |
4170 | ||
4171 | static int | |
4172 | model_crisv32_or_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
4173 | { | |
4174 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
4175 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4176 | const IDESC * UNUSED idesc = abuf->idesc; | |
4177 | int cycles = 0; | |
4178 | { | |
4179 | int referenced = 0; | |
4180 | int UNUSED insn_referenced = abuf->written; | |
4181 | INT in_Rs = -1; | |
4182 | in_Rs = FLD (in_Rs); | |
4183 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
4184 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
4185 | } | |
4186 | { | |
4187 | int referenced = 0; | |
4188 | int UNUSED insn_referenced = abuf->written; | |
4189 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
4190 | } | |
4191 | { | |
4192 | int referenced = 0; | |
4193 | int UNUSED insn_referenced = abuf->written; | |
4194 | INT in_Rd = -1; | |
4195 | INT in_Rs = -1; | |
4196 | INT out_Rd = -1; | |
4197 | in_Rd = FLD (in_Rd); | |
4198 | in_Rs = FLD (in_Rs); | |
4199 | referenced |= 1 << 0; | |
4200 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
4201 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
4202 | } | |
4203 | return cycles; | |
4204 | #undef FLD | |
4205 | } | |
4206 | ||
4207 | static int | |
4208 | model_crisv32_or_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
4209 | { | |
4210 | #define FLD(f) abuf->fields.sfmt_add_m_b_m.f | |
4211 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4212 | const IDESC * UNUSED idesc = abuf->idesc; | |
4213 | int cycles = 0; | |
4214 | { | |
4215 | int referenced = 0; | |
4216 | int UNUSED insn_referenced = abuf->written; | |
4217 | INT in_Rs = -1; | |
4218 | in_Rs = FLD (in_Rs); | |
4219 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
4220 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
4221 | } | |
4222 | { | |
4223 | int referenced = 0; | |
4224 | int UNUSED insn_referenced = abuf->written; | |
4225 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
4226 | } | |
4227 | { | |
4228 | int referenced = 0; | |
4229 | int UNUSED insn_referenced = abuf->written; | |
4230 | INT in_Rd = -1; | |
4231 | INT in_Rs = -1; | |
4232 | INT out_Rd = -1; | |
4233 | in_Rd = FLD (in_Rd); | |
4234 | in_Rs = FLD (in_Rs); | |
4235 | referenced |= 1 << 0; | |
4236 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
4237 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
4238 | } | |
4239 | return cycles; | |
4240 | #undef FLD | |
4241 | } | |
4242 | ||
4243 | static int | |
4244 | model_crisv32_orcbr (SIM_CPU *current_cpu, void *sem_arg) | |
4245 | { | |
4246 | #define FLD(f) abuf->fields.sfmt_addcbr.f | |
4247 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4248 | const IDESC * UNUSED idesc = abuf->idesc; | |
4249 | int cycles = 0; | |
4250 | { | |
4251 | int referenced = 0; | |
4252 | int UNUSED insn_referenced = abuf->written; | |
4253 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
4254 | } | |
4255 | { | |
4256 | int referenced = 0; | |
4257 | int UNUSED insn_referenced = abuf->written; | |
4258 | INT in_Rd = -1; | |
4259 | INT in_Rs = -1; | |
4260 | INT out_Rd = -1; | |
4261 | in_Rd = FLD (in_Rd); | |
4262 | referenced |= 1 << 0; | |
4263 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
4264 | } | |
4265 | return cycles; | |
4266 | #undef FLD | |
4267 | } | |
4268 | ||
4269 | static int | |
4270 | model_crisv32_orcwr (SIM_CPU *current_cpu, void *sem_arg) | |
4271 | { | |
4272 | #define FLD(f) abuf->fields.sfmt_addcwr.f | |
4273 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4274 | const IDESC * UNUSED idesc = abuf->idesc; | |
4275 | int cycles = 0; | |
4276 | { | |
4277 | int referenced = 0; | |
4278 | int UNUSED insn_referenced = abuf->written; | |
4279 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
4280 | } | |
4281 | { | |
4282 | int referenced = 0; | |
4283 | int UNUSED insn_referenced = abuf->written; | |
4284 | INT in_Rd = -1; | |
4285 | INT in_Rs = -1; | |
4286 | INT out_Rd = -1; | |
4287 | in_Rd = FLD (in_Rd); | |
4288 | referenced |= 1 << 0; | |
4289 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
4290 | } | |
4291 | return cycles; | |
4292 | #undef FLD | |
4293 | } | |
4294 | ||
4295 | static int | |
4296 | model_crisv32_orcdr (SIM_CPU *current_cpu, void *sem_arg) | |
4297 | { | |
4298 | #define FLD(f) abuf->fields.sfmt_addcdr.f | |
4299 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4300 | const IDESC * UNUSED idesc = abuf->idesc; | |
4301 | int cycles = 0; | |
4302 | { | |
4303 | int referenced = 0; | |
4304 | int UNUSED insn_referenced = abuf->written; | |
4305 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
4306 | } | |
4307 | { | |
4308 | int referenced = 0; | |
4309 | int UNUSED insn_referenced = abuf->written; | |
4310 | INT in_Rd = -1; | |
4311 | INT in_Rs = -1; | |
4312 | INT out_Rd = -1; | |
4313 | in_Rd = FLD (in_Rd); | |
4314 | referenced |= 1 << 0; | |
4315 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
4316 | } | |
4317 | return cycles; | |
4318 | #undef FLD | |
4319 | } | |
4320 | ||
4321 | static int | |
4322 | model_crisv32_orq (SIM_CPU *current_cpu, void *sem_arg) | |
4323 | { | |
4324 | #define FLD(f) abuf->fields.sfmt_andq.f | |
4325 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4326 | const IDESC * UNUSED idesc = abuf->idesc; | |
4327 | int cycles = 0; | |
4328 | { | |
4329 | int referenced = 0; | |
4330 | int UNUSED insn_referenced = abuf->written; | |
4331 | INT in_Rd = -1; | |
4332 | INT in_Rs = -1; | |
4333 | INT out_Rd = -1; | |
4334 | in_Rd = FLD (in_Rd); | |
4335 | referenced |= 1 << 0; | |
4336 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4337 | } | |
4338 | return cycles; | |
4339 | #undef FLD | |
4340 | } | |
4341 | ||
4342 | static int | |
4343 | model_crisv32_xor (SIM_CPU *current_cpu, void *sem_arg) | |
4344 | { | |
4345 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
4346 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4347 | const IDESC * UNUSED idesc = abuf->idesc; | |
4348 | int cycles = 0; | |
4349 | { | |
4350 | int referenced = 0; | |
4351 | int UNUSED insn_referenced = abuf->written; | |
4352 | INT in_Rd = -1; | |
4353 | INT in_Rs = -1; | |
4354 | INT out_Rd = -1; | |
4355 | in_Rd = FLD (in_Rd); | |
4356 | in_Rs = FLD (in_Rs); | |
4357 | out_Rd = FLD (out_Rd); | |
4358 | referenced |= 1 << 0; | |
4359 | referenced |= 1 << 1; | |
4360 | referenced |= 1 << 2; | |
4361 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4362 | } | |
4363 | return cycles; | |
4364 | #undef FLD | |
4365 | } | |
4366 | ||
4367 | static int | |
4368 | model_crisv32_swap (SIM_CPU *current_cpu, void *sem_arg) | |
4369 | { | |
4370 | #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f | |
4371 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4372 | const IDESC * UNUSED idesc = abuf->idesc; | |
4373 | int cycles = 0; | |
4374 | { | |
4375 | int referenced = 0; | |
4376 | int UNUSED insn_referenced = abuf->written; | |
4377 | INT in_Rd = -1; | |
4378 | INT in_Rs = -1; | |
4379 | INT out_Rd = -1; | |
4380 | in_Rs = FLD (in_Rs); | |
4381 | referenced |= 1 << 1; | |
4382 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4383 | } | |
4384 | return cycles; | |
4385 | #undef FLD | |
4386 | } | |
4387 | ||
4388 | static int | |
4389 | model_crisv32_asrr_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
4390 | { | |
4391 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4392 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4393 | const IDESC * UNUSED idesc = abuf->idesc; | |
4394 | int cycles = 0; | |
4395 | { | |
4396 | int referenced = 0; | |
4397 | int UNUSED insn_referenced = abuf->written; | |
4398 | INT in_Rd = -1; | |
4399 | INT in_Rs = -1; | |
4400 | INT out_Rd = -1; | |
4401 | in_Rd = FLD (in_Rd); | |
4402 | in_Rs = FLD (in_Rs); | |
4403 | referenced |= 1 << 0; | |
4404 | referenced |= 1 << 1; | |
4405 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4406 | } | |
4407 | return cycles; | |
4408 | #undef FLD | |
4409 | } | |
4410 | ||
4411 | static int | |
4412 | model_crisv32_asrr_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
4413 | { | |
4414 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4415 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4416 | const IDESC * UNUSED idesc = abuf->idesc; | |
4417 | int cycles = 0; | |
4418 | { | |
4419 | int referenced = 0; | |
4420 | int UNUSED insn_referenced = abuf->written; | |
4421 | INT in_Rd = -1; | |
4422 | INT in_Rs = -1; | |
4423 | INT out_Rd = -1; | |
4424 | in_Rd = FLD (in_Rd); | |
4425 | in_Rs = FLD (in_Rs); | |
4426 | referenced |= 1 << 0; | |
4427 | referenced |= 1 << 1; | |
4428 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4429 | } | |
4430 | return cycles; | |
4431 | #undef FLD | |
4432 | } | |
4433 | ||
4434 | static int | |
4435 | model_crisv32_asrr_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
4436 | { | |
4437 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4438 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4439 | const IDESC * UNUSED idesc = abuf->idesc; | |
4440 | int cycles = 0; | |
4441 | { | |
4442 | int referenced = 0; | |
4443 | int UNUSED insn_referenced = abuf->written; | |
4444 | INT in_Rd = -1; | |
4445 | INT in_Rs = -1; | |
4446 | INT out_Rd = -1; | |
4447 | in_Rd = FLD (in_Rd); | |
4448 | in_Rs = FLD (in_Rs); | |
4449 | referenced |= 1 << 0; | |
4450 | referenced |= 1 << 1; | |
4451 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4452 | } | |
4453 | return cycles; | |
4454 | #undef FLD | |
4455 | } | |
4456 | ||
4457 | static int | |
4458 | model_crisv32_asrq (SIM_CPU *current_cpu, void *sem_arg) | |
4459 | { | |
4460 | #define FLD(f) abuf->fields.sfmt_asrq.f | |
4461 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4462 | const IDESC * UNUSED idesc = abuf->idesc; | |
4463 | int cycles = 0; | |
4464 | { | |
4465 | int referenced = 0; | |
4466 | int UNUSED insn_referenced = abuf->written; | |
4467 | INT in_Rd = -1; | |
4468 | INT in_Rs = -1; | |
4469 | INT out_Rd = -1; | |
4470 | in_Rd = FLD (in_Rd); | |
4471 | out_Rd = FLD (out_Rd); | |
4472 | referenced |= 1 << 0; | |
4473 | referenced |= 1 << 2; | |
4474 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4475 | } | |
4476 | return cycles; | |
4477 | #undef FLD | |
4478 | } | |
4479 | ||
4480 | static int | |
4481 | model_crisv32_lsrr_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
4482 | { | |
4483 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4484 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4485 | const IDESC * UNUSED idesc = abuf->idesc; | |
4486 | int cycles = 0; | |
4487 | { | |
4488 | int referenced = 0; | |
4489 | int UNUSED insn_referenced = abuf->written; | |
4490 | INT in_Rd = -1; | |
4491 | INT in_Rs = -1; | |
4492 | INT out_Rd = -1; | |
4493 | in_Rd = FLD (in_Rd); | |
4494 | in_Rs = FLD (in_Rs); | |
4495 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
4496 | referenced |= 1 << 1; | |
4497 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4498 | } | |
4499 | return cycles; | |
4500 | #undef FLD | |
4501 | } | |
4502 | ||
4503 | static int | |
4504 | model_crisv32_lsrr_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
4505 | { | |
4506 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4507 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4508 | const IDESC * UNUSED idesc = abuf->idesc; | |
4509 | int cycles = 0; | |
4510 | { | |
4511 | int referenced = 0; | |
4512 | int UNUSED insn_referenced = abuf->written; | |
4513 | INT in_Rd = -1; | |
4514 | INT in_Rs = -1; | |
4515 | INT out_Rd = -1; | |
4516 | in_Rd = FLD (in_Rd); | |
4517 | in_Rs = FLD (in_Rs); | |
4518 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
4519 | referenced |= 1 << 1; | |
4520 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4521 | } | |
4522 | return cycles; | |
4523 | #undef FLD | |
4524 | } | |
4525 | ||
4526 | static int | |
4527 | model_crisv32_lsrr_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
4528 | { | |
4529 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4530 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4531 | const IDESC * UNUSED idesc = abuf->idesc; | |
4532 | int cycles = 0; | |
4533 | { | |
4534 | int referenced = 0; | |
4535 | int UNUSED insn_referenced = abuf->written; | |
4536 | INT in_Rd = -1; | |
4537 | INT in_Rs = -1; | |
4538 | INT out_Rd = -1; | |
4539 | in_Rd = FLD (in_Rd); | |
4540 | in_Rs = FLD (in_Rs); | |
4541 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
4542 | referenced |= 1 << 1; | |
4543 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4544 | } | |
4545 | return cycles; | |
4546 | #undef FLD | |
4547 | } | |
4548 | ||
4549 | static int | |
4550 | model_crisv32_lsrq (SIM_CPU *current_cpu, void *sem_arg) | |
4551 | { | |
4552 | #define FLD(f) abuf->fields.sfmt_asrq.f | |
4553 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4554 | const IDESC * UNUSED idesc = abuf->idesc; | |
4555 | int cycles = 0; | |
4556 | { | |
4557 | int referenced = 0; | |
4558 | int UNUSED insn_referenced = abuf->written; | |
4559 | INT in_Rd = -1; | |
4560 | INT in_Rs = -1; | |
4561 | INT out_Rd = -1; | |
4562 | in_Rd = FLD (in_Rd); | |
4563 | out_Rd = FLD (out_Rd); | |
4564 | referenced |= 1 << 0; | |
4565 | referenced |= 1 << 2; | |
4566 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4567 | } | |
4568 | return cycles; | |
4569 | #undef FLD | |
4570 | } | |
4571 | ||
4572 | static int | |
4573 | model_crisv32_lslr_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
4574 | { | |
4575 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4576 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4577 | const IDESC * UNUSED idesc = abuf->idesc; | |
4578 | int cycles = 0; | |
4579 | { | |
4580 | int referenced = 0; | |
4581 | int UNUSED insn_referenced = abuf->written; | |
4582 | INT in_Rd = -1; | |
4583 | INT in_Rs = -1; | |
4584 | INT out_Rd = -1; | |
4585 | in_Rd = FLD (in_Rd); | |
4586 | in_Rs = FLD (in_Rs); | |
4587 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
4588 | referenced |= 1 << 1; | |
4589 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4590 | } | |
4591 | return cycles; | |
4592 | #undef FLD | |
4593 | } | |
4594 | ||
4595 | static int | |
4596 | model_crisv32_lslr_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
4597 | { | |
4598 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4599 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4600 | const IDESC * UNUSED idesc = abuf->idesc; | |
4601 | int cycles = 0; | |
4602 | { | |
4603 | int referenced = 0; | |
4604 | int UNUSED insn_referenced = abuf->written; | |
4605 | INT in_Rd = -1; | |
4606 | INT in_Rs = -1; | |
4607 | INT out_Rd = -1; | |
4608 | in_Rd = FLD (in_Rd); | |
4609 | in_Rs = FLD (in_Rs); | |
4610 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
4611 | referenced |= 1 << 1; | |
4612 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4613 | } | |
4614 | return cycles; | |
4615 | #undef FLD | |
4616 | } | |
4617 | ||
4618 | static int | |
4619 | model_crisv32_lslr_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
4620 | { | |
4621 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
4622 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4623 | const IDESC * UNUSED idesc = abuf->idesc; | |
4624 | int cycles = 0; | |
4625 | { | |
4626 | int referenced = 0; | |
4627 | int UNUSED insn_referenced = abuf->written; | |
4628 | INT in_Rd = -1; | |
4629 | INT in_Rs = -1; | |
4630 | INT out_Rd = -1; | |
4631 | in_Rd = FLD (in_Rd); | |
4632 | in_Rs = FLD (in_Rs); | |
4633 | if (insn_referenced & (1 << 0)) referenced |= 1 << 0; | |
4634 | referenced |= 1 << 1; | |
4635 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4636 | } | |
4637 | return cycles; | |
4638 | #undef FLD | |
4639 | } | |
4640 | ||
4641 | static int | |
4642 | model_crisv32_lslq (SIM_CPU *current_cpu, void *sem_arg) | |
4643 | { | |
4644 | #define FLD(f) abuf->fields.sfmt_asrq.f | |
4645 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4646 | const IDESC * UNUSED idesc = abuf->idesc; | |
4647 | int cycles = 0; | |
4648 | { | |
4649 | int referenced = 0; | |
4650 | int UNUSED insn_referenced = abuf->written; | |
4651 | INT in_Rd = -1; | |
4652 | INT in_Rs = -1; | |
4653 | INT out_Rd = -1; | |
4654 | in_Rd = FLD (in_Rd); | |
4655 | out_Rd = FLD (out_Rd); | |
4656 | referenced |= 1 << 0; | |
4657 | referenced |= 1 << 2; | |
4658 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4659 | } | |
4660 | return cycles; | |
4661 | #undef FLD | |
4662 | } | |
4663 | ||
4664 | static int | |
4665 | model_crisv32_btst (SIM_CPU *current_cpu, void *sem_arg) | |
4666 | { | |
4667 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
4668 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4669 | const IDESC * UNUSED idesc = abuf->idesc; | |
4670 | int cycles = 0; | |
4671 | { | |
4672 | int referenced = 0; | |
4673 | int UNUSED insn_referenced = abuf->written; | |
4674 | INT in_Rd = -1; | |
4675 | INT in_Rs = -1; | |
4676 | INT out_Rd = -1; | |
4677 | in_Rd = FLD (in_Rd); | |
4678 | in_Rs = FLD (in_Rs); | |
4679 | referenced |= 1 << 0; | |
4680 | referenced |= 1 << 1; | |
4681 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4682 | } | |
4683 | return cycles; | |
4684 | #undef FLD | |
4685 | } | |
4686 | ||
4687 | static int | |
4688 | model_crisv32_btstq (SIM_CPU *current_cpu, void *sem_arg) | |
4689 | { | |
4690 | #define FLD(f) abuf->fields.sfmt_asrq.f | |
4691 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4692 | const IDESC * UNUSED idesc = abuf->idesc; | |
4693 | int cycles = 0; | |
4694 | { | |
4695 | int referenced = 0; | |
4696 | int UNUSED insn_referenced = abuf->written; | |
4697 | INT in_Rd = -1; | |
4698 | INT in_Rs = -1; | |
4699 | INT out_Rd = -1; | |
4700 | in_Rd = FLD (in_Rd); | |
4701 | referenced |= 1 << 0; | |
4702 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4703 | } | |
4704 | return cycles; | |
4705 | #undef FLD | |
4706 | } | |
4707 | ||
4708 | static int | |
4709 | model_crisv32_setf (SIM_CPU *current_cpu, void *sem_arg) | |
4710 | { | |
4711 | #define FLD(f) abuf->fields.sfmt_setf.f | |
4712 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4713 | const IDESC * UNUSED idesc = abuf->idesc; | |
4714 | int cycles = 0; | |
4715 | { | |
4716 | int referenced = 0; | |
4717 | int UNUSED insn_referenced = abuf->written; | |
4718 | INT in_Rd = -1; | |
4719 | INT in_Rs = -1; | |
4720 | INT out_Rd = -1; | |
4721 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4722 | } | |
4723 | return cycles; | |
4724 | #undef FLD | |
4725 | } | |
4726 | ||
4727 | static int | |
4728 | model_crisv32_clearf (SIM_CPU *current_cpu, void *sem_arg) | |
4729 | { | |
4730 | #define FLD(f) abuf->fields.sfmt_setf.f | |
4731 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4732 | const IDESC * UNUSED idesc = abuf->idesc; | |
4733 | int cycles = 0; | |
4734 | { | |
4735 | int referenced = 0; | |
4736 | int UNUSED insn_referenced = abuf->written; | |
4737 | INT in_Rd = -1; | |
4738 | INT in_Rs = -1; | |
4739 | INT out_Rd = -1; | |
4740 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4741 | } | |
4742 | return cycles; | |
4743 | #undef FLD | |
4744 | } | |
4745 | ||
4746 | static int | |
4747 | model_crisv32_rfe (SIM_CPU *current_cpu, void *sem_arg) | |
4748 | { | |
4749 | #define FLD(f) abuf->fields.sfmt_rfe.f | |
4750 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4751 | const IDESC * UNUSED idesc = abuf->idesc; | |
4752 | int cycles = 0; | |
4753 | { | |
4754 | int referenced = 0; | |
4755 | int UNUSED insn_referenced = abuf->written; | |
4756 | INT in_Rd = -1; | |
4757 | INT in_Rs = -1; | |
4758 | INT out_Rd = -1; | |
4759 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4760 | } | |
4761 | return cycles; | |
4762 | #undef FLD | |
4763 | } | |
4764 | ||
4765 | static int | |
4766 | model_crisv32_sfe (SIM_CPU *current_cpu, void *sem_arg) | |
4767 | { | |
4768 | #define FLD(f) abuf->fields.sfmt_rfe.f | |
4769 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4770 | const IDESC * UNUSED idesc = abuf->idesc; | |
4771 | int cycles = 0; | |
4772 | { | |
4773 | int referenced = 0; | |
4774 | int UNUSED insn_referenced = abuf->written; | |
4775 | INT in_Rd = -1; | |
4776 | INT in_Rs = -1; | |
4777 | INT out_Rd = -1; | |
4778 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4779 | } | |
4780 | return cycles; | |
4781 | #undef FLD | |
4782 | } | |
4783 | ||
4784 | static int | |
4785 | model_crisv32_rfg (SIM_CPU *current_cpu, void *sem_arg) | |
4786 | { | |
4787 | #define FLD(f) abuf->fields.fmt_empty.f | |
4788 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4789 | const IDESC * UNUSED idesc = abuf->idesc; | |
4790 | int cycles = 0; | |
4791 | { | |
4792 | int referenced = 0; | |
4793 | int UNUSED insn_referenced = abuf->written; | |
4794 | INT in_Rd = -1; | |
4795 | INT in_Rs = -1; | |
4796 | INT out_Rd = -1; | |
4797 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4798 | } | |
4799 | return cycles; | |
4800 | #undef FLD | |
4801 | } | |
4802 | ||
4803 | static int | |
4804 | model_crisv32_rfn (SIM_CPU *current_cpu, void *sem_arg) | |
4805 | { | |
4806 | #define FLD(f) abuf->fields.sfmt_rfe.f | |
4807 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4808 | const IDESC * UNUSED idesc = abuf->idesc; | |
4809 | int cycles = 0; | |
4810 | { | |
4811 | int referenced = 0; | |
4812 | int UNUSED insn_referenced = abuf->written; | |
4813 | INT in_Rd = -1; | |
4814 | INT in_Rs = -1; | |
4815 | INT out_Rd = -1; | |
4816 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4817 | } | |
4818 | return cycles; | |
4819 | #undef FLD | |
4820 | } | |
4821 | ||
4822 | static int | |
4823 | model_crisv32_halt (SIM_CPU *current_cpu, void *sem_arg) | |
4824 | { | |
4825 | #define FLD(f) abuf->fields.fmt_empty.f | |
4826 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4827 | const IDESC * UNUSED idesc = abuf->idesc; | |
4828 | int cycles = 0; | |
4829 | { | |
4830 | int referenced = 0; | |
4831 | int UNUSED insn_referenced = abuf->written; | |
4832 | INT in_Rd = -1; | |
4833 | INT in_Rs = -1; | |
4834 | INT out_Rd = -1; | |
4835 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
4836 | } | |
4837 | return cycles; | |
4838 | #undef FLD | |
4839 | } | |
4840 | ||
4841 | static int | |
4842 | model_crisv32_bcc_b (SIM_CPU *current_cpu, void *sem_arg) | |
4843 | { | |
4844 | #define FLD(f) abuf->fields.sfmt_bcc_b.f | |
4845 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4846 | const IDESC * UNUSED idesc = abuf->idesc; | |
4847 | int cycles = 0; | |
4848 | { | |
4849 | int referenced = 0; | |
4850 | int UNUSED insn_referenced = abuf->written; | |
4851 | cycles += crisv32f_model_crisv32_u_branch (current_cpu, idesc, 0, referenced); | |
4852 | } | |
4853 | { | |
4854 | int referenced = 0; | |
4855 | int UNUSED insn_referenced = abuf->written; | |
4856 | INT in_Rd = -1; | |
4857 | INT in_Rs = -1; | |
4858 | INT out_Rd = -1; | |
4859 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
4860 | } | |
4861 | return cycles; | |
4862 | #undef FLD | |
4863 | } | |
4864 | ||
4865 | static int | |
4866 | model_crisv32_ba_b (SIM_CPU *current_cpu, void *sem_arg) | |
4867 | { | |
4868 | #define FLD(f) abuf->fields.sfmt_bcc_b.f | |
4869 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4870 | const IDESC * UNUSED idesc = abuf->idesc; | |
4871 | int cycles = 0; | |
4872 | { | |
4873 | int referenced = 0; | |
4874 | int UNUSED insn_referenced = abuf->written; | |
4875 | INT out_Pd = -1; | |
4876 | cycles += crisv32f_model_crisv32_u_jump (current_cpu, idesc, 0, referenced, out_Pd); | |
4877 | } | |
4878 | { | |
4879 | int referenced = 0; | |
4880 | int UNUSED insn_referenced = abuf->written; | |
4881 | INT in_Rd = -1; | |
4882 | INT in_Rs = -1; | |
4883 | INT out_Rd = -1; | |
4884 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
4885 | } | |
4886 | return cycles; | |
4887 | #undef FLD | |
4888 | } | |
4889 | ||
4890 | static int | |
4891 | model_crisv32_bcc_w (SIM_CPU *current_cpu, void *sem_arg) | |
4892 | { | |
4893 | #define FLD(f) abuf->fields.sfmt_bcc_w.f | |
4894 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4895 | const IDESC * UNUSED idesc = abuf->idesc; | |
4896 | int cycles = 0; | |
4897 | { | |
4898 | int referenced = 0; | |
4899 | int UNUSED insn_referenced = abuf->written; | |
4900 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
4901 | } | |
4902 | { | |
4903 | int referenced = 0; | |
4904 | int UNUSED insn_referenced = abuf->written; | |
4905 | cycles += crisv32f_model_crisv32_u_branch (current_cpu, idesc, 1, referenced); | |
4906 | } | |
4907 | { | |
4908 | int referenced = 0; | |
4909 | int UNUSED insn_referenced = abuf->written; | |
4910 | INT in_Rd = -1; | |
4911 | INT in_Rs = -1; | |
4912 | INT out_Rd = -1; | |
4913 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
4914 | } | |
4915 | return cycles; | |
4916 | #undef FLD | |
4917 | } | |
4918 | ||
4919 | static int | |
4920 | model_crisv32_ba_w (SIM_CPU *current_cpu, void *sem_arg) | |
4921 | { | |
4922 | #define FLD(f) abuf->fields.sfmt_bcc_w.f | |
4923 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4924 | const IDESC * UNUSED idesc = abuf->idesc; | |
4925 | int cycles = 0; | |
4926 | { | |
4927 | int referenced = 0; | |
4928 | int UNUSED insn_referenced = abuf->written; | |
4929 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
4930 | } | |
4931 | { | |
4932 | int referenced = 0; | |
4933 | int UNUSED insn_referenced = abuf->written; | |
4934 | INT out_Pd = -1; | |
4935 | cycles += crisv32f_model_crisv32_u_jump (current_cpu, idesc, 1, referenced, out_Pd); | |
4936 | } | |
4937 | { | |
4938 | int referenced = 0; | |
4939 | int UNUSED insn_referenced = abuf->written; | |
4940 | INT in_Rd = -1; | |
4941 | INT in_Rs = -1; | |
4942 | INT out_Rd = -1; | |
4943 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
4944 | } | |
4945 | return cycles; | |
4946 | #undef FLD | |
4947 | } | |
4948 | ||
4949 | static int | |
4950 | model_crisv32_jas_r (SIM_CPU *current_cpu, void *sem_arg) | |
4951 | { | |
4952 | #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f | |
4953 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4954 | const IDESC * UNUSED idesc = abuf->idesc; | |
4955 | int cycles = 0; | |
4956 | { | |
4957 | int referenced = 0; | |
4958 | int UNUSED insn_referenced = abuf->written; | |
4959 | INT in_Rs = -1; | |
4960 | in_Rs = FLD (in_Rs); | |
4961 | referenced |= 1 << 0; | |
4962 | cycles += crisv32f_model_crisv32_u_jump_r (current_cpu, idesc, 0, referenced, in_Rs); | |
4963 | } | |
4964 | { | |
4965 | int referenced = 0; | |
4966 | int UNUSED insn_referenced = abuf->written; | |
4967 | INT out_Pd = -1; | |
4968 | out_Pd = FLD (out_Pd); | |
4969 | referenced |= 1 << 0; | |
4970 | cycles += crisv32f_model_crisv32_u_jump (current_cpu, idesc, 1, referenced, out_Pd); | |
4971 | } | |
4972 | { | |
4973 | int referenced = 0; | |
4974 | int UNUSED insn_referenced = abuf->written; | |
4975 | INT in_Rd = -1; | |
4976 | INT in_Rs = -1; | |
4977 | INT out_Rd = -1; | |
4978 | in_Rs = FLD (in_Rs); | |
4979 | referenced |= 1 << 1; | |
4980 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
4981 | } | |
4982 | return cycles; | |
4983 | #undef FLD | |
4984 | } | |
4985 | ||
4986 | static int | |
4987 | model_crisv32_jas_c (SIM_CPU *current_cpu, void *sem_arg) | |
4988 | { | |
4989 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
4990 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
4991 | const IDESC * UNUSED idesc = abuf->idesc; | |
4992 | int cycles = 0; | |
4993 | { | |
4994 | int referenced = 0; | |
4995 | int UNUSED insn_referenced = abuf->written; | |
4996 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
4997 | } | |
4998 | { | |
4999 | int referenced = 0; | |
5000 | int UNUSED insn_referenced = abuf->written; | |
5001 | INT out_Pd = -1; | |
5002 | out_Pd = FLD (out_Pd); | |
5003 | referenced |= 1 << 0; | |
5004 | cycles += crisv32f_model_crisv32_u_jump (current_cpu, idesc, 1, referenced, out_Pd); | |
5005 | } | |
5006 | { | |
5007 | int referenced = 0; | |
5008 | int UNUSED insn_referenced = abuf->written; | |
5009 | INT in_Rd = -1; | |
5010 | INT in_Rs = -1; | |
5011 | INT out_Rd = -1; | |
5012 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
5013 | } | |
5014 | return cycles; | |
5015 | #undef FLD | |
5016 | } | |
5017 | ||
5018 | static int | |
5019 | model_crisv32_jump_p (SIM_CPU *current_cpu, void *sem_arg) | |
5020 | { | |
5021 | #define FLD(f) abuf->fields.sfmt_mcp.f | |
5022 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5023 | const IDESC * UNUSED idesc = abuf->idesc; | |
5024 | int cycles = 0; | |
5025 | { | |
5026 | int referenced = 0; | |
5027 | int UNUSED insn_referenced = abuf->written; | |
5028 | INT in_Ps = -1; | |
5029 | in_Ps = FLD (in_Ps); | |
5030 | referenced |= 1 << 0; | |
5031 | cycles += crisv32f_model_crisv32_u_jump_sr (current_cpu, idesc, 0, referenced, in_Ps); | |
5032 | } | |
5033 | { | |
5034 | int referenced = 0; | |
5035 | int UNUSED insn_referenced = abuf->written; | |
5036 | INT in_Rd = -1; | |
5037 | INT in_Rs = -1; | |
5038 | INT out_Rd = -1; | |
5039 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
5040 | } | |
5041 | return cycles; | |
5042 | #undef FLD | |
5043 | } | |
5044 | ||
5045 | static int | |
5046 | model_crisv32_bas_c (SIM_CPU *current_cpu, void *sem_arg) | |
5047 | { | |
5048 | #define FLD(f) abuf->fields.sfmt_bas_c.f | |
5049 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5050 | const IDESC * UNUSED idesc = abuf->idesc; | |
5051 | int cycles = 0; | |
5052 | { | |
5053 | int referenced = 0; | |
5054 | int UNUSED insn_referenced = abuf->written; | |
5055 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
5056 | } | |
5057 | { | |
5058 | int referenced = 0; | |
5059 | int UNUSED insn_referenced = abuf->written; | |
5060 | INT out_Pd = -1; | |
5061 | out_Pd = FLD (out_Pd); | |
5062 | referenced |= 1 << 0; | |
5063 | cycles += crisv32f_model_crisv32_u_jump (current_cpu, idesc, 1, referenced, out_Pd); | |
5064 | } | |
5065 | { | |
5066 | int referenced = 0; | |
5067 | int UNUSED insn_referenced = abuf->written; | |
5068 | INT in_Rd = -1; | |
5069 | INT in_Rs = -1; | |
5070 | INT out_Rd = -1; | |
5071 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
5072 | } | |
5073 | return cycles; | |
5074 | #undef FLD | |
5075 | } | |
5076 | ||
5077 | static int | |
5078 | model_crisv32_jasc_r (SIM_CPU *current_cpu, void *sem_arg) | |
5079 | { | |
5080 | #define FLD(f) abuf->fields.sfmt_move_m_sprv32.f | |
5081 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5082 | const IDESC * UNUSED idesc = abuf->idesc; | |
5083 | int cycles = 0; | |
5084 | { | |
5085 | int referenced = 0; | |
5086 | int UNUSED insn_referenced = abuf->written; | |
5087 | INT in_Rs = -1; | |
5088 | in_Rs = FLD (in_Rs); | |
5089 | referenced |= 1 << 0; | |
5090 | cycles += crisv32f_model_crisv32_u_jump_r (current_cpu, idesc, 0, referenced, in_Rs); | |
5091 | } | |
5092 | { | |
5093 | int referenced = 0; | |
5094 | int UNUSED insn_referenced = abuf->written; | |
5095 | cycles += crisv32f_model_crisv32_u_skip4 (current_cpu, idesc, 1, referenced); | |
5096 | } | |
5097 | { | |
5098 | int referenced = 0; | |
5099 | int UNUSED insn_referenced = abuf->written; | |
5100 | INT out_Pd = -1; | |
5101 | out_Pd = FLD (out_Pd); | |
5102 | referenced |= 1 << 0; | |
5103 | cycles += crisv32f_model_crisv32_u_jump (current_cpu, idesc, 2, referenced, out_Pd); | |
5104 | } | |
5105 | { | |
5106 | int referenced = 0; | |
5107 | int UNUSED insn_referenced = abuf->written; | |
5108 | INT in_Rd = -1; | |
5109 | INT in_Rs = -1; | |
5110 | INT out_Rd = -1; | |
5111 | in_Rs = FLD (in_Rs); | |
5112 | referenced |= 1 << 1; | |
5113 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 3, referenced, in_Rd, in_Rs, out_Rd); | |
5114 | } | |
5115 | return cycles; | |
5116 | #undef FLD | |
5117 | } | |
5118 | ||
5119 | static int | |
5120 | model_crisv32_jasc_c (SIM_CPU *current_cpu, void *sem_arg) | |
5121 | { | |
5122 | #define FLD(f) abuf->fields.sfmt_move_c_sprv32_p0.f | |
5123 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5124 | const IDESC * UNUSED idesc = abuf->idesc; | |
5125 | int cycles = 0; | |
5126 | { | |
5127 | int referenced = 0; | |
5128 | int UNUSED insn_referenced = abuf->written; | |
5129 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
5130 | } | |
5131 | { | |
5132 | int referenced = 0; | |
5133 | int UNUSED insn_referenced = abuf->written; | |
5134 | cycles += crisv32f_model_crisv32_u_skip4 (current_cpu, idesc, 1, referenced); | |
5135 | } | |
5136 | { | |
5137 | int referenced = 0; | |
5138 | int UNUSED insn_referenced = abuf->written; | |
5139 | INT out_Pd = -1; | |
5140 | out_Pd = FLD (out_Pd); | |
5141 | referenced |= 1 << 0; | |
5142 | cycles += crisv32f_model_crisv32_u_jump (current_cpu, idesc, 2, referenced, out_Pd); | |
5143 | } | |
5144 | { | |
5145 | int referenced = 0; | |
5146 | int UNUSED insn_referenced = abuf->written; | |
5147 | INT in_Rd = -1; | |
5148 | INT in_Rs = -1; | |
5149 | INT out_Rd = -1; | |
5150 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 3, referenced, in_Rd, in_Rs, out_Rd); | |
5151 | } | |
5152 | return cycles; | |
5153 | #undef FLD | |
5154 | } | |
5155 | ||
5156 | static int | |
5157 | model_crisv32_basc_c (SIM_CPU *current_cpu, void *sem_arg) | |
5158 | { | |
5159 | #define FLD(f) abuf->fields.sfmt_bas_c.f | |
5160 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5161 | const IDESC * UNUSED idesc = abuf->idesc; | |
5162 | int cycles = 0; | |
5163 | { | |
5164 | int referenced = 0; | |
5165 | int UNUSED insn_referenced = abuf->written; | |
5166 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
5167 | } | |
5168 | { | |
5169 | int referenced = 0; | |
5170 | int UNUSED insn_referenced = abuf->written; | |
5171 | cycles += crisv32f_model_crisv32_u_skip4 (current_cpu, idesc, 1, referenced); | |
5172 | } | |
5173 | { | |
5174 | int referenced = 0; | |
5175 | int UNUSED insn_referenced = abuf->written; | |
5176 | INT out_Pd = -1; | |
5177 | out_Pd = FLD (out_Pd); | |
5178 | referenced |= 1 << 0; | |
5179 | cycles += crisv32f_model_crisv32_u_jump (current_cpu, idesc, 2, referenced, out_Pd); | |
5180 | } | |
5181 | { | |
5182 | int referenced = 0; | |
5183 | int UNUSED insn_referenced = abuf->written; | |
5184 | INT in_Rd = -1; | |
5185 | INT in_Rs = -1; | |
5186 | INT out_Rd = -1; | |
5187 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 3, referenced, in_Rd, in_Rs, out_Rd); | |
5188 | } | |
5189 | return cycles; | |
5190 | #undef FLD | |
5191 | } | |
5192 | ||
5193 | static int | |
5194 | model_crisv32_break (SIM_CPU *current_cpu, void *sem_arg) | |
5195 | { | |
5196 | #define FLD(f) abuf->fields.sfmt_break.f | |
5197 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5198 | const IDESC * UNUSED idesc = abuf->idesc; | |
5199 | int cycles = 0; | |
5200 | { | |
5201 | int referenced = 0; | |
5202 | int UNUSED insn_referenced = abuf->written; | |
5203 | INT in_Rd = -1; | |
5204 | INT in_Rs = -1; | |
5205 | INT out_Rd = -1; | |
5206 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5207 | } | |
5208 | return cycles; | |
5209 | #undef FLD | |
5210 | } | |
5211 | ||
5212 | static int | |
5213 | model_crisv32_bound_r_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
5214 | { | |
5215 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
5216 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5217 | const IDESC * UNUSED idesc = abuf->idesc; | |
5218 | int cycles = 0; | |
5219 | { | |
5220 | int referenced = 0; | |
5221 | int UNUSED insn_referenced = abuf->written; | |
5222 | INT in_Rd = -1; | |
5223 | INT in_Rs = -1; | |
5224 | INT out_Rd = -1; | |
5225 | in_Rd = FLD (in_Rd); | |
5226 | in_Rs = FLD (in_Rs); | |
5227 | out_Rd = FLD (out_Rd); | |
5228 | referenced |= 1 << 0; | |
5229 | referenced |= 1 << 1; | |
5230 | referenced |= 1 << 2; | |
5231 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5232 | } | |
5233 | return cycles; | |
5234 | #undef FLD | |
5235 | } | |
5236 | ||
5237 | static int | |
5238 | model_crisv32_bound_r_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
5239 | { | |
5240 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
5241 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5242 | const IDESC * UNUSED idesc = abuf->idesc; | |
5243 | int cycles = 0; | |
5244 | { | |
5245 | int referenced = 0; | |
5246 | int UNUSED insn_referenced = abuf->written; | |
5247 | INT in_Rd = -1; | |
5248 | INT in_Rs = -1; | |
5249 | INT out_Rd = -1; | |
5250 | in_Rd = FLD (in_Rd); | |
5251 | in_Rs = FLD (in_Rs); | |
5252 | out_Rd = FLD (out_Rd); | |
5253 | referenced |= 1 << 0; | |
5254 | referenced |= 1 << 1; | |
5255 | referenced |= 1 << 2; | |
5256 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5257 | } | |
5258 | return cycles; | |
5259 | #undef FLD | |
5260 | } | |
5261 | ||
5262 | static int | |
5263 | model_crisv32_bound_r_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
5264 | { | |
5265 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
5266 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5267 | const IDESC * UNUSED idesc = abuf->idesc; | |
5268 | int cycles = 0; | |
5269 | { | |
5270 | int referenced = 0; | |
5271 | int UNUSED insn_referenced = abuf->written; | |
5272 | INT in_Rd = -1; | |
5273 | INT in_Rs = -1; | |
5274 | INT out_Rd = -1; | |
5275 | in_Rd = FLD (in_Rd); | |
5276 | in_Rs = FLD (in_Rs); | |
5277 | out_Rd = FLD (out_Rd); | |
5278 | referenced |= 1 << 0; | |
5279 | referenced |= 1 << 1; | |
5280 | referenced |= 1 << 2; | |
5281 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5282 | } | |
5283 | return cycles; | |
5284 | #undef FLD | |
5285 | } | |
5286 | ||
5287 | static int | |
5288 | model_crisv32_bound_cb (SIM_CPU *current_cpu, void *sem_arg) | |
5289 | { | |
5290 | #define FLD(f) abuf->fields.sfmt_bound_cb.f | |
5291 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5292 | const IDESC * UNUSED idesc = abuf->idesc; | |
5293 | int cycles = 0; | |
5294 | { | |
5295 | int referenced = 0; | |
5296 | int UNUSED insn_referenced = abuf->written; | |
5297 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
5298 | } | |
5299 | { | |
5300 | int referenced = 0; | |
5301 | int UNUSED insn_referenced = abuf->written; | |
5302 | INT in_Rd = -1; | |
5303 | INT in_Rs = -1; | |
5304 | INT out_Rd = -1; | |
5305 | in_Rd = FLD (in_Rd); | |
5306 | out_Rd = FLD (out_Rd); | |
5307 | referenced |= 1 << 0; | |
5308 | referenced |= 1 << 2; | |
5309 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
5310 | } | |
5311 | return cycles; | |
5312 | #undef FLD | |
5313 | } | |
5314 | ||
5315 | static int | |
5316 | model_crisv32_bound_cw (SIM_CPU *current_cpu, void *sem_arg) | |
5317 | { | |
5318 | #define FLD(f) abuf->fields.sfmt_bound_cw.f | |
5319 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5320 | const IDESC * UNUSED idesc = abuf->idesc; | |
5321 | int cycles = 0; | |
5322 | { | |
5323 | int referenced = 0; | |
5324 | int UNUSED insn_referenced = abuf->written; | |
5325 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
5326 | } | |
5327 | { | |
5328 | int referenced = 0; | |
5329 | int UNUSED insn_referenced = abuf->written; | |
5330 | INT in_Rd = -1; | |
5331 | INT in_Rs = -1; | |
5332 | INT out_Rd = -1; | |
5333 | in_Rd = FLD (in_Rd); | |
5334 | out_Rd = FLD (out_Rd); | |
5335 | referenced |= 1 << 0; | |
5336 | referenced |= 1 << 2; | |
5337 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
5338 | } | |
5339 | return cycles; | |
5340 | #undef FLD | |
5341 | } | |
5342 | ||
5343 | static int | |
5344 | model_crisv32_bound_cd (SIM_CPU *current_cpu, void *sem_arg) | |
5345 | { | |
5346 | #define FLD(f) abuf->fields.sfmt_bound_cd.f | |
5347 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5348 | const IDESC * UNUSED idesc = abuf->idesc; | |
5349 | int cycles = 0; | |
5350 | { | |
5351 | int referenced = 0; | |
5352 | int UNUSED insn_referenced = abuf->written; | |
5353 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
5354 | } | |
5355 | { | |
5356 | int referenced = 0; | |
5357 | int UNUSED insn_referenced = abuf->written; | |
5358 | INT in_Rd = -1; | |
5359 | INT in_Rs = -1; | |
5360 | INT out_Rd = -1; | |
5361 | in_Rd = FLD (in_Rd); | |
5362 | out_Rd = FLD (out_Rd); | |
5363 | referenced |= 1 << 0; | |
5364 | referenced |= 1 << 2; | |
5365 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
5366 | } | |
5367 | return cycles; | |
5368 | #undef FLD | |
5369 | } | |
5370 | ||
5371 | static int | |
5372 | model_crisv32_scc (SIM_CPU *current_cpu, void *sem_arg) | |
5373 | { | |
5374 | #define FLD(f) abuf->fields.sfmt_move_spr_mv32.f | |
5375 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5376 | const IDESC * UNUSED idesc = abuf->idesc; | |
5377 | int cycles = 0; | |
5378 | { | |
5379 | int referenced = 0; | |
5380 | int UNUSED insn_referenced = abuf->written; | |
5381 | INT in_Rd = -1; | |
5382 | INT in_Rs = -1; | |
5383 | INT out_Rd = -1; | |
5384 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5385 | } | |
5386 | return cycles; | |
5387 | #undef FLD | |
5388 | } | |
5389 | ||
5390 | static int | |
5391 | model_crisv32_lz (SIM_CPU *current_cpu, void *sem_arg) | |
5392 | { | |
5393 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
5394 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5395 | const IDESC * UNUSED idesc = abuf->idesc; | |
5396 | int cycles = 0; | |
5397 | { | |
5398 | int referenced = 0; | |
5399 | int UNUSED insn_referenced = abuf->written; | |
5400 | INT in_Rd = -1; | |
5401 | INT in_Rs = -1; | |
5402 | INT out_Rd = -1; | |
5403 | in_Rs = FLD (in_Rs); | |
5404 | out_Rd = FLD (out_Rd); | |
5405 | referenced |= 1 << 1; | |
5406 | referenced |= 1 << 2; | |
5407 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5408 | } | |
5409 | return cycles; | |
5410 | #undef FLD | |
5411 | } | |
5412 | ||
5413 | static int | |
5414 | model_crisv32_addoq (SIM_CPU *current_cpu, void *sem_arg) | |
5415 | { | |
5416 | #define FLD(f) abuf->fields.sfmt_addoq.f | |
5417 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5418 | const IDESC * UNUSED idesc = abuf->idesc; | |
5419 | int cycles = 0; | |
5420 | { | |
5421 | int referenced = 0; | |
5422 | int UNUSED insn_referenced = abuf->written; | |
5423 | INT in_Rd = -1; | |
5424 | INT in_Rs = -1; | |
5425 | INT out_Rd = -1; | |
5426 | in_Rd = FLD (in_Rd); | |
5427 | referenced |= 1 << 0; | |
5428 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5429 | } | |
5430 | return cycles; | |
5431 | #undef FLD | |
5432 | } | |
5433 | ||
5434 | static int | |
5435 | model_crisv32_addo_m_b_m (SIM_CPU *current_cpu, void *sem_arg) | |
5436 | { | |
5437 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
5438 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5439 | const IDESC * UNUSED idesc = abuf->idesc; | |
5440 | int cycles = 0; | |
5441 | { | |
5442 | int referenced = 0; | |
5443 | int UNUSED insn_referenced = abuf->written; | |
5444 | INT in_Rs = -1; | |
5445 | in_Rs = FLD (in_Rs); | |
5446 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
5447 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
5448 | } | |
5449 | { | |
5450 | int referenced = 0; | |
5451 | int UNUSED insn_referenced = abuf->written; | |
5452 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
5453 | } | |
5454 | { | |
5455 | int referenced = 0; | |
5456 | int UNUSED insn_referenced = abuf->written; | |
5457 | INT in_Rd = -1; | |
5458 | INT in_Rs = -1; | |
5459 | INT out_Rd = -1; | |
5460 | in_Rd = FLD (in_Rd); | |
5461 | in_Rs = FLD (in_Rs); | |
5462 | referenced |= 1 << 0; | |
5463 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
5464 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
5465 | } | |
5466 | return cycles; | |
5467 | #undef FLD | |
5468 | } | |
5469 | ||
5470 | static int | |
5471 | model_crisv32_addo_m_w_m (SIM_CPU *current_cpu, void *sem_arg) | |
5472 | { | |
5473 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
5474 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5475 | const IDESC * UNUSED idesc = abuf->idesc; | |
5476 | int cycles = 0; | |
5477 | { | |
5478 | int referenced = 0; | |
5479 | int UNUSED insn_referenced = abuf->written; | |
5480 | INT in_Rs = -1; | |
5481 | in_Rs = FLD (in_Rs); | |
5482 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
5483 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
5484 | } | |
5485 | { | |
5486 | int referenced = 0; | |
5487 | int UNUSED insn_referenced = abuf->written; | |
5488 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
5489 | } | |
5490 | { | |
5491 | int referenced = 0; | |
5492 | int UNUSED insn_referenced = abuf->written; | |
5493 | INT in_Rd = -1; | |
5494 | INT in_Rs = -1; | |
5495 | INT out_Rd = -1; | |
5496 | in_Rd = FLD (in_Rd); | |
5497 | in_Rs = FLD (in_Rs); | |
5498 | referenced |= 1 << 0; | |
5499 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
5500 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
5501 | } | |
5502 | return cycles; | |
5503 | #undef FLD | |
5504 | } | |
5505 | ||
5506 | static int | |
5507 | model_crisv32_addo_m_d_m (SIM_CPU *current_cpu, void *sem_arg) | |
5508 | { | |
5509 | #define FLD(f) abuf->fields.sfmt_addc_m.f | |
5510 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5511 | const IDESC * UNUSED idesc = abuf->idesc; | |
5512 | int cycles = 0; | |
5513 | { | |
5514 | int referenced = 0; | |
5515 | int UNUSED insn_referenced = abuf->written; | |
5516 | INT in_Rs = -1; | |
5517 | in_Rs = FLD (in_Rs); | |
5518 | if (insn_referenced & (1 << 1)) referenced |= 1 << 0; | |
5519 | cycles += crisv32f_model_crisv32_u_mem (current_cpu, idesc, 0, referenced, in_Rs); | |
5520 | } | |
5521 | { | |
5522 | int referenced = 0; | |
5523 | int UNUSED insn_referenced = abuf->written; | |
5524 | cycles += crisv32f_model_crisv32_u_mem_r (current_cpu, idesc, 1, referenced); | |
5525 | } | |
5526 | { | |
5527 | int referenced = 0; | |
5528 | int UNUSED insn_referenced = abuf->written; | |
5529 | INT in_Rd = -1; | |
5530 | INT in_Rs = -1; | |
5531 | INT out_Rd = -1; | |
5532 | in_Rd = FLD (in_Rd); | |
5533 | in_Rs = FLD (in_Rs); | |
5534 | referenced |= 1 << 0; | |
5535 | if (insn_referenced & (1 << 1)) referenced |= 1 << 1; | |
5536 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 2, referenced, in_Rd, in_Rs, out_Rd); | |
5537 | } | |
5538 | return cycles; | |
5539 | #undef FLD | |
5540 | } | |
5541 | ||
5542 | static int | |
5543 | model_crisv32_addo_cb (SIM_CPU *current_cpu, void *sem_arg) | |
5544 | { | |
5545 | #define FLD(f) abuf->fields.sfmt_bound_cb.f | |
5546 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5547 | const IDESC * UNUSED idesc = abuf->idesc; | |
5548 | int cycles = 0; | |
5549 | { | |
5550 | int referenced = 0; | |
5551 | int UNUSED insn_referenced = abuf->written; | |
5552 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
5553 | } | |
5554 | { | |
5555 | int referenced = 0; | |
5556 | int UNUSED insn_referenced = abuf->written; | |
5557 | INT in_Rd = -1; | |
5558 | INT in_Rs = -1; | |
5559 | INT out_Rd = -1; | |
5560 | in_Rd = FLD (in_Rd); | |
5561 | referenced |= 1 << 0; | |
5562 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
5563 | } | |
5564 | return cycles; | |
5565 | #undef FLD | |
5566 | } | |
5567 | ||
5568 | static int | |
5569 | model_crisv32_addo_cw (SIM_CPU *current_cpu, void *sem_arg) | |
5570 | { | |
5571 | #define FLD(f) abuf->fields.sfmt_bound_cw.f | |
5572 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5573 | const IDESC * UNUSED idesc = abuf->idesc; | |
5574 | int cycles = 0; | |
5575 | { | |
5576 | int referenced = 0; | |
5577 | int UNUSED insn_referenced = abuf->written; | |
5578 | cycles += crisv32f_model_crisv32_u_const16 (current_cpu, idesc, 0, referenced); | |
5579 | } | |
5580 | { | |
5581 | int referenced = 0; | |
5582 | int UNUSED insn_referenced = abuf->written; | |
5583 | INT in_Rd = -1; | |
5584 | INT in_Rs = -1; | |
5585 | INT out_Rd = -1; | |
5586 | in_Rd = FLD (in_Rd); | |
5587 | referenced |= 1 << 0; | |
5588 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
5589 | } | |
5590 | return cycles; | |
5591 | #undef FLD | |
5592 | } | |
5593 | ||
5594 | static int | |
5595 | model_crisv32_addo_cd (SIM_CPU *current_cpu, void *sem_arg) | |
5596 | { | |
5597 | #define FLD(f) abuf->fields.sfmt_bound_cd.f | |
5598 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5599 | const IDESC * UNUSED idesc = abuf->idesc; | |
5600 | int cycles = 0; | |
5601 | { | |
5602 | int referenced = 0; | |
5603 | int UNUSED insn_referenced = abuf->written; | |
5604 | cycles += crisv32f_model_crisv32_u_const32 (current_cpu, idesc, 0, referenced); | |
5605 | } | |
5606 | { | |
5607 | int referenced = 0; | |
5608 | int UNUSED insn_referenced = abuf->written; | |
5609 | INT in_Rd = -1; | |
5610 | INT in_Rs = -1; | |
5611 | INT out_Rd = -1; | |
5612 | in_Rd = FLD (in_Rd); | |
5613 | referenced |= 1 << 0; | |
5614 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 1, referenced, in_Rd, in_Rs, out_Rd); | |
5615 | } | |
5616 | return cycles; | |
5617 | #undef FLD | |
5618 | } | |
5619 | ||
5620 | static int | |
5621 | model_crisv32_addi_acr_b_r (SIM_CPU *current_cpu, void *sem_arg) | |
5622 | { | |
5623 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
5624 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5625 | const IDESC * UNUSED idesc = abuf->idesc; | |
5626 | int cycles = 0; | |
5627 | { | |
5628 | int referenced = 0; | |
5629 | int UNUSED insn_referenced = abuf->written; | |
5630 | INT in_Rd = -1; | |
5631 | INT in_Rs = -1; | |
5632 | INT out_Rd = -1; | |
5633 | in_Rd = FLD (in_Rd); | |
5634 | in_Rs = FLD (in_Rs); | |
5635 | referenced |= 1 << 0; | |
5636 | referenced |= 1 << 1; | |
5637 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5638 | } | |
5639 | return cycles; | |
5640 | #undef FLD | |
5641 | } | |
5642 | ||
5643 | static int | |
5644 | model_crisv32_addi_acr_w_r (SIM_CPU *current_cpu, void *sem_arg) | |
5645 | { | |
5646 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
5647 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5648 | const IDESC * UNUSED idesc = abuf->idesc; | |
5649 | int cycles = 0; | |
5650 | { | |
5651 | int referenced = 0; | |
5652 | int UNUSED insn_referenced = abuf->written; | |
5653 | INT in_Rd = -1; | |
5654 | INT in_Rs = -1; | |
5655 | INT out_Rd = -1; | |
5656 | in_Rd = FLD (in_Rd); | |
5657 | in_Rs = FLD (in_Rs); | |
5658 | referenced |= 1 << 0; | |
5659 | referenced |= 1 << 1; | |
5660 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5661 | } | |
5662 | return cycles; | |
5663 | #undef FLD | |
5664 | } | |
5665 | ||
5666 | static int | |
5667 | model_crisv32_addi_acr_d_r (SIM_CPU *current_cpu, void *sem_arg) | |
5668 | { | |
5669 | #define FLD(f) abuf->fields.sfmt_muls_b.f | |
5670 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5671 | const IDESC * UNUSED idesc = abuf->idesc; | |
5672 | int cycles = 0; | |
5673 | { | |
5674 | int referenced = 0; | |
5675 | int UNUSED insn_referenced = abuf->written; | |
5676 | INT in_Rd = -1; | |
5677 | INT in_Rs = -1; | |
5678 | INT out_Rd = -1; | |
5679 | in_Rd = FLD (in_Rd); | |
5680 | in_Rs = FLD (in_Rs); | |
5681 | referenced |= 1 << 0; | |
5682 | referenced |= 1 << 1; | |
5683 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5684 | } | |
5685 | return cycles; | |
5686 | #undef FLD | |
5687 | } | |
5688 | ||
5689 | static int | |
5690 | model_crisv32_fidxi (SIM_CPU *current_cpu, void *sem_arg) | |
5691 | { | |
5692 | #define FLD(f) abuf->fields.sfmt_mcp.f | |
5693 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5694 | const IDESC * UNUSED idesc = abuf->idesc; | |
5695 | int cycles = 0; | |
5696 | { | |
5697 | int referenced = 0; | |
5698 | int UNUSED insn_referenced = abuf->written; | |
5699 | INT in_Rd = -1; | |
5700 | INT in_Rs = -1; | |
5701 | INT out_Rd = -1; | |
5702 | in_Rs = FLD (in_Rs); | |
5703 | referenced |= 1 << 1; | |
5704 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5705 | } | |
5706 | return cycles; | |
5707 | #undef FLD | |
5708 | } | |
5709 | ||
5710 | static int | |
5711 | model_crisv32_ftagi (SIM_CPU *current_cpu, void *sem_arg) | |
5712 | { | |
5713 | #define FLD(f) abuf->fields.sfmt_mcp.f | |
5714 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5715 | const IDESC * UNUSED idesc = abuf->idesc; | |
5716 | int cycles = 0; | |
5717 | { | |
5718 | int referenced = 0; | |
5719 | int UNUSED insn_referenced = abuf->written; | |
5720 | INT in_Rd = -1; | |
5721 | INT in_Rs = -1; | |
5722 | INT out_Rd = -1; | |
5723 | in_Rs = FLD (in_Rs); | |
5724 | referenced |= 1 << 1; | |
5725 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5726 | } | |
5727 | return cycles; | |
5728 | #undef FLD | |
5729 | } | |
5730 | ||
5731 | static int | |
5732 | model_crisv32_fidxd (SIM_CPU *current_cpu, void *sem_arg) | |
5733 | { | |
5734 | #define FLD(f) abuf->fields.sfmt_mcp.f | |
5735 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5736 | const IDESC * UNUSED idesc = abuf->idesc; | |
5737 | int cycles = 0; | |
5738 | { | |
5739 | int referenced = 0; | |
5740 | int UNUSED insn_referenced = abuf->written; | |
5741 | INT in_Rd = -1; | |
5742 | INT in_Rs = -1; | |
5743 | INT out_Rd = -1; | |
5744 | in_Rs = FLD (in_Rs); | |
5745 | referenced |= 1 << 1; | |
5746 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5747 | } | |
5748 | return cycles; | |
5749 | #undef FLD | |
5750 | } | |
5751 | ||
5752 | static int | |
5753 | model_crisv32_ftagd (SIM_CPU *current_cpu, void *sem_arg) | |
5754 | { | |
5755 | #define FLD(f) abuf->fields.sfmt_mcp.f | |
5756 | const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg); | |
5757 | const IDESC * UNUSED idesc = abuf->idesc; | |
5758 | int cycles = 0; | |
5759 | { | |
5760 | int referenced = 0; | |
5761 | int UNUSED insn_referenced = abuf->written; | |
5762 | INT in_Rd = -1; | |
5763 | INT in_Rs = -1; | |
5764 | INT out_Rd = -1; | |
5765 | in_Rs = FLD (in_Rs); | |
5766 | referenced |= 1 << 1; | |
5767 | cycles += crisv32f_model_crisv32_u_exec (current_cpu, idesc, 0, referenced, in_Rd, in_Rs, out_Rd); | |
5768 | } | |
5769 | return cycles; | |
5770 | #undef FLD | |
5771 | } | |
5772 | ||
5773 | /* We assume UNIT_NONE == 0 because the tables don't always terminate | |
5774 | entries with it. */ | |
5775 | ||
5776 | /* Model timing data for `crisv32'. */ | |
5777 | ||
5778 | static const INSN_TIMING crisv32_timing[] = { | |
5779 | { CRISV32F_INSN_X_INVALID, 0, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5780 | { CRISV32F_INSN_X_AFTER, 0, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5781 | { CRISV32F_INSN_X_BEFORE, 0, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5782 | { CRISV32F_INSN_X_CTI_CHAIN, 0, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5783 | { CRISV32F_INSN_X_CHAIN, 0, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5784 | { CRISV32F_INSN_X_BEGIN, 0, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5785 | { CRISV32F_INSN_MOVE_B_R, model_crisv32_move_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5786 | { CRISV32F_INSN_MOVE_W_R, model_crisv32_move_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5787 | { CRISV32F_INSN_MOVE_D_R, model_crisv32_move_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5788 | { CRISV32F_INSN_MOVEQ, model_crisv32_moveq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5789 | { CRISV32F_INSN_MOVS_B_R, model_crisv32_movs_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5790 | { CRISV32F_INSN_MOVS_W_R, model_crisv32_movs_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5791 | { CRISV32F_INSN_MOVU_B_R, model_crisv32_movu_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5792 | { CRISV32F_INSN_MOVU_W_R, model_crisv32_movu_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5793 | { CRISV32F_INSN_MOVECBR, model_crisv32_movecbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5794 | { CRISV32F_INSN_MOVECWR, model_crisv32_movecwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5795 | { CRISV32F_INSN_MOVECDR, model_crisv32_movecdr, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5796 | { CRISV32F_INSN_MOVSCBR, model_crisv32_movscbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5797 | { CRISV32F_INSN_MOVSCWR, model_crisv32_movscwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5798 | { CRISV32F_INSN_MOVUCBR, model_crisv32_movucbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5799 | { CRISV32F_INSN_MOVUCWR, model_crisv32_movucwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5800 | { CRISV32F_INSN_ADDQ, model_crisv32_addq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5801 | { CRISV32F_INSN_SUBQ, model_crisv32_subq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5802 | { CRISV32F_INSN_CMP_R_B_R, model_crisv32_cmp_r_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5803 | { CRISV32F_INSN_CMP_R_W_R, model_crisv32_cmp_r_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5804 | { CRISV32F_INSN_CMP_R_D_R, model_crisv32_cmp_r_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5805 | { CRISV32F_INSN_CMP_M_B_M, model_crisv32_cmp_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5806 | { CRISV32F_INSN_CMP_M_W_M, model_crisv32_cmp_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5807 | { CRISV32F_INSN_CMP_M_D_M, model_crisv32_cmp_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5808 | { CRISV32F_INSN_CMPCBR, model_crisv32_cmpcbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5809 | { CRISV32F_INSN_CMPCWR, model_crisv32_cmpcwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5810 | { CRISV32F_INSN_CMPCDR, model_crisv32_cmpcdr, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5811 | { CRISV32F_INSN_CMPQ, model_crisv32_cmpq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5812 | { CRISV32F_INSN_CMPS_M_B_M, model_crisv32_cmps_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5813 | { CRISV32F_INSN_CMPS_M_W_M, model_crisv32_cmps_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5814 | { CRISV32F_INSN_CMPSCBR, model_crisv32_cmpscbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5815 | { CRISV32F_INSN_CMPSCWR, model_crisv32_cmpscwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5816 | { CRISV32F_INSN_CMPU_M_B_M, model_crisv32_cmpu_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5817 | { CRISV32F_INSN_CMPU_M_W_M, model_crisv32_cmpu_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5818 | { CRISV32F_INSN_CMPUCBR, model_crisv32_cmpucbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5819 | { CRISV32F_INSN_CMPUCWR, model_crisv32_cmpucwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5820 | { CRISV32F_INSN_MOVE_M_B_M, model_crisv32_move_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5821 | { CRISV32F_INSN_MOVE_M_W_M, model_crisv32_move_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5822 | { CRISV32F_INSN_MOVE_M_D_M, model_crisv32_move_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5823 | { CRISV32F_INSN_MOVS_M_B_M, model_crisv32_movs_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5824 | { CRISV32F_INSN_MOVS_M_W_M, model_crisv32_movs_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5825 | { CRISV32F_INSN_MOVU_M_B_M, model_crisv32_movu_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5826 | { CRISV32F_INSN_MOVU_M_W_M, model_crisv32_movu_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5827 | { CRISV32F_INSN_MOVE_R_SPRV32, model_crisv32_move_r_sprv32, { { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5828 | { CRISV32F_INSN_MOVE_SPR_RV32, model_crisv32_move_spr_rv32, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5829 | { CRISV32F_INSN_MOVE_M_SPRV32, model_crisv32_move_m_sprv32, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5830 | { CRISV32F_INSN_MOVE_C_SPRV32_P0, model_crisv32_move_c_sprv32_p0, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5831 | { CRISV32F_INSN_MOVE_C_SPRV32_P1, model_crisv32_move_c_sprv32_p1, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5832 | { CRISV32F_INSN_MOVE_C_SPRV32_P2, model_crisv32_move_c_sprv32_p2, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5833 | { CRISV32F_INSN_MOVE_C_SPRV32_P3, model_crisv32_move_c_sprv32_p3, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5834 | { CRISV32F_INSN_MOVE_C_SPRV32_P4, model_crisv32_move_c_sprv32_p4, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5835 | { CRISV32F_INSN_MOVE_C_SPRV32_P5, model_crisv32_move_c_sprv32_p5, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5836 | { CRISV32F_INSN_MOVE_C_SPRV32_P6, model_crisv32_move_c_sprv32_p6, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5837 | { CRISV32F_INSN_MOVE_C_SPRV32_P7, model_crisv32_move_c_sprv32_p7, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5838 | { CRISV32F_INSN_MOVE_C_SPRV32_P8, model_crisv32_move_c_sprv32_p8, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5839 | { CRISV32F_INSN_MOVE_C_SPRV32_P9, model_crisv32_move_c_sprv32_p9, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5840 | { CRISV32F_INSN_MOVE_C_SPRV32_P10, model_crisv32_move_c_sprv32_p10, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5841 | { CRISV32F_INSN_MOVE_C_SPRV32_P11, model_crisv32_move_c_sprv32_p11, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5842 | { CRISV32F_INSN_MOVE_C_SPRV32_P12, model_crisv32_move_c_sprv32_p12, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5843 | { CRISV32F_INSN_MOVE_C_SPRV32_P13, model_crisv32_move_c_sprv32_p13, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5844 | { CRISV32F_INSN_MOVE_C_SPRV32_P14, model_crisv32_move_c_sprv32_p14, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5845 | { CRISV32F_INSN_MOVE_C_SPRV32_P15, model_crisv32_move_c_sprv32_p15, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_TO_SR, 1, 1 } } }, | |
5846 | { CRISV32F_INSN_MOVE_SPR_MV32, model_crisv32_move_spr_mv32, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_W, 1, 1 } } }, | |
5847 | { CRISV32F_INSN_MOVE_SS_R, model_crisv32_move_ss_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5848 | { CRISV32F_INSN_MOVE_R_SS, model_crisv32_move_r_ss, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5849 | { CRISV32F_INSN_MOVEM_R_M_V32, model_crisv32_movem_r_m_v32, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MOVEM_RTOM, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_MOVEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_W, 1, 1 } } }, | |
5850 | { CRISV32F_INSN_MOVEM_M_R_V32, model_crisv32_movem_m_r_v32, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_MOVEM_MTOR, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC_MOVEM, 1, 1 } } }, | |
5851 | { CRISV32F_INSN_ADD_B_R, model_crisv32_add_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5852 | { CRISV32F_INSN_ADD_W_R, model_crisv32_add_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5853 | { CRISV32F_INSN_ADD_D_R, model_crisv32_add_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5854 | { CRISV32F_INSN_ADD_M_B_M, model_crisv32_add_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5855 | { CRISV32F_INSN_ADD_M_W_M, model_crisv32_add_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5856 | { CRISV32F_INSN_ADD_M_D_M, model_crisv32_add_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5857 | { CRISV32F_INSN_ADDCBR, model_crisv32_addcbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5858 | { CRISV32F_INSN_ADDCWR, model_crisv32_addcwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5859 | { CRISV32F_INSN_ADDCDR, model_crisv32_addcdr, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5860 | { CRISV32F_INSN_ADDS_B_R, model_crisv32_adds_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5861 | { CRISV32F_INSN_ADDS_W_R, model_crisv32_adds_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5862 | { CRISV32F_INSN_ADDS_M_B_M, model_crisv32_adds_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5863 | { CRISV32F_INSN_ADDS_M_W_M, model_crisv32_adds_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5864 | { CRISV32F_INSN_ADDSCBR, model_crisv32_addscbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5865 | { CRISV32F_INSN_ADDSCWR, model_crisv32_addscwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5866 | { CRISV32F_INSN_ADDU_B_R, model_crisv32_addu_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5867 | { CRISV32F_INSN_ADDU_W_R, model_crisv32_addu_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5868 | { CRISV32F_INSN_ADDU_M_B_M, model_crisv32_addu_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5869 | { CRISV32F_INSN_ADDU_M_W_M, model_crisv32_addu_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5870 | { CRISV32F_INSN_ADDUCBR, model_crisv32_adducbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5871 | { CRISV32F_INSN_ADDUCWR, model_crisv32_adducwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5872 | { CRISV32F_INSN_SUB_B_R, model_crisv32_sub_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5873 | { CRISV32F_INSN_SUB_W_R, model_crisv32_sub_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5874 | { CRISV32F_INSN_SUB_D_R, model_crisv32_sub_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5875 | { CRISV32F_INSN_SUB_M_B_M, model_crisv32_sub_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5876 | { CRISV32F_INSN_SUB_M_W_M, model_crisv32_sub_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5877 | { CRISV32F_INSN_SUB_M_D_M, model_crisv32_sub_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5878 | { CRISV32F_INSN_SUBCBR, model_crisv32_subcbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5879 | { CRISV32F_INSN_SUBCWR, model_crisv32_subcwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5880 | { CRISV32F_INSN_SUBCDR, model_crisv32_subcdr, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5881 | { CRISV32F_INSN_SUBS_B_R, model_crisv32_subs_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5882 | { CRISV32F_INSN_SUBS_W_R, model_crisv32_subs_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5883 | { CRISV32F_INSN_SUBS_M_B_M, model_crisv32_subs_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5884 | { CRISV32F_INSN_SUBS_M_W_M, model_crisv32_subs_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5885 | { CRISV32F_INSN_SUBSCBR, model_crisv32_subscbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5886 | { CRISV32F_INSN_SUBSCWR, model_crisv32_subscwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5887 | { CRISV32F_INSN_SUBU_B_R, model_crisv32_subu_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5888 | { CRISV32F_INSN_SUBU_W_R, model_crisv32_subu_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5889 | { CRISV32F_INSN_SUBU_M_B_M, model_crisv32_subu_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5890 | { CRISV32F_INSN_SUBU_M_W_M, model_crisv32_subu_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5891 | { CRISV32F_INSN_SUBUCBR, model_crisv32_subucbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5892 | { CRISV32F_INSN_SUBUCWR, model_crisv32_subucwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5893 | { CRISV32F_INSN_ADDC_R, model_crisv32_addc_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5894 | { CRISV32F_INSN_ADDC_M, model_crisv32_addc_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5895 | { CRISV32F_INSN_ADDC_C, model_crisv32_addc_c, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5896 | { CRISV32F_INSN_LAPC_D, model_crisv32_lapc_d, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5897 | { CRISV32F_INSN_LAPCQ, model_crisv32_lapcq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5898 | { CRISV32F_INSN_ADDI_B_R, model_crisv32_addi_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5899 | { CRISV32F_INSN_ADDI_W_R, model_crisv32_addi_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5900 | { CRISV32F_INSN_ADDI_D_R, model_crisv32_addi_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5901 | { CRISV32F_INSN_NEG_B_R, model_crisv32_neg_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5902 | { CRISV32F_INSN_NEG_W_R, model_crisv32_neg_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5903 | { CRISV32F_INSN_NEG_D_R, model_crisv32_neg_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5904 | { CRISV32F_INSN_TEST_M_B_M, model_crisv32_test_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5905 | { CRISV32F_INSN_TEST_M_W_M, model_crisv32_test_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5906 | { CRISV32F_INSN_TEST_M_D_M, model_crisv32_test_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5907 | { CRISV32F_INSN_MOVE_R_M_B_M, model_crisv32_move_r_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_W, 1, 1 } } }, | |
5908 | { CRISV32F_INSN_MOVE_R_M_W_M, model_crisv32_move_r_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_W, 1, 1 } } }, | |
5909 | { CRISV32F_INSN_MOVE_R_M_D_M, model_crisv32_move_r_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_W, 1, 1 } } }, | |
5910 | { CRISV32F_INSN_MULS_B, model_crisv32_muls_b, { { (int) UNIT_CRISV32_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5911 | { CRISV32F_INSN_MULS_W, model_crisv32_muls_w, { { (int) UNIT_CRISV32_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5912 | { CRISV32F_INSN_MULS_D, model_crisv32_muls_d, { { (int) UNIT_CRISV32_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5913 | { CRISV32F_INSN_MULU_B, model_crisv32_mulu_b, { { (int) UNIT_CRISV32_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5914 | { CRISV32F_INSN_MULU_W, model_crisv32_mulu_w, { { (int) UNIT_CRISV32_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5915 | { CRISV32F_INSN_MULU_D, model_crisv32_mulu_d, { { (int) UNIT_CRISV32_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5916 | { CRISV32F_INSN_MCP, model_crisv32_mcp, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5917 | { CRISV32F_INSN_DSTEP, model_crisv32_dstep, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5918 | { CRISV32F_INSN_ABS, model_crisv32_abs, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5919 | { CRISV32F_INSN_AND_B_R, model_crisv32_and_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5920 | { CRISV32F_INSN_AND_W_R, model_crisv32_and_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5921 | { CRISV32F_INSN_AND_D_R, model_crisv32_and_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5922 | { CRISV32F_INSN_AND_M_B_M, model_crisv32_and_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5923 | { CRISV32F_INSN_AND_M_W_M, model_crisv32_and_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5924 | { CRISV32F_INSN_AND_M_D_M, model_crisv32_and_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5925 | { CRISV32F_INSN_ANDCBR, model_crisv32_andcbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5926 | { CRISV32F_INSN_ANDCWR, model_crisv32_andcwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5927 | { CRISV32F_INSN_ANDCDR, model_crisv32_andcdr, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5928 | { CRISV32F_INSN_ANDQ, model_crisv32_andq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5929 | { CRISV32F_INSN_ORR_B_R, model_crisv32_orr_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5930 | { CRISV32F_INSN_ORR_W_R, model_crisv32_orr_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5931 | { CRISV32F_INSN_ORR_D_R, model_crisv32_orr_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5932 | { CRISV32F_INSN_OR_M_B_M, model_crisv32_or_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5933 | { CRISV32F_INSN_OR_M_W_M, model_crisv32_or_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5934 | { CRISV32F_INSN_OR_M_D_M, model_crisv32_or_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5935 | { CRISV32F_INSN_ORCBR, model_crisv32_orcbr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5936 | { CRISV32F_INSN_ORCWR, model_crisv32_orcwr, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5937 | { CRISV32F_INSN_ORCDR, model_crisv32_orcdr, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5938 | { CRISV32F_INSN_ORQ, model_crisv32_orq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5939 | { CRISV32F_INSN_XOR, model_crisv32_xor, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5940 | { CRISV32F_INSN_SWAP, model_crisv32_swap, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5941 | { CRISV32F_INSN_ASRR_B_R, model_crisv32_asrr_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5942 | { CRISV32F_INSN_ASRR_W_R, model_crisv32_asrr_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5943 | { CRISV32F_INSN_ASRR_D_R, model_crisv32_asrr_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5944 | { CRISV32F_INSN_ASRQ, model_crisv32_asrq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5945 | { CRISV32F_INSN_LSRR_B_R, model_crisv32_lsrr_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5946 | { CRISV32F_INSN_LSRR_W_R, model_crisv32_lsrr_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5947 | { CRISV32F_INSN_LSRR_D_R, model_crisv32_lsrr_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5948 | { CRISV32F_INSN_LSRQ, model_crisv32_lsrq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5949 | { CRISV32F_INSN_LSLR_B_R, model_crisv32_lslr_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5950 | { CRISV32F_INSN_LSLR_W_R, model_crisv32_lslr_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5951 | { CRISV32F_INSN_LSLR_D_R, model_crisv32_lslr_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5952 | { CRISV32F_INSN_LSLQ, model_crisv32_lslq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5953 | { CRISV32F_INSN_BTST, model_crisv32_btst, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5954 | { CRISV32F_INSN_BTSTQ, model_crisv32_btstq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5955 | { CRISV32F_INSN_SETF, model_crisv32_setf, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5956 | { CRISV32F_INSN_CLEARF, model_crisv32_clearf, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5957 | { CRISV32F_INSN_RFE, model_crisv32_rfe, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5958 | { CRISV32F_INSN_SFE, model_crisv32_sfe, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5959 | { CRISV32F_INSN_RFG, model_crisv32_rfg, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5960 | { CRISV32F_INSN_RFN, model_crisv32_rfn, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5961 | { CRISV32F_INSN_HALT, model_crisv32_halt, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5962 | { CRISV32F_INSN_BCC_B, model_crisv32_bcc_b, { { (int) UNIT_CRISV32_U_BRANCH, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5963 | { CRISV32F_INSN_BA_B, model_crisv32_ba_b, { { (int) UNIT_CRISV32_U_JUMP, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5964 | { CRISV32F_INSN_BCC_W, model_crisv32_bcc_w, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_BRANCH, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5965 | { CRISV32F_INSN_BA_W, model_crisv32_ba_w, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_JUMP, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5966 | { CRISV32F_INSN_JAS_R, model_crisv32_jas_r, { { (int) UNIT_CRISV32_U_JUMP_R, 1, 1 }, { (int) UNIT_CRISV32_U_JUMP, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5967 | { CRISV32F_INSN_JAS_C, model_crisv32_jas_c, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_JUMP, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5968 | { CRISV32F_INSN_JUMP_P, model_crisv32_jump_p, { { (int) UNIT_CRISV32_U_JUMP_SR, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5969 | { CRISV32F_INSN_BAS_C, model_crisv32_bas_c, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_JUMP, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5970 | { CRISV32F_INSN_JASC_R, model_crisv32_jasc_r, { { (int) UNIT_CRISV32_U_JUMP_R, 1, 1 }, { (int) UNIT_CRISV32_U_SKIP4, 1, 1 }, { (int) UNIT_CRISV32_U_JUMP, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5971 | { CRISV32F_INSN_JASC_C, model_crisv32_jasc_c, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_SKIP4, 1, 1 }, { (int) UNIT_CRISV32_U_JUMP, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5972 | { CRISV32F_INSN_BASC_C, model_crisv32_basc_c, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_SKIP4, 1, 1 }, { (int) UNIT_CRISV32_U_JUMP, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5973 | { CRISV32F_INSN_BREAK, model_crisv32_break, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5974 | { CRISV32F_INSN_BOUND_R_B_R, model_crisv32_bound_r_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5975 | { CRISV32F_INSN_BOUND_R_W_R, model_crisv32_bound_r_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5976 | { CRISV32F_INSN_BOUND_R_D_R, model_crisv32_bound_r_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5977 | { CRISV32F_INSN_BOUND_CB, model_crisv32_bound_cb, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5978 | { CRISV32F_INSN_BOUND_CW, model_crisv32_bound_cw, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5979 | { CRISV32F_INSN_BOUND_CD, model_crisv32_bound_cd, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5980 | { CRISV32F_INSN_SCC, model_crisv32_scc, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5981 | { CRISV32F_INSN_LZ, model_crisv32_lz, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5982 | { CRISV32F_INSN_ADDOQ, model_crisv32_addoq, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5983 | { CRISV32F_INSN_ADDO_M_B_M, model_crisv32_addo_m_b_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5984 | { CRISV32F_INSN_ADDO_M_W_M, model_crisv32_addo_m_w_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5985 | { CRISV32F_INSN_ADDO_M_D_M, model_crisv32_addo_m_d_m, { { (int) UNIT_CRISV32_U_MEM, 1, 1 }, { (int) UNIT_CRISV32_U_MEM_R, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5986 | { CRISV32F_INSN_ADDO_CB, model_crisv32_addo_cb, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5987 | { CRISV32F_INSN_ADDO_CW, model_crisv32_addo_cw, { { (int) UNIT_CRISV32_U_CONST16, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5988 | { CRISV32F_INSN_ADDO_CD, model_crisv32_addo_cd, { { (int) UNIT_CRISV32_U_CONST32, 1, 1 }, { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5989 | { CRISV32F_INSN_ADDI_ACR_B_R, model_crisv32_addi_acr_b_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5990 | { CRISV32F_INSN_ADDI_ACR_W_R, model_crisv32_addi_acr_w_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5991 | { CRISV32F_INSN_ADDI_ACR_D_R, model_crisv32_addi_acr_d_r, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5992 | { CRISV32F_INSN_FIDXI, model_crisv32_fidxi, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5993 | { CRISV32F_INSN_FTAGI, model_crisv32_ftagi, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5994 | { CRISV32F_INSN_FIDXD, model_crisv32_fidxd, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5995 | { CRISV32F_INSN_FTAGD, model_crisv32_ftagd, { { (int) UNIT_CRISV32_U_EXEC, 1, 1 } } }, | |
5996 | }; | |
5997 | ||
5998 | #endif /* WITH_PROFILE_MODEL_P */ | |
5999 | ||
6000 | static void | |
6001 | crisv32_model_init (SIM_CPU *cpu) | |
6002 | { | |
6003 | CPU_MODEL_DATA (cpu) = (void *) zalloc (sizeof (MODEL_CRISV32_DATA)); | |
6004 | } | |
6005 | ||
6006 | #if WITH_PROFILE_MODEL_P | |
6007 | #define TIMING_DATA(td) td | |
6008 | #else | |
6009 | #define TIMING_DATA(td) 0 | |
6010 | #endif | |
6011 | ||
6012 | static const MODEL crisv32_models[] = | |
6013 | { | |
6014 | { "crisv32", & crisv32_mach, MODEL_CRISV32, TIMING_DATA (& crisv32_timing[0]), crisv32_model_init }, | |
6015 | { 0 } | |
6016 | }; | |
6017 | ||
6018 | /* The properties of this cpu's implementation. */ | |
6019 | ||
6020 | static const MACH_IMP_PROPERTIES crisv32f_imp_properties = | |
6021 | { | |
6022 | sizeof (SIM_CPU), | |
6023 | #if WITH_SCACHE | |
6024 | sizeof (SCACHE) | |
6025 | #else | |
6026 | 0 | |
6027 | #endif | |
6028 | }; | |
6029 | ||
6030 | ||
6031 | static void | |
6032 | crisv32f_prepare_run (SIM_CPU *cpu) | |
6033 | { | |
6034 | if (CPU_IDESC (cpu) == NULL) | |
6035 | crisv32f_init_idesc_table (cpu); | |
6036 | } | |
6037 | ||
6038 | static const CGEN_INSN * | |
6039 | crisv32f_get_idata (SIM_CPU *cpu, int inum) | |
6040 | { | |
6041 | return CPU_IDESC (cpu) [inum].idata; | |
6042 | } | |
6043 | ||
6044 | static void | |
6045 | crisv32_init_cpu (SIM_CPU *cpu) | |
6046 | { | |
6047 | CPU_REG_FETCH (cpu) = crisv32f_fetch_register; | |
6048 | CPU_REG_STORE (cpu) = crisv32f_store_register; | |
6049 | CPU_PC_FETCH (cpu) = crisv32f_h_pc_get; | |
6050 | CPU_PC_STORE (cpu) = crisv32f_h_pc_set; | |
6051 | CPU_GET_IDATA (cpu) = crisv32f_get_idata; | |
6052 | CPU_MAX_INSNS (cpu) = CRISV32F_INSN__MAX; | |
6053 | CPU_INSN_NAME (cpu) = cgen_insn_name; | |
6054 | CPU_FULL_ENGINE_FN (cpu) = crisv32f_engine_run_full; | |
6055 | #if WITH_FAST | |
6056 | CPU_FAST_ENGINE_FN (cpu) = crisv32f_engine_run_fast; | |
6057 | #else | |
6058 | CPU_FAST_ENGINE_FN (cpu) = crisv32f_engine_run_full; | |
6059 | #endif | |
6060 | } | |
6061 | ||
6062 | const MACH crisv32_mach = | |
6063 | { | |
6064 | "crisv32", "crisv32", MACH_CRISV32, | |
6065 | 32, 32, & crisv32_models[0], & crisv32f_imp_properties, | |
6066 | crisv32_init_cpu, | |
6067 | crisv32f_prepare_run | |
6068 | }; | |
6069 |