[binutils, ARM, 5/16] BF insns infrastructure with new global reloc R_ARM_THM_BF16
[binutils-gdb.git] / sim / cris / modelv10.c
blob8299ac4e69826a101c279c4eae863de76f88ff7d
1 /* Simulator model support for crisv10f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2019 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This file 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 3, or (at your option)
12 any later version.
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, see <http://www.gnu.org/licenses/>.
24 #define WANT_CPU crisv10f
25 #define WANT_CPU_CRISV10F
27 #include "sim-main.h"
29 /* The profiling data is recorded here, but is accessed via the profiling
30 mechanism. After all, this is information for profiling. */
32 #if WITH_PROFILE_MODEL_P
34 /* Model handlers for each insn. */
36 static int
37 model_crisv10_nop (SIM_CPU *current_cpu, void *sem_arg)
39 #define FLD(f) abuf->fields.sfmt_empty.f
40 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
41 const IDESC * UNUSED idesc = abuf->idesc;
42 int cycles = 0;
44 int referenced = 0;
45 int UNUSED insn_referenced = abuf->written;
46 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
48 return cycles;
49 #undef FLD
52 static int
53 model_crisv10_move_b_r (SIM_CPU *current_cpu, void *sem_arg)
55 #define FLD(f) abuf->fields.sfmt_add_b_r.f
56 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
57 const IDESC * UNUSED idesc = abuf->idesc;
58 int cycles = 0;
60 int referenced = 0;
61 int UNUSED insn_referenced = abuf->written;
62 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
64 return cycles;
65 #undef FLD
68 static int
69 model_crisv10_move_w_r (SIM_CPU *current_cpu, void *sem_arg)
71 #define FLD(f) abuf->fields.sfmt_add_b_r.f
72 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
73 const IDESC * UNUSED idesc = abuf->idesc;
74 int cycles = 0;
76 int referenced = 0;
77 int UNUSED insn_referenced = abuf->written;
78 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
80 return cycles;
81 #undef FLD
84 static int
85 model_crisv10_move_d_r (SIM_CPU *current_cpu, void *sem_arg)
87 #define FLD(f) abuf->fields.sfmt_add_b_r.f
88 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
89 const IDESC * UNUSED idesc = abuf->idesc;
90 int cycles = 0;
92 int referenced = 0;
93 int UNUSED insn_referenced = abuf->written;
94 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
96 return cycles;
97 #undef FLD
100 static int
101 model_crisv10_movepcr (SIM_CPU *current_cpu, void *sem_arg)
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;
108 int referenced = 0;
109 int UNUSED insn_referenced = abuf->written;
110 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
112 return cycles;
113 #undef FLD
116 static int
117 model_crisv10_moveq (SIM_CPU *current_cpu, void *sem_arg)
119 #define FLD(f) abuf->fields.sfmt_moveq.f
120 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
121 const IDESC * UNUSED idesc = abuf->idesc;
122 int cycles = 0;
124 int referenced = 0;
125 int UNUSED insn_referenced = abuf->written;
126 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
128 return cycles;
129 #undef FLD
132 static int
133 model_crisv10_movs_b_r (SIM_CPU *current_cpu, void *sem_arg)
135 #define FLD(f) abuf->fields.sfmt_muls_b.f
136 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
137 const IDESC * UNUSED idesc = abuf->idesc;
138 int cycles = 0;
140 int referenced = 0;
141 int UNUSED insn_referenced = abuf->written;
142 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
144 return cycles;
145 #undef FLD
148 static int
149 model_crisv10_movs_w_r (SIM_CPU *current_cpu, void *sem_arg)
151 #define FLD(f) abuf->fields.sfmt_muls_b.f
152 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
153 const IDESC * UNUSED idesc = abuf->idesc;
154 int cycles = 0;
156 int referenced = 0;
157 int UNUSED insn_referenced = abuf->written;
158 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
160 return cycles;
161 #undef FLD
164 static int
165 model_crisv10_movu_b_r (SIM_CPU *current_cpu, void *sem_arg)
167 #define FLD(f) abuf->fields.sfmt_muls_b.f
168 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
169 const IDESC * UNUSED idesc = abuf->idesc;
170 int cycles = 0;
172 int referenced = 0;
173 int UNUSED insn_referenced = abuf->written;
174 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
176 return cycles;
177 #undef FLD
180 static int
181 model_crisv10_movu_w_r (SIM_CPU *current_cpu, void *sem_arg)
183 #define FLD(f) abuf->fields.sfmt_muls_b.f
184 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
185 const IDESC * UNUSED idesc = abuf->idesc;
186 int cycles = 0;
188 int referenced = 0;
189 int UNUSED insn_referenced = abuf->written;
190 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
192 return cycles;
193 #undef FLD
196 static int
197 model_crisv10_movecbr (SIM_CPU *current_cpu, void *sem_arg)
199 #define FLD(f) abuf->fields.sfmt_addcbr.f
200 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
201 const IDESC * UNUSED idesc = abuf->idesc;
202 int cycles = 0;
204 int referenced = 0;
205 int UNUSED insn_referenced = abuf->written;
206 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
209 int referenced = 0;
210 int UNUSED insn_referenced = abuf->written;
211 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
213 return cycles;
214 #undef FLD
217 static int
218 model_crisv10_movecwr (SIM_CPU *current_cpu, void *sem_arg)
220 #define FLD(f) abuf->fields.sfmt_addcwr.f
221 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
222 const IDESC * UNUSED idesc = abuf->idesc;
223 int cycles = 0;
225 int referenced = 0;
226 int UNUSED insn_referenced = abuf->written;
227 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
230 int referenced = 0;
231 int UNUSED insn_referenced = abuf->written;
232 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
234 return cycles;
235 #undef FLD
238 static int
239 model_crisv10_movecdr (SIM_CPU *current_cpu, void *sem_arg)
241 #define FLD(f) abuf->fields.sfmt_bound_cd.f
242 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
243 const IDESC * UNUSED idesc = abuf->idesc;
244 int cycles = 0;
246 int referenced = 0;
247 int UNUSED insn_referenced = abuf->written;
248 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
251 int referenced = 0;
252 int UNUSED insn_referenced = abuf->written;
253 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
255 return cycles;
256 #undef FLD
259 static int
260 model_crisv10_movscbr (SIM_CPU *current_cpu, void *sem_arg)
262 #define FLD(f) abuf->fields.sfmt_bound_cb.f
263 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
264 const IDESC * UNUSED idesc = abuf->idesc;
265 int cycles = 0;
267 int referenced = 0;
268 int UNUSED insn_referenced = abuf->written;
269 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
272 int referenced = 0;
273 int UNUSED insn_referenced = abuf->written;
274 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
276 return cycles;
277 #undef FLD
280 static int
281 model_crisv10_movscwr (SIM_CPU *current_cpu, void *sem_arg)
283 #define FLD(f) abuf->fields.sfmt_bound_cw.f
284 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
285 const IDESC * UNUSED idesc = abuf->idesc;
286 int cycles = 0;
288 int referenced = 0;
289 int UNUSED insn_referenced = abuf->written;
290 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
293 int referenced = 0;
294 int UNUSED insn_referenced = abuf->written;
295 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
297 return cycles;
298 #undef FLD
301 static int
302 model_crisv10_movucbr (SIM_CPU *current_cpu, void *sem_arg)
304 #define FLD(f) abuf->fields.sfmt_bound_cb.f
305 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
306 const IDESC * UNUSED idesc = abuf->idesc;
307 int cycles = 0;
309 int referenced = 0;
310 int UNUSED insn_referenced = abuf->written;
311 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
314 int referenced = 0;
315 int UNUSED insn_referenced = abuf->written;
316 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
318 return cycles;
319 #undef FLD
322 static int
323 model_crisv10_movucwr (SIM_CPU *current_cpu, void *sem_arg)
325 #define FLD(f) abuf->fields.sfmt_bound_cw.f
326 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
327 const IDESC * UNUSED idesc = abuf->idesc;
328 int cycles = 0;
330 int referenced = 0;
331 int UNUSED insn_referenced = abuf->written;
332 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
335 int referenced = 0;
336 int UNUSED insn_referenced = abuf->written;
337 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
339 return cycles;
340 #undef FLD
343 static int
344 model_crisv10_addq (SIM_CPU *current_cpu, void *sem_arg)
346 #define FLD(f) abuf->fields.sfmt_addq.f
347 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
348 const IDESC * UNUSED idesc = abuf->idesc;
349 int cycles = 0;
351 int referenced = 0;
352 int UNUSED insn_referenced = abuf->written;
353 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
355 return cycles;
356 #undef FLD
359 static int
360 model_crisv10_subq (SIM_CPU *current_cpu, void *sem_arg)
362 #define FLD(f) abuf->fields.sfmt_addq.f
363 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
364 const IDESC * UNUSED idesc = abuf->idesc;
365 int cycles = 0;
367 int referenced = 0;
368 int UNUSED insn_referenced = abuf->written;
369 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
371 return cycles;
372 #undef FLD
375 static int
376 model_crisv10_cmp_r_b_r (SIM_CPU *current_cpu, void *sem_arg)
378 #define FLD(f) abuf->fields.sfmt_add_b_r.f
379 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
380 const IDESC * UNUSED idesc = abuf->idesc;
381 int cycles = 0;
383 int referenced = 0;
384 int UNUSED insn_referenced = abuf->written;
385 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
387 return cycles;
388 #undef FLD
391 static int
392 model_crisv10_cmp_r_w_r (SIM_CPU *current_cpu, void *sem_arg)
394 #define FLD(f) abuf->fields.sfmt_add_b_r.f
395 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
396 const IDESC * UNUSED idesc = abuf->idesc;
397 int cycles = 0;
399 int referenced = 0;
400 int UNUSED insn_referenced = abuf->written;
401 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
403 return cycles;
404 #undef FLD
407 static int
408 model_crisv10_cmp_r_d_r (SIM_CPU *current_cpu, void *sem_arg)
410 #define FLD(f) abuf->fields.sfmt_add_b_r.f
411 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
412 const IDESC * UNUSED idesc = abuf->idesc;
413 int cycles = 0;
415 int referenced = 0;
416 int UNUSED insn_referenced = abuf->written;
417 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
419 return cycles;
420 #undef FLD
423 static int
424 model_crisv10_cmp_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
426 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
427 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
428 const IDESC * UNUSED idesc = abuf->idesc;
429 int cycles = 0;
431 int referenced = 0;
432 int UNUSED insn_referenced = abuf->written;
433 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
436 int referenced = 0;
437 int UNUSED insn_referenced = abuf->written;
438 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
440 return cycles;
441 #undef FLD
444 static int
445 model_crisv10_cmp_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
447 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
448 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
449 const IDESC * UNUSED idesc = abuf->idesc;
450 int cycles = 0;
452 int referenced = 0;
453 int UNUSED insn_referenced = abuf->written;
454 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
457 int referenced = 0;
458 int UNUSED insn_referenced = abuf->written;
459 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
461 return cycles;
462 #undef FLD
465 static int
466 model_crisv10_cmp_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
468 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
469 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
470 const IDESC * UNUSED idesc = abuf->idesc;
471 int cycles = 0;
473 int referenced = 0;
474 int UNUSED insn_referenced = abuf->written;
475 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
478 int referenced = 0;
479 int UNUSED insn_referenced = abuf->written;
480 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
482 return cycles;
483 #undef FLD
486 static int
487 model_crisv10_cmpcbr (SIM_CPU *current_cpu, void *sem_arg)
489 #define FLD(f) abuf->fields.sfmt_bound_cb.f
490 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
491 const IDESC * UNUSED idesc = abuf->idesc;
492 int cycles = 0;
494 int referenced = 0;
495 int UNUSED insn_referenced = abuf->written;
496 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
499 int referenced = 0;
500 int UNUSED insn_referenced = abuf->written;
501 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
503 return cycles;
504 #undef FLD
507 static int
508 model_crisv10_cmpcwr (SIM_CPU *current_cpu, void *sem_arg)
510 #define FLD(f) abuf->fields.sfmt_bound_cw.f
511 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
512 const IDESC * UNUSED idesc = abuf->idesc;
513 int cycles = 0;
515 int referenced = 0;
516 int UNUSED insn_referenced = abuf->written;
517 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
520 int referenced = 0;
521 int UNUSED insn_referenced = abuf->written;
522 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
524 return cycles;
525 #undef FLD
528 static int
529 model_crisv10_cmpcdr (SIM_CPU *current_cpu, void *sem_arg)
531 #define FLD(f) abuf->fields.sfmt_bound_cd.f
532 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
533 const IDESC * UNUSED idesc = abuf->idesc;
534 int cycles = 0;
536 int referenced = 0;
537 int UNUSED insn_referenced = abuf->written;
538 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
541 int referenced = 0;
542 int UNUSED insn_referenced = abuf->written;
543 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
545 return cycles;
546 #undef FLD
549 static int
550 model_crisv10_cmpq (SIM_CPU *current_cpu, void *sem_arg)
552 #define FLD(f) abuf->fields.sfmt_andq.f
553 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
554 const IDESC * UNUSED idesc = abuf->idesc;
555 int cycles = 0;
557 int referenced = 0;
558 int UNUSED insn_referenced = abuf->written;
559 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
561 return cycles;
562 #undef FLD
565 static int
566 model_crisv10_cmps_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
568 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
569 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
570 const IDESC * UNUSED idesc = abuf->idesc;
571 int cycles = 0;
573 int referenced = 0;
574 int UNUSED insn_referenced = abuf->written;
575 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
578 int referenced = 0;
579 int UNUSED insn_referenced = abuf->written;
580 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
582 return cycles;
583 #undef FLD
586 static int
587 model_crisv10_cmps_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
589 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
590 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
591 const IDESC * UNUSED idesc = abuf->idesc;
592 int cycles = 0;
594 int referenced = 0;
595 int UNUSED insn_referenced = abuf->written;
596 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
599 int referenced = 0;
600 int UNUSED insn_referenced = abuf->written;
601 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
603 return cycles;
604 #undef FLD
607 static int
608 model_crisv10_cmpscbr (SIM_CPU *current_cpu, void *sem_arg)
610 #define FLD(f) abuf->fields.sfmt_bound_cb.f
611 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
612 const IDESC * UNUSED idesc = abuf->idesc;
613 int cycles = 0;
615 int referenced = 0;
616 int UNUSED insn_referenced = abuf->written;
617 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
620 int referenced = 0;
621 int UNUSED insn_referenced = abuf->written;
622 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
624 return cycles;
625 #undef FLD
628 static int
629 model_crisv10_cmpscwr (SIM_CPU *current_cpu, void *sem_arg)
631 #define FLD(f) abuf->fields.sfmt_bound_cw.f
632 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
633 const IDESC * UNUSED idesc = abuf->idesc;
634 int cycles = 0;
636 int referenced = 0;
637 int UNUSED insn_referenced = abuf->written;
638 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
641 int referenced = 0;
642 int UNUSED insn_referenced = abuf->written;
643 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
645 return cycles;
646 #undef FLD
649 static int
650 model_crisv10_cmpu_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
652 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
653 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
654 const IDESC * UNUSED idesc = abuf->idesc;
655 int cycles = 0;
657 int referenced = 0;
658 int UNUSED insn_referenced = abuf->written;
659 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
662 int referenced = 0;
663 int UNUSED insn_referenced = abuf->written;
664 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
666 return cycles;
667 #undef FLD
670 static int
671 model_crisv10_cmpu_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
673 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
674 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
675 const IDESC * UNUSED idesc = abuf->idesc;
676 int cycles = 0;
678 int referenced = 0;
679 int UNUSED insn_referenced = abuf->written;
680 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
683 int referenced = 0;
684 int UNUSED insn_referenced = abuf->written;
685 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
687 return cycles;
688 #undef FLD
691 static int
692 model_crisv10_cmpucbr (SIM_CPU *current_cpu, void *sem_arg)
694 #define FLD(f) abuf->fields.sfmt_bound_cb.f
695 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
696 const IDESC * UNUSED idesc = abuf->idesc;
697 int cycles = 0;
699 int referenced = 0;
700 int UNUSED insn_referenced = abuf->written;
701 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
704 int referenced = 0;
705 int UNUSED insn_referenced = abuf->written;
706 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
708 return cycles;
709 #undef FLD
712 static int
713 model_crisv10_cmpucwr (SIM_CPU *current_cpu, void *sem_arg)
715 #define FLD(f) abuf->fields.sfmt_bound_cw.f
716 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
717 const IDESC * UNUSED idesc = abuf->idesc;
718 int cycles = 0;
720 int referenced = 0;
721 int UNUSED insn_referenced = abuf->written;
722 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
725 int referenced = 0;
726 int UNUSED insn_referenced = abuf->written;
727 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
729 return cycles;
730 #undef FLD
733 static int
734 model_crisv10_move_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
736 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
737 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
738 const IDESC * UNUSED idesc = abuf->idesc;
739 int cycles = 0;
741 int referenced = 0;
742 int UNUSED insn_referenced = abuf->written;
743 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
746 int referenced = 0;
747 int UNUSED insn_referenced = abuf->written;
748 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
750 return cycles;
751 #undef FLD
754 static int
755 model_crisv10_move_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
757 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
758 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
759 const IDESC * UNUSED idesc = abuf->idesc;
760 int cycles = 0;
762 int referenced = 0;
763 int UNUSED insn_referenced = abuf->written;
764 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
767 int referenced = 0;
768 int UNUSED insn_referenced = abuf->written;
769 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
771 return cycles;
772 #undef FLD
775 static int
776 model_crisv10_move_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
778 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
779 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
780 const IDESC * UNUSED idesc = abuf->idesc;
781 int cycles = 0;
783 int referenced = 0;
784 int UNUSED insn_referenced = abuf->written;
785 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
788 int referenced = 0;
789 int UNUSED insn_referenced = abuf->written;
790 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
792 return cycles;
793 #undef FLD
796 static int
797 model_crisv10_movs_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
799 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
800 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
801 const IDESC * UNUSED idesc = abuf->idesc;
802 int cycles = 0;
804 int referenced = 0;
805 int UNUSED insn_referenced = abuf->written;
806 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
809 int referenced = 0;
810 int UNUSED insn_referenced = abuf->written;
811 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
813 return cycles;
814 #undef FLD
817 static int
818 model_crisv10_movs_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
820 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
821 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
822 const IDESC * UNUSED idesc = abuf->idesc;
823 int cycles = 0;
825 int referenced = 0;
826 int UNUSED insn_referenced = abuf->written;
827 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
830 int referenced = 0;
831 int UNUSED insn_referenced = abuf->written;
832 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
834 return cycles;
835 #undef FLD
838 static int
839 model_crisv10_movu_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
841 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
842 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
843 const IDESC * UNUSED idesc = abuf->idesc;
844 int cycles = 0;
846 int referenced = 0;
847 int UNUSED insn_referenced = abuf->written;
848 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
851 int referenced = 0;
852 int UNUSED insn_referenced = abuf->written;
853 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
855 return cycles;
856 #undef FLD
859 static int
860 model_crisv10_movu_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
862 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
863 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
864 const IDESC * UNUSED idesc = abuf->idesc;
865 int cycles = 0;
867 int referenced = 0;
868 int UNUSED insn_referenced = abuf->written;
869 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
872 int referenced = 0;
873 int UNUSED insn_referenced = abuf->written;
874 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
876 return cycles;
877 #undef FLD
880 static int
881 model_crisv10_move_r_sprv10 (SIM_CPU *current_cpu, void *sem_arg)
883 #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f
884 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
885 const IDESC * UNUSED idesc = abuf->idesc;
886 int cycles = 0;
888 int referenced = 0;
889 int UNUSED insn_referenced = abuf->written;
890 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
892 return cycles;
893 #undef FLD
896 static int
897 model_crisv10_move_spr_rv10 (SIM_CPU *current_cpu, void *sem_arg)
899 #define FLD(f) abuf->fields.sfmt_move_spr_rv10.f
900 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
901 const IDESC * UNUSED idesc = abuf->idesc;
902 int cycles = 0;
904 int referenced = 0;
905 int UNUSED insn_referenced = abuf->written;
906 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
908 return cycles;
909 #undef FLD
912 static int
913 model_crisv10_ret_type (SIM_CPU *current_cpu, void *sem_arg)
915 #define FLD(f) abuf->fields.sfmt_move_spr_rv10.f
916 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
917 const IDESC * UNUSED idesc = abuf->idesc;
918 int cycles = 0;
920 int referenced = 0;
921 int UNUSED insn_referenced = abuf->written;
922 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
924 return cycles;
925 #undef FLD
928 static int
929 model_crisv10_move_m_sprv10 (SIM_CPU *current_cpu, void *sem_arg)
931 #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f
932 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
933 const IDESC * UNUSED idesc = abuf->idesc;
934 int cycles = 0;
936 int referenced = 0;
937 int UNUSED insn_referenced = abuf->written;
938 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
941 int referenced = 0;
942 int UNUSED insn_referenced = abuf->written;
943 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
945 return cycles;
946 #undef FLD
949 static int
950 model_crisv10_move_c_sprv10_p5 (SIM_CPU *current_cpu, void *sem_arg)
952 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p5.f
953 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
954 const IDESC * UNUSED idesc = abuf->idesc;
955 int cycles = 0;
957 int referenced = 0;
958 int UNUSED insn_referenced = abuf->written;
959 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
962 int referenced = 0;
963 int UNUSED insn_referenced = abuf->written;
964 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
966 return cycles;
967 #undef FLD
970 static int
971 model_crisv10_move_c_sprv10_p9 (SIM_CPU *current_cpu, void *sem_arg)
973 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
974 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
975 const IDESC * UNUSED idesc = abuf->idesc;
976 int cycles = 0;
978 int referenced = 0;
979 int UNUSED insn_referenced = abuf->written;
980 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
983 int referenced = 0;
984 int UNUSED insn_referenced = abuf->written;
985 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
987 return cycles;
988 #undef FLD
991 static int
992 model_crisv10_move_c_sprv10_p10 (SIM_CPU *current_cpu, void *sem_arg)
994 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
995 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
996 const IDESC * UNUSED idesc = abuf->idesc;
997 int cycles = 0;
999 int referenced = 0;
1000 int UNUSED insn_referenced = abuf->written;
1001 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1004 int referenced = 0;
1005 int UNUSED insn_referenced = abuf->written;
1006 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1008 return cycles;
1009 #undef FLD
1012 static int
1013 model_crisv10_move_c_sprv10_p11 (SIM_CPU *current_cpu, void *sem_arg)
1015 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
1016 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1017 const IDESC * UNUSED idesc = abuf->idesc;
1018 int cycles = 0;
1020 int referenced = 0;
1021 int UNUSED insn_referenced = abuf->written;
1022 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1025 int referenced = 0;
1026 int UNUSED insn_referenced = abuf->written;
1027 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1029 return cycles;
1030 #undef FLD
1033 static int
1034 model_crisv10_move_c_sprv10_p12 (SIM_CPU *current_cpu, void *sem_arg)
1036 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
1037 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1038 const IDESC * UNUSED idesc = abuf->idesc;
1039 int cycles = 0;
1041 int referenced = 0;
1042 int UNUSED insn_referenced = abuf->written;
1043 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1046 int referenced = 0;
1047 int UNUSED insn_referenced = abuf->written;
1048 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1050 return cycles;
1051 #undef FLD
1054 static int
1055 model_crisv10_move_c_sprv10_p13 (SIM_CPU *current_cpu, void *sem_arg)
1057 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
1058 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1059 const IDESC * UNUSED idesc = abuf->idesc;
1060 int cycles = 0;
1062 int referenced = 0;
1063 int UNUSED insn_referenced = abuf->written;
1064 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1067 int referenced = 0;
1068 int UNUSED insn_referenced = abuf->written;
1069 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1071 return cycles;
1072 #undef FLD
1075 static int
1076 model_crisv10_move_c_sprv10_p7 (SIM_CPU *current_cpu, void *sem_arg)
1078 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
1079 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1080 const IDESC * UNUSED idesc = abuf->idesc;
1081 int cycles = 0;
1083 int referenced = 0;
1084 int UNUSED insn_referenced = abuf->written;
1085 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1088 int referenced = 0;
1089 int UNUSED insn_referenced = abuf->written;
1090 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1092 return cycles;
1093 #undef FLD
1096 static int
1097 model_crisv10_move_c_sprv10_p14 (SIM_CPU *current_cpu, void *sem_arg)
1099 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
1100 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1101 const IDESC * UNUSED idesc = abuf->idesc;
1102 int cycles = 0;
1104 int referenced = 0;
1105 int UNUSED insn_referenced = abuf->written;
1106 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1109 int referenced = 0;
1110 int UNUSED insn_referenced = abuf->written;
1111 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1113 return cycles;
1114 #undef FLD
1117 static int
1118 model_crisv10_move_c_sprv10_p15 (SIM_CPU *current_cpu, void *sem_arg)
1120 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
1121 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1122 const IDESC * UNUSED idesc = abuf->idesc;
1123 int cycles = 0;
1125 int referenced = 0;
1126 int UNUSED insn_referenced = abuf->written;
1127 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1130 int referenced = 0;
1131 int UNUSED insn_referenced = abuf->written;
1132 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1134 return cycles;
1135 #undef FLD
1138 static int
1139 model_crisv10_move_spr_mv10 (SIM_CPU *current_cpu, void *sem_arg)
1141 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
1142 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1143 const IDESC * UNUSED idesc = abuf->idesc;
1144 int cycles = 0;
1146 int referenced = 0;
1147 int UNUSED insn_referenced = abuf->written;
1148 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1151 int referenced = 0;
1152 int UNUSED insn_referenced = abuf->written;
1153 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1155 return cycles;
1156 #undef FLD
1159 static int
1160 model_crisv10_sbfs (SIM_CPU *current_cpu, void *sem_arg)
1162 #define FLD(f) abuf->fields.sfmt_empty.f
1163 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1164 const IDESC * UNUSED idesc = abuf->idesc;
1165 int cycles = 0;
1167 int referenced = 0;
1168 int UNUSED insn_referenced = abuf->written;
1169 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1171 return cycles;
1172 #undef FLD
1175 static int
1176 model_crisv10_movem_r_m (SIM_CPU *current_cpu, void *sem_arg)
1178 #define FLD(f) abuf->fields.sfmt_movem_r_m.f
1179 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1180 const IDESC * UNUSED idesc = abuf->idesc;
1181 int cycles = 0;
1183 int referenced = 0;
1184 int UNUSED insn_referenced = abuf->written;
1185 INT in_Rd = -1;
1186 in_Rd = FLD (in_Rd);
1187 referenced |= 1 << 0;
1188 cycles += crisv10f_model_crisv10_u_movem (current_cpu, idesc, 0, referenced, in_Rd);
1191 int referenced = 0;
1192 int UNUSED insn_referenced = abuf->written;
1193 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1195 return cycles;
1196 #undef FLD
1199 static int
1200 model_crisv10_movem_m_r (SIM_CPU *current_cpu, void *sem_arg)
1202 #define FLD(f) abuf->fields.sfmt_movem_m_r.f
1203 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1204 const IDESC * UNUSED idesc = abuf->idesc;
1205 int cycles = 0;
1207 int referenced = 0;
1208 int UNUSED insn_referenced = abuf->written;
1209 INT in_Rd = -1;
1210 in_Rd = FLD (in_Rd);
1211 referenced |= 1 << 0;
1212 cycles += crisv10f_model_crisv10_u_movem (current_cpu, idesc, 0, referenced, in_Rd);
1215 int referenced = 0;
1216 int UNUSED insn_referenced = abuf->written;
1217 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1219 return cycles;
1220 #undef FLD
1223 static int
1224 model_crisv10_movem_m_pc (SIM_CPU *current_cpu, void *sem_arg)
1226 #define FLD(f) abuf->fields.sfmt_movem_m_r.f
1227 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1228 const IDESC * UNUSED idesc = abuf->idesc;
1229 int cycles = 0;
1231 int referenced = 0;
1232 int UNUSED insn_referenced = abuf->written;
1233 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1236 int referenced = 0;
1237 int UNUSED insn_referenced = abuf->written;
1238 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1240 return cycles;
1241 #undef FLD
1244 static int
1245 model_crisv10_add_b_r (SIM_CPU *current_cpu, void *sem_arg)
1247 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1248 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1249 const IDESC * UNUSED idesc = abuf->idesc;
1250 int cycles = 0;
1252 int referenced = 0;
1253 int UNUSED insn_referenced = abuf->written;
1254 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1256 return cycles;
1257 #undef FLD
1260 static int
1261 model_crisv10_add_w_r (SIM_CPU *current_cpu, void *sem_arg)
1263 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1264 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1265 const IDESC * UNUSED idesc = abuf->idesc;
1266 int cycles = 0;
1268 int referenced = 0;
1269 int UNUSED insn_referenced = abuf->written;
1270 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1272 return cycles;
1273 #undef FLD
1276 static int
1277 model_crisv10_add_d_r (SIM_CPU *current_cpu, void *sem_arg)
1279 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1280 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1281 const IDESC * UNUSED idesc = abuf->idesc;
1282 int cycles = 0;
1284 int referenced = 0;
1285 int UNUSED insn_referenced = abuf->written;
1286 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1288 return cycles;
1289 #undef FLD
1292 static int
1293 model_crisv10_add_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
1295 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1296 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1297 const IDESC * UNUSED idesc = abuf->idesc;
1298 int cycles = 0;
1300 int referenced = 0;
1301 int UNUSED insn_referenced = abuf->written;
1302 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1305 int referenced = 0;
1306 int UNUSED insn_referenced = abuf->written;
1307 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1309 return cycles;
1310 #undef FLD
1313 static int
1314 model_crisv10_add_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
1316 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1317 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1318 const IDESC * UNUSED idesc = abuf->idesc;
1319 int cycles = 0;
1321 int referenced = 0;
1322 int UNUSED insn_referenced = abuf->written;
1323 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1326 int referenced = 0;
1327 int UNUSED insn_referenced = abuf->written;
1328 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1330 return cycles;
1331 #undef FLD
1334 static int
1335 model_crisv10_add_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
1337 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1338 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1339 const IDESC * UNUSED idesc = abuf->idesc;
1340 int cycles = 0;
1342 int referenced = 0;
1343 int UNUSED insn_referenced = abuf->written;
1344 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1347 int referenced = 0;
1348 int UNUSED insn_referenced = abuf->written;
1349 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1351 return cycles;
1352 #undef FLD
1355 static int
1356 model_crisv10_addcbr (SIM_CPU *current_cpu, void *sem_arg)
1358 #define FLD(f) abuf->fields.sfmt_addcbr.f
1359 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1360 const IDESC * UNUSED idesc = abuf->idesc;
1361 int cycles = 0;
1363 int referenced = 0;
1364 int UNUSED insn_referenced = abuf->written;
1365 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1368 int referenced = 0;
1369 int UNUSED insn_referenced = abuf->written;
1370 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1372 return cycles;
1373 #undef FLD
1376 static int
1377 model_crisv10_addcwr (SIM_CPU *current_cpu, void *sem_arg)
1379 #define FLD(f) abuf->fields.sfmt_addcwr.f
1380 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1381 const IDESC * UNUSED idesc = abuf->idesc;
1382 int cycles = 0;
1384 int referenced = 0;
1385 int UNUSED insn_referenced = abuf->written;
1386 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1389 int referenced = 0;
1390 int UNUSED insn_referenced = abuf->written;
1391 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1393 return cycles;
1394 #undef FLD
1397 static int
1398 model_crisv10_addcdr (SIM_CPU *current_cpu, void *sem_arg)
1400 #define FLD(f) abuf->fields.sfmt_addcdr.f
1401 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1402 const IDESC * UNUSED idesc = abuf->idesc;
1403 int cycles = 0;
1405 int referenced = 0;
1406 int UNUSED insn_referenced = abuf->written;
1407 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1410 int referenced = 0;
1411 int UNUSED insn_referenced = abuf->written;
1412 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1414 return cycles;
1415 #undef FLD
1418 static int
1419 model_crisv10_addcpc (SIM_CPU *current_cpu, void *sem_arg)
1421 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
1422 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1423 const IDESC * UNUSED idesc = abuf->idesc;
1424 int cycles = 0;
1426 int referenced = 0;
1427 int UNUSED insn_referenced = abuf->written;
1428 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1431 int referenced = 0;
1432 int UNUSED insn_referenced = abuf->written;
1433 cycles += crisv10f_model_crisv10_u_stall (current_cpu, idesc, 1, referenced);
1436 int referenced = 0;
1437 int UNUSED insn_referenced = abuf->written;
1438 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 2, referenced);
1440 return cycles;
1441 #undef FLD
1444 static int
1445 model_crisv10_adds_b_r (SIM_CPU *current_cpu, void *sem_arg)
1447 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1448 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1449 const IDESC * UNUSED idesc = abuf->idesc;
1450 int cycles = 0;
1452 int referenced = 0;
1453 int UNUSED insn_referenced = abuf->written;
1454 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1456 return cycles;
1457 #undef FLD
1460 static int
1461 model_crisv10_adds_w_r (SIM_CPU *current_cpu, void *sem_arg)
1463 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1464 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1465 const IDESC * UNUSED idesc = abuf->idesc;
1466 int cycles = 0;
1468 int referenced = 0;
1469 int UNUSED insn_referenced = abuf->written;
1470 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1472 return cycles;
1473 #undef FLD
1476 static int
1477 model_crisv10_adds_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
1479 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1480 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1481 const IDESC * UNUSED idesc = abuf->idesc;
1482 int cycles = 0;
1484 int referenced = 0;
1485 int UNUSED insn_referenced = abuf->written;
1486 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1489 int referenced = 0;
1490 int UNUSED insn_referenced = abuf->written;
1491 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1493 return cycles;
1494 #undef FLD
1497 static int
1498 model_crisv10_adds_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
1500 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1501 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1502 const IDESC * UNUSED idesc = abuf->idesc;
1503 int cycles = 0;
1505 int referenced = 0;
1506 int UNUSED insn_referenced = abuf->written;
1507 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1510 int referenced = 0;
1511 int UNUSED insn_referenced = abuf->written;
1512 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1514 return cycles;
1515 #undef FLD
1518 static int
1519 model_crisv10_addscbr (SIM_CPU *current_cpu, void *sem_arg)
1521 #define FLD(f) abuf->fields.sfmt_addcbr.f
1522 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1523 const IDESC * UNUSED idesc = abuf->idesc;
1524 int cycles = 0;
1526 int referenced = 0;
1527 int UNUSED insn_referenced = abuf->written;
1528 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1531 int referenced = 0;
1532 int UNUSED insn_referenced = abuf->written;
1533 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1535 return cycles;
1536 #undef FLD
1539 static int
1540 model_crisv10_addscwr (SIM_CPU *current_cpu, void *sem_arg)
1542 #define FLD(f) abuf->fields.sfmt_addcwr.f
1543 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1544 const IDESC * UNUSED idesc = abuf->idesc;
1545 int cycles = 0;
1547 int referenced = 0;
1548 int UNUSED insn_referenced = abuf->written;
1549 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1552 int referenced = 0;
1553 int UNUSED insn_referenced = abuf->written;
1554 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1556 return cycles;
1557 #undef FLD
1560 static int
1561 model_crisv10_addspcpc (SIM_CPU *current_cpu, void *sem_arg)
1563 #define FLD(f) abuf->fields.sfmt_empty.f
1564 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1565 const IDESC * UNUSED idesc = abuf->idesc;
1566 int cycles = 0;
1568 int referenced = 0;
1569 int UNUSED insn_referenced = abuf->written;
1570 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1573 int referenced = 0;
1574 int UNUSED insn_referenced = abuf->written;
1575 cycles += crisv10f_model_crisv10_u_stall (current_cpu, idesc, 1, referenced);
1578 int referenced = 0;
1579 int UNUSED insn_referenced = abuf->written;
1580 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 2, referenced);
1582 return cycles;
1583 #undef FLD
1586 static int
1587 model_crisv10_addu_b_r (SIM_CPU *current_cpu, void *sem_arg)
1589 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1590 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1591 const IDESC * UNUSED idesc = abuf->idesc;
1592 int cycles = 0;
1594 int referenced = 0;
1595 int UNUSED insn_referenced = abuf->written;
1596 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1598 return cycles;
1599 #undef FLD
1602 static int
1603 model_crisv10_addu_w_r (SIM_CPU *current_cpu, void *sem_arg)
1605 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1606 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1607 const IDESC * UNUSED idesc = abuf->idesc;
1608 int cycles = 0;
1610 int referenced = 0;
1611 int UNUSED insn_referenced = abuf->written;
1612 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1614 return cycles;
1615 #undef FLD
1618 static int
1619 model_crisv10_addu_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
1621 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1622 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1623 const IDESC * UNUSED idesc = abuf->idesc;
1624 int cycles = 0;
1626 int referenced = 0;
1627 int UNUSED insn_referenced = abuf->written;
1628 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1631 int referenced = 0;
1632 int UNUSED insn_referenced = abuf->written;
1633 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1635 return cycles;
1636 #undef FLD
1639 static int
1640 model_crisv10_addu_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
1642 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1643 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1644 const IDESC * UNUSED idesc = abuf->idesc;
1645 int cycles = 0;
1647 int referenced = 0;
1648 int UNUSED insn_referenced = abuf->written;
1649 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1652 int referenced = 0;
1653 int UNUSED insn_referenced = abuf->written;
1654 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1656 return cycles;
1657 #undef FLD
1660 static int
1661 model_crisv10_adducbr (SIM_CPU *current_cpu, void *sem_arg)
1663 #define FLD(f) abuf->fields.sfmt_addcbr.f
1664 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1665 const IDESC * UNUSED idesc = abuf->idesc;
1666 int cycles = 0;
1668 int referenced = 0;
1669 int UNUSED insn_referenced = abuf->written;
1670 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1673 int referenced = 0;
1674 int UNUSED insn_referenced = abuf->written;
1675 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1677 return cycles;
1678 #undef FLD
1681 static int
1682 model_crisv10_adducwr (SIM_CPU *current_cpu, void *sem_arg)
1684 #define FLD(f) abuf->fields.sfmt_addcwr.f
1685 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1686 const IDESC * UNUSED idesc = abuf->idesc;
1687 int cycles = 0;
1689 int referenced = 0;
1690 int UNUSED insn_referenced = abuf->written;
1691 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1694 int referenced = 0;
1695 int UNUSED insn_referenced = abuf->written;
1696 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1698 return cycles;
1699 #undef FLD
1702 static int
1703 model_crisv10_sub_b_r (SIM_CPU *current_cpu, void *sem_arg)
1705 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1706 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1707 const IDESC * UNUSED idesc = abuf->idesc;
1708 int cycles = 0;
1710 int referenced = 0;
1711 int UNUSED insn_referenced = abuf->written;
1712 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1714 return cycles;
1715 #undef FLD
1718 static int
1719 model_crisv10_sub_w_r (SIM_CPU *current_cpu, void *sem_arg)
1721 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1722 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1723 const IDESC * UNUSED idesc = abuf->idesc;
1724 int cycles = 0;
1726 int referenced = 0;
1727 int UNUSED insn_referenced = abuf->written;
1728 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1730 return cycles;
1731 #undef FLD
1734 static int
1735 model_crisv10_sub_d_r (SIM_CPU *current_cpu, void *sem_arg)
1737 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1738 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1739 const IDESC * UNUSED idesc = abuf->idesc;
1740 int cycles = 0;
1742 int referenced = 0;
1743 int UNUSED insn_referenced = abuf->written;
1744 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1746 return cycles;
1747 #undef FLD
1750 static int
1751 model_crisv10_sub_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
1753 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1754 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1755 const IDESC * UNUSED idesc = abuf->idesc;
1756 int cycles = 0;
1758 int referenced = 0;
1759 int UNUSED insn_referenced = abuf->written;
1760 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1763 int referenced = 0;
1764 int UNUSED insn_referenced = abuf->written;
1765 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1767 return cycles;
1768 #undef FLD
1771 static int
1772 model_crisv10_sub_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
1774 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1775 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1776 const IDESC * UNUSED idesc = abuf->idesc;
1777 int cycles = 0;
1779 int referenced = 0;
1780 int UNUSED insn_referenced = abuf->written;
1781 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1784 int referenced = 0;
1785 int UNUSED insn_referenced = abuf->written;
1786 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1788 return cycles;
1789 #undef FLD
1792 static int
1793 model_crisv10_sub_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
1795 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1796 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1797 const IDESC * UNUSED idesc = abuf->idesc;
1798 int cycles = 0;
1800 int referenced = 0;
1801 int UNUSED insn_referenced = abuf->written;
1802 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1805 int referenced = 0;
1806 int UNUSED insn_referenced = abuf->written;
1807 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1809 return cycles;
1810 #undef FLD
1813 static int
1814 model_crisv10_subcbr (SIM_CPU *current_cpu, void *sem_arg)
1816 #define FLD(f) abuf->fields.sfmt_addcbr.f
1817 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1818 const IDESC * UNUSED idesc = abuf->idesc;
1819 int cycles = 0;
1821 int referenced = 0;
1822 int UNUSED insn_referenced = abuf->written;
1823 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1826 int referenced = 0;
1827 int UNUSED insn_referenced = abuf->written;
1828 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1830 return cycles;
1831 #undef FLD
1834 static int
1835 model_crisv10_subcwr (SIM_CPU *current_cpu, void *sem_arg)
1837 #define FLD(f) abuf->fields.sfmt_addcwr.f
1838 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1839 const IDESC * UNUSED idesc = abuf->idesc;
1840 int cycles = 0;
1842 int referenced = 0;
1843 int UNUSED insn_referenced = abuf->written;
1844 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1847 int referenced = 0;
1848 int UNUSED insn_referenced = abuf->written;
1849 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1851 return cycles;
1852 #undef FLD
1855 static int
1856 model_crisv10_subcdr (SIM_CPU *current_cpu, void *sem_arg)
1858 #define FLD(f) abuf->fields.sfmt_addcdr.f
1859 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1860 const IDESC * UNUSED idesc = abuf->idesc;
1861 int cycles = 0;
1863 int referenced = 0;
1864 int UNUSED insn_referenced = abuf->written;
1865 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
1868 int referenced = 0;
1869 int UNUSED insn_referenced = abuf->written;
1870 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1872 return cycles;
1873 #undef FLD
1876 static int
1877 model_crisv10_subs_b_r (SIM_CPU *current_cpu, void *sem_arg)
1879 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1880 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1881 const IDESC * UNUSED idesc = abuf->idesc;
1882 int cycles = 0;
1884 int referenced = 0;
1885 int UNUSED insn_referenced = abuf->written;
1886 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1888 return cycles;
1889 #undef FLD
1892 static int
1893 model_crisv10_subs_w_r (SIM_CPU *current_cpu, void *sem_arg)
1895 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1896 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1897 const IDESC * UNUSED idesc = abuf->idesc;
1898 int cycles = 0;
1900 int referenced = 0;
1901 int UNUSED insn_referenced = abuf->written;
1902 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
1904 return cycles;
1905 #undef FLD
1908 static int
1909 model_crisv10_subs_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
1911 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1912 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1913 const IDESC * UNUSED idesc = abuf->idesc;
1914 int cycles = 0;
1916 int referenced = 0;
1917 int UNUSED insn_referenced = abuf->written;
1918 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1921 int referenced = 0;
1922 int UNUSED insn_referenced = abuf->written;
1923 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1925 return cycles;
1926 #undef FLD
1929 static int
1930 model_crisv10_subs_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
1932 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
1933 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1934 const IDESC * UNUSED idesc = abuf->idesc;
1935 int cycles = 0;
1937 int referenced = 0;
1938 int UNUSED insn_referenced = abuf->written;
1939 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
1942 int referenced = 0;
1943 int UNUSED insn_referenced = abuf->written;
1944 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1946 return cycles;
1947 #undef FLD
1950 static int
1951 model_crisv10_subscbr (SIM_CPU *current_cpu, void *sem_arg)
1953 #define FLD(f) abuf->fields.sfmt_addcbr.f
1954 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1955 const IDESC * UNUSED idesc = abuf->idesc;
1956 int cycles = 0;
1958 int referenced = 0;
1959 int UNUSED insn_referenced = abuf->written;
1960 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1963 int referenced = 0;
1964 int UNUSED insn_referenced = abuf->written;
1965 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1967 return cycles;
1968 #undef FLD
1971 static int
1972 model_crisv10_subscwr (SIM_CPU *current_cpu, void *sem_arg)
1974 #define FLD(f) abuf->fields.sfmt_addcwr.f
1975 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1976 const IDESC * UNUSED idesc = abuf->idesc;
1977 int cycles = 0;
1979 int referenced = 0;
1980 int UNUSED insn_referenced = abuf->written;
1981 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
1984 int referenced = 0;
1985 int UNUSED insn_referenced = abuf->written;
1986 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
1988 return cycles;
1989 #undef FLD
1992 static int
1993 model_crisv10_subu_b_r (SIM_CPU *current_cpu, void *sem_arg)
1995 #define FLD(f) abuf->fields.sfmt_add_b_r.f
1996 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
1997 const IDESC * UNUSED idesc = abuf->idesc;
1998 int cycles = 0;
2000 int referenced = 0;
2001 int UNUSED insn_referenced = abuf->written;
2002 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2004 return cycles;
2005 #undef FLD
2008 static int
2009 model_crisv10_subu_w_r (SIM_CPU *current_cpu, void *sem_arg)
2011 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2012 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2013 const IDESC * UNUSED idesc = abuf->idesc;
2014 int cycles = 0;
2016 int referenced = 0;
2017 int UNUSED insn_referenced = abuf->written;
2018 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2020 return cycles;
2021 #undef FLD
2024 static int
2025 model_crisv10_subu_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
2027 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2028 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2029 const IDESC * UNUSED idesc = abuf->idesc;
2030 int cycles = 0;
2032 int referenced = 0;
2033 int UNUSED insn_referenced = abuf->written;
2034 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2037 int referenced = 0;
2038 int UNUSED insn_referenced = abuf->written;
2039 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2041 return cycles;
2042 #undef FLD
2045 static int
2046 model_crisv10_subu_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
2048 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2049 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2050 const IDESC * UNUSED idesc = abuf->idesc;
2051 int cycles = 0;
2053 int referenced = 0;
2054 int UNUSED insn_referenced = abuf->written;
2055 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2058 int referenced = 0;
2059 int UNUSED insn_referenced = abuf->written;
2060 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2062 return cycles;
2063 #undef FLD
2066 static int
2067 model_crisv10_subucbr (SIM_CPU *current_cpu, void *sem_arg)
2069 #define FLD(f) abuf->fields.sfmt_addcbr.f
2070 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2071 const IDESC * UNUSED idesc = abuf->idesc;
2072 int cycles = 0;
2074 int referenced = 0;
2075 int UNUSED insn_referenced = abuf->written;
2076 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
2079 int referenced = 0;
2080 int UNUSED insn_referenced = abuf->written;
2081 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2083 return cycles;
2084 #undef FLD
2087 static int
2088 model_crisv10_subucwr (SIM_CPU *current_cpu, void *sem_arg)
2090 #define FLD(f) abuf->fields.sfmt_addcwr.f
2091 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2092 const IDESC * UNUSED idesc = abuf->idesc;
2093 int cycles = 0;
2095 int referenced = 0;
2096 int UNUSED insn_referenced = abuf->written;
2097 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
2100 int referenced = 0;
2101 int UNUSED insn_referenced = abuf->written;
2102 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2104 return cycles;
2105 #undef FLD
2108 static int
2109 model_crisv10_addi_b_r (SIM_CPU *current_cpu, void *sem_arg)
2111 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2112 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2113 const IDESC * UNUSED idesc = abuf->idesc;
2114 int cycles = 0;
2116 int referenced = 0;
2117 int UNUSED insn_referenced = abuf->written;
2118 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2120 return cycles;
2121 #undef FLD
2124 static int
2125 model_crisv10_addi_w_r (SIM_CPU *current_cpu, void *sem_arg)
2127 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2128 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2129 const IDESC * UNUSED idesc = abuf->idesc;
2130 int cycles = 0;
2132 int referenced = 0;
2133 int UNUSED insn_referenced = abuf->written;
2134 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2136 return cycles;
2137 #undef FLD
2140 static int
2141 model_crisv10_addi_d_r (SIM_CPU *current_cpu, void *sem_arg)
2143 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2144 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2145 const IDESC * UNUSED idesc = abuf->idesc;
2146 int cycles = 0;
2148 int referenced = 0;
2149 int UNUSED insn_referenced = abuf->written;
2150 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2152 return cycles;
2153 #undef FLD
2156 static int
2157 model_crisv10_neg_b_r (SIM_CPU *current_cpu, void *sem_arg)
2159 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2160 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2161 const IDESC * UNUSED idesc = abuf->idesc;
2162 int cycles = 0;
2164 int referenced = 0;
2165 int UNUSED insn_referenced = abuf->written;
2166 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2168 return cycles;
2169 #undef FLD
2172 static int
2173 model_crisv10_neg_w_r (SIM_CPU *current_cpu, void *sem_arg)
2175 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2176 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2177 const IDESC * UNUSED idesc = abuf->idesc;
2178 int cycles = 0;
2180 int referenced = 0;
2181 int UNUSED insn_referenced = abuf->written;
2182 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2184 return cycles;
2185 #undef FLD
2188 static int
2189 model_crisv10_neg_d_r (SIM_CPU *current_cpu, void *sem_arg)
2191 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2192 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2193 const IDESC * UNUSED idesc = abuf->idesc;
2194 int cycles = 0;
2196 int referenced = 0;
2197 int UNUSED insn_referenced = abuf->written;
2198 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2200 return cycles;
2201 #undef FLD
2204 static int
2205 model_crisv10_test_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
2207 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
2208 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2209 const IDESC * UNUSED idesc = abuf->idesc;
2210 int cycles = 0;
2212 int referenced = 0;
2213 int UNUSED insn_referenced = abuf->written;
2214 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2217 int referenced = 0;
2218 int UNUSED insn_referenced = abuf->written;
2219 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2221 return cycles;
2222 #undef FLD
2225 static int
2226 model_crisv10_test_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
2228 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
2229 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2230 const IDESC * UNUSED idesc = abuf->idesc;
2231 int cycles = 0;
2233 int referenced = 0;
2234 int UNUSED insn_referenced = abuf->written;
2235 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2238 int referenced = 0;
2239 int UNUSED insn_referenced = abuf->written;
2240 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2242 return cycles;
2243 #undef FLD
2246 static int
2247 model_crisv10_test_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
2249 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
2250 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2251 const IDESC * UNUSED idesc = abuf->idesc;
2252 int cycles = 0;
2254 int referenced = 0;
2255 int UNUSED insn_referenced = abuf->written;
2256 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2259 int referenced = 0;
2260 int UNUSED insn_referenced = abuf->written;
2261 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2263 return cycles;
2264 #undef FLD
2267 static int
2268 model_crisv10_move_r_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
2270 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2271 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2272 const IDESC * UNUSED idesc = abuf->idesc;
2273 int cycles = 0;
2275 int referenced = 0;
2276 int UNUSED insn_referenced = abuf->written;
2277 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2280 int referenced = 0;
2281 int UNUSED insn_referenced = abuf->written;
2282 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2284 return cycles;
2285 #undef FLD
2288 static int
2289 model_crisv10_move_r_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
2291 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2292 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2293 const IDESC * UNUSED idesc = abuf->idesc;
2294 int cycles = 0;
2296 int referenced = 0;
2297 int UNUSED insn_referenced = abuf->written;
2298 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2301 int referenced = 0;
2302 int UNUSED insn_referenced = abuf->written;
2303 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2305 return cycles;
2306 #undef FLD
2309 static int
2310 model_crisv10_move_r_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
2312 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
2313 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2314 const IDESC * UNUSED idesc = abuf->idesc;
2315 int cycles = 0;
2317 int referenced = 0;
2318 int UNUSED insn_referenced = abuf->written;
2319 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2322 int referenced = 0;
2323 int UNUSED insn_referenced = abuf->written;
2324 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2326 return cycles;
2327 #undef FLD
2330 static int
2331 model_crisv10_muls_b (SIM_CPU *current_cpu, void *sem_arg)
2333 #define FLD(f) abuf->fields.sfmt_muls_b.f
2334 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2335 const IDESC * UNUSED idesc = abuf->idesc;
2336 int cycles = 0;
2338 int referenced = 0;
2339 int UNUSED insn_referenced = abuf->written;
2340 cycles += crisv10f_model_crisv10_u_multiply (current_cpu, idesc, 0, referenced);
2343 int referenced = 0;
2344 int UNUSED insn_referenced = abuf->written;
2345 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2347 return cycles;
2348 #undef FLD
2351 static int
2352 model_crisv10_muls_w (SIM_CPU *current_cpu, void *sem_arg)
2354 #define FLD(f) abuf->fields.sfmt_muls_b.f
2355 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2356 const IDESC * UNUSED idesc = abuf->idesc;
2357 int cycles = 0;
2359 int referenced = 0;
2360 int UNUSED insn_referenced = abuf->written;
2361 cycles += crisv10f_model_crisv10_u_multiply (current_cpu, idesc, 0, referenced);
2364 int referenced = 0;
2365 int UNUSED insn_referenced = abuf->written;
2366 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2368 return cycles;
2369 #undef FLD
2372 static int
2373 model_crisv10_muls_d (SIM_CPU *current_cpu, void *sem_arg)
2375 #define FLD(f) abuf->fields.sfmt_muls_b.f
2376 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2377 const IDESC * UNUSED idesc = abuf->idesc;
2378 int cycles = 0;
2380 int referenced = 0;
2381 int UNUSED insn_referenced = abuf->written;
2382 cycles += crisv10f_model_crisv10_u_multiply (current_cpu, idesc, 0, referenced);
2385 int referenced = 0;
2386 int UNUSED insn_referenced = abuf->written;
2387 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2389 return cycles;
2390 #undef FLD
2393 static int
2394 model_crisv10_mulu_b (SIM_CPU *current_cpu, void *sem_arg)
2396 #define FLD(f) abuf->fields.sfmt_muls_b.f
2397 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2398 const IDESC * UNUSED idesc = abuf->idesc;
2399 int cycles = 0;
2401 int referenced = 0;
2402 int UNUSED insn_referenced = abuf->written;
2403 cycles += crisv10f_model_crisv10_u_multiply (current_cpu, idesc, 0, referenced);
2406 int referenced = 0;
2407 int UNUSED insn_referenced = abuf->written;
2408 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2410 return cycles;
2411 #undef FLD
2414 static int
2415 model_crisv10_mulu_w (SIM_CPU *current_cpu, void *sem_arg)
2417 #define FLD(f) abuf->fields.sfmt_muls_b.f
2418 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2419 const IDESC * UNUSED idesc = abuf->idesc;
2420 int cycles = 0;
2422 int referenced = 0;
2423 int UNUSED insn_referenced = abuf->written;
2424 cycles += crisv10f_model_crisv10_u_multiply (current_cpu, idesc, 0, referenced);
2427 int referenced = 0;
2428 int UNUSED insn_referenced = abuf->written;
2429 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2431 return cycles;
2432 #undef FLD
2435 static int
2436 model_crisv10_mulu_d (SIM_CPU *current_cpu, void *sem_arg)
2438 #define FLD(f) abuf->fields.sfmt_muls_b.f
2439 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2440 const IDESC * UNUSED idesc = abuf->idesc;
2441 int cycles = 0;
2443 int referenced = 0;
2444 int UNUSED insn_referenced = abuf->written;
2445 cycles += crisv10f_model_crisv10_u_multiply (current_cpu, idesc, 0, referenced);
2448 int referenced = 0;
2449 int UNUSED insn_referenced = abuf->written;
2450 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2452 return cycles;
2453 #undef FLD
2456 static int
2457 model_crisv10_mstep (SIM_CPU *current_cpu, void *sem_arg)
2459 #define FLD(f) abuf->fields.sfmt_muls_b.f
2460 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2461 const IDESC * UNUSED idesc = abuf->idesc;
2462 int cycles = 0;
2464 int referenced = 0;
2465 int UNUSED insn_referenced = abuf->written;
2466 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2468 return cycles;
2469 #undef FLD
2472 static int
2473 model_crisv10_dstep (SIM_CPU *current_cpu, void *sem_arg)
2475 #define FLD(f) abuf->fields.sfmt_muls_b.f
2476 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2477 const IDESC * UNUSED idesc = abuf->idesc;
2478 int cycles = 0;
2480 int referenced = 0;
2481 int UNUSED insn_referenced = abuf->written;
2482 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2484 return cycles;
2485 #undef FLD
2488 static int
2489 model_crisv10_abs (SIM_CPU *current_cpu, void *sem_arg)
2491 #define FLD(f) abuf->fields.sfmt_muls_b.f
2492 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2493 const IDESC * UNUSED idesc = abuf->idesc;
2494 int cycles = 0;
2496 int referenced = 0;
2497 int UNUSED insn_referenced = abuf->written;
2498 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2500 return cycles;
2501 #undef FLD
2504 static int
2505 model_crisv10_and_b_r (SIM_CPU *current_cpu, void *sem_arg)
2507 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2508 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2509 const IDESC * UNUSED idesc = abuf->idesc;
2510 int cycles = 0;
2512 int referenced = 0;
2513 int UNUSED insn_referenced = abuf->written;
2514 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2516 return cycles;
2517 #undef FLD
2520 static int
2521 model_crisv10_and_w_r (SIM_CPU *current_cpu, void *sem_arg)
2523 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2524 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2525 const IDESC * UNUSED idesc = abuf->idesc;
2526 int cycles = 0;
2528 int referenced = 0;
2529 int UNUSED insn_referenced = abuf->written;
2530 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2532 return cycles;
2533 #undef FLD
2536 static int
2537 model_crisv10_and_d_r (SIM_CPU *current_cpu, void *sem_arg)
2539 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2540 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2541 const IDESC * UNUSED idesc = abuf->idesc;
2542 int cycles = 0;
2544 int referenced = 0;
2545 int UNUSED insn_referenced = abuf->written;
2546 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2548 return cycles;
2549 #undef FLD
2552 static int
2553 model_crisv10_and_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
2555 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2556 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2557 const IDESC * UNUSED idesc = abuf->idesc;
2558 int cycles = 0;
2560 int referenced = 0;
2561 int UNUSED insn_referenced = abuf->written;
2562 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2565 int referenced = 0;
2566 int UNUSED insn_referenced = abuf->written;
2567 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2569 return cycles;
2570 #undef FLD
2573 static int
2574 model_crisv10_and_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
2576 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2577 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2578 const IDESC * UNUSED idesc = abuf->idesc;
2579 int cycles = 0;
2581 int referenced = 0;
2582 int UNUSED insn_referenced = abuf->written;
2583 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2586 int referenced = 0;
2587 int UNUSED insn_referenced = abuf->written;
2588 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2590 return cycles;
2591 #undef FLD
2594 static int
2595 model_crisv10_and_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
2597 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2598 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2599 const IDESC * UNUSED idesc = abuf->idesc;
2600 int cycles = 0;
2602 int referenced = 0;
2603 int UNUSED insn_referenced = abuf->written;
2604 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2607 int referenced = 0;
2608 int UNUSED insn_referenced = abuf->written;
2609 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2611 return cycles;
2612 #undef FLD
2615 static int
2616 model_crisv10_andcbr (SIM_CPU *current_cpu, void *sem_arg)
2618 #define FLD(f) abuf->fields.sfmt_addcbr.f
2619 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2620 const IDESC * UNUSED idesc = abuf->idesc;
2621 int cycles = 0;
2623 int referenced = 0;
2624 int UNUSED insn_referenced = abuf->written;
2625 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
2628 int referenced = 0;
2629 int UNUSED insn_referenced = abuf->written;
2630 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2632 return cycles;
2633 #undef FLD
2636 static int
2637 model_crisv10_andcwr (SIM_CPU *current_cpu, void *sem_arg)
2639 #define FLD(f) abuf->fields.sfmt_addcwr.f
2640 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2641 const IDESC * UNUSED idesc = abuf->idesc;
2642 int cycles = 0;
2644 int referenced = 0;
2645 int UNUSED insn_referenced = abuf->written;
2646 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
2649 int referenced = 0;
2650 int UNUSED insn_referenced = abuf->written;
2651 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2653 return cycles;
2654 #undef FLD
2657 static int
2658 model_crisv10_andcdr (SIM_CPU *current_cpu, void *sem_arg)
2660 #define FLD(f) abuf->fields.sfmt_addcdr.f
2661 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2662 const IDESC * UNUSED idesc = abuf->idesc;
2663 int cycles = 0;
2665 int referenced = 0;
2666 int UNUSED insn_referenced = abuf->written;
2667 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
2670 int referenced = 0;
2671 int UNUSED insn_referenced = abuf->written;
2672 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2674 return cycles;
2675 #undef FLD
2678 static int
2679 model_crisv10_andq (SIM_CPU *current_cpu, void *sem_arg)
2681 #define FLD(f) abuf->fields.sfmt_andq.f
2682 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2683 const IDESC * UNUSED idesc = abuf->idesc;
2684 int cycles = 0;
2686 int referenced = 0;
2687 int UNUSED insn_referenced = abuf->written;
2688 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2690 return cycles;
2691 #undef FLD
2694 static int
2695 model_crisv10_orr_b_r (SIM_CPU *current_cpu, void *sem_arg)
2697 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2698 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2699 const IDESC * UNUSED idesc = abuf->idesc;
2700 int cycles = 0;
2702 int referenced = 0;
2703 int UNUSED insn_referenced = abuf->written;
2704 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2706 return cycles;
2707 #undef FLD
2710 static int
2711 model_crisv10_orr_w_r (SIM_CPU *current_cpu, void *sem_arg)
2713 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2714 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2715 const IDESC * UNUSED idesc = abuf->idesc;
2716 int cycles = 0;
2718 int referenced = 0;
2719 int UNUSED insn_referenced = abuf->written;
2720 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2722 return cycles;
2723 #undef FLD
2726 static int
2727 model_crisv10_orr_d_r (SIM_CPU *current_cpu, void *sem_arg)
2729 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2730 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2731 const IDESC * UNUSED idesc = abuf->idesc;
2732 int cycles = 0;
2734 int referenced = 0;
2735 int UNUSED insn_referenced = abuf->written;
2736 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2738 return cycles;
2739 #undef FLD
2742 static int
2743 model_crisv10_or_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
2745 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2746 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2747 const IDESC * UNUSED idesc = abuf->idesc;
2748 int cycles = 0;
2750 int referenced = 0;
2751 int UNUSED insn_referenced = abuf->written;
2752 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2755 int referenced = 0;
2756 int UNUSED insn_referenced = abuf->written;
2757 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2759 return cycles;
2760 #undef FLD
2763 static int
2764 model_crisv10_or_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
2766 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2767 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2768 const IDESC * UNUSED idesc = abuf->idesc;
2769 int cycles = 0;
2771 int referenced = 0;
2772 int UNUSED insn_referenced = abuf->written;
2773 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2776 int referenced = 0;
2777 int UNUSED insn_referenced = abuf->written;
2778 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2780 return cycles;
2781 #undef FLD
2784 static int
2785 model_crisv10_or_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
2787 #define FLD(f) abuf->fields.sfmt_add_m_b_m.f
2788 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2789 const IDESC * UNUSED idesc = abuf->idesc;
2790 int cycles = 0;
2792 int referenced = 0;
2793 int UNUSED insn_referenced = abuf->written;
2794 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
2797 int referenced = 0;
2798 int UNUSED insn_referenced = abuf->written;
2799 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2801 return cycles;
2802 #undef FLD
2805 static int
2806 model_crisv10_orcbr (SIM_CPU *current_cpu, void *sem_arg)
2808 #define FLD(f) abuf->fields.sfmt_addcbr.f
2809 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2810 const IDESC * UNUSED idesc = abuf->idesc;
2811 int cycles = 0;
2813 int referenced = 0;
2814 int UNUSED insn_referenced = abuf->written;
2815 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
2818 int referenced = 0;
2819 int UNUSED insn_referenced = abuf->written;
2820 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2822 return cycles;
2823 #undef FLD
2826 static int
2827 model_crisv10_orcwr (SIM_CPU *current_cpu, void *sem_arg)
2829 #define FLD(f) abuf->fields.sfmt_addcwr.f
2830 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2831 const IDESC * UNUSED idesc = abuf->idesc;
2832 int cycles = 0;
2834 int referenced = 0;
2835 int UNUSED insn_referenced = abuf->written;
2836 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
2839 int referenced = 0;
2840 int UNUSED insn_referenced = abuf->written;
2841 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2843 return cycles;
2844 #undef FLD
2847 static int
2848 model_crisv10_orcdr (SIM_CPU *current_cpu, void *sem_arg)
2850 #define FLD(f) abuf->fields.sfmt_addcdr.f
2851 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2852 const IDESC * UNUSED idesc = abuf->idesc;
2853 int cycles = 0;
2855 int referenced = 0;
2856 int UNUSED insn_referenced = abuf->written;
2857 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
2860 int referenced = 0;
2861 int UNUSED insn_referenced = abuf->written;
2862 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
2864 return cycles;
2865 #undef FLD
2868 static int
2869 model_crisv10_orq (SIM_CPU *current_cpu, void *sem_arg)
2871 #define FLD(f) abuf->fields.sfmt_andq.f
2872 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2873 const IDESC * UNUSED idesc = abuf->idesc;
2874 int cycles = 0;
2876 int referenced = 0;
2877 int UNUSED insn_referenced = abuf->written;
2878 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2880 return cycles;
2881 #undef FLD
2884 static int
2885 model_crisv10_xor (SIM_CPU *current_cpu, void *sem_arg)
2887 #define FLD(f) abuf->fields.sfmt_muls_b.f
2888 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2889 const IDESC * UNUSED idesc = abuf->idesc;
2890 int cycles = 0;
2892 int referenced = 0;
2893 int UNUSED insn_referenced = abuf->written;
2894 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2896 return cycles;
2897 #undef FLD
2900 static int
2901 model_crisv10_swap (SIM_CPU *current_cpu, void *sem_arg)
2903 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
2904 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2905 const IDESC * UNUSED idesc = abuf->idesc;
2906 int cycles = 0;
2908 int referenced = 0;
2909 int UNUSED insn_referenced = abuf->written;
2910 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2912 return cycles;
2913 #undef FLD
2916 static int
2917 model_crisv10_asrr_b_r (SIM_CPU *current_cpu, void *sem_arg)
2919 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2920 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2921 const IDESC * UNUSED idesc = abuf->idesc;
2922 int cycles = 0;
2924 int referenced = 0;
2925 int UNUSED insn_referenced = abuf->written;
2926 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2928 return cycles;
2929 #undef FLD
2932 static int
2933 model_crisv10_asrr_w_r (SIM_CPU *current_cpu, void *sem_arg)
2935 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2936 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2937 const IDESC * UNUSED idesc = abuf->idesc;
2938 int cycles = 0;
2940 int referenced = 0;
2941 int UNUSED insn_referenced = abuf->written;
2942 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2944 return cycles;
2945 #undef FLD
2948 static int
2949 model_crisv10_asrr_d_r (SIM_CPU *current_cpu, void *sem_arg)
2951 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2952 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2953 const IDESC * UNUSED idesc = abuf->idesc;
2954 int cycles = 0;
2956 int referenced = 0;
2957 int UNUSED insn_referenced = abuf->written;
2958 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2960 return cycles;
2961 #undef FLD
2964 static int
2965 model_crisv10_asrq (SIM_CPU *current_cpu, void *sem_arg)
2967 #define FLD(f) abuf->fields.sfmt_asrq.f
2968 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2969 const IDESC * UNUSED idesc = abuf->idesc;
2970 int cycles = 0;
2972 int referenced = 0;
2973 int UNUSED insn_referenced = abuf->written;
2974 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2976 return cycles;
2977 #undef FLD
2980 static int
2981 model_crisv10_lsrr_b_r (SIM_CPU *current_cpu, void *sem_arg)
2983 #define FLD(f) abuf->fields.sfmt_add_b_r.f
2984 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
2985 const IDESC * UNUSED idesc = abuf->idesc;
2986 int cycles = 0;
2988 int referenced = 0;
2989 int UNUSED insn_referenced = abuf->written;
2990 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
2992 return cycles;
2993 #undef FLD
2996 static int
2997 model_crisv10_lsrr_w_r (SIM_CPU *current_cpu, void *sem_arg)
2999 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3000 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3001 const IDESC * UNUSED idesc = abuf->idesc;
3002 int cycles = 0;
3004 int referenced = 0;
3005 int UNUSED insn_referenced = abuf->written;
3006 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3008 return cycles;
3009 #undef FLD
3012 static int
3013 model_crisv10_lsrr_d_r (SIM_CPU *current_cpu, void *sem_arg)
3015 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3016 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3017 const IDESC * UNUSED idesc = abuf->idesc;
3018 int cycles = 0;
3020 int referenced = 0;
3021 int UNUSED insn_referenced = abuf->written;
3022 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3024 return cycles;
3025 #undef FLD
3028 static int
3029 model_crisv10_lsrq (SIM_CPU *current_cpu, void *sem_arg)
3031 #define FLD(f) abuf->fields.sfmt_asrq.f
3032 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3033 const IDESC * UNUSED idesc = abuf->idesc;
3034 int cycles = 0;
3036 int referenced = 0;
3037 int UNUSED insn_referenced = abuf->written;
3038 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3040 return cycles;
3041 #undef FLD
3044 static int
3045 model_crisv10_lslr_b_r (SIM_CPU *current_cpu, void *sem_arg)
3047 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3048 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3049 const IDESC * UNUSED idesc = abuf->idesc;
3050 int cycles = 0;
3052 int referenced = 0;
3053 int UNUSED insn_referenced = abuf->written;
3054 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3056 return cycles;
3057 #undef FLD
3060 static int
3061 model_crisv10_lslr_w_r (SIM_CPU *current_cpu, void *sem_arg)
3063 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3064 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3065 const IDESC * UNUSED idesc = abuf->idesc;
3066 int cycles = 0;
3068 int referenced = 0;
3069 int UNUSED insn_referenced = abuf->written;
3070 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3072 return cycles;
3073 #undef FLD
3076 static int
3077 model_crisv10_lslr_d_r (SIM_CPU *current_cpu, void *sem_arg)
3079 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3080 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3081 const IDESC * UNUSED idesc = abuf->idesc;
3082 int cycles = 0;
3084 int referenced = 0;
3085 int UNUSED insn_referenced = abuf->written;
3086 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3088 return cycles;
3089 #undef FLD
3092 static int
3093 model_crisv10_lslq (SIM_CPU *current_cpu, void *sem_arg)
3095 #define FLD(f) abuf->fields.sfmt_asrq.f
3096 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3097 const IDESC * UNUSED idesc = abuf->idesc;
3098 int cycles = 0;
3100 int referenced = 0;
3101 int UNUSED insn_referenced = abuf->written;
3102 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3104 return cycles;
3105 #undef FLD
3108 static int
3109 model_crisv10_btst (SIM_CPU *current_cpu, void *sem_arg)
3111 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3112 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3113 const IDESC * UNUSED idesc = abuf->idesc;
3114 int cycles = 0;
3116 int referenced = 0;
3117 int UNUSED insn_referenced = abuf->written;
3118 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3120 return cycles;
3121 #undef FLD
3124 static int
3125 model_crisv10_btstq (SIM_CPU *current_cpu, void *sem_arg)
3127 #define FLD(f) abuf->fields.sfmt_asrq.f
3128 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3129 const IDESC * UNUSED idesc = abuf->idesc;
3130 int cycles = 0;
3132 int referenced = 0;
3133 int UNUSED insn_referenced = abuf->written;
3134 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3136 return cycles;
3137 #undef FLD
3140 static int
3141 model_crisv10_setf (SIM_CPU *current_cpu, void *sem_arg)
3143 #define FLD(f) abuf->fields.sfmt_setf.f
3144 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3145 const IDESC * UNUSED idesc = abuf->idesc;
3146 int cycles = 0;
3148 int referenced = 0;
3149 int UNUSED insn_referenced = abuf->written;
3150 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3152 return cycles;
3153 #undef FLD
3156 static int
3157 model_crisv10_clearf (SIM_CPU *current_cpu, void *sem_arg)
3159 #define FLD(f) abuf->fields.sfmt_setf.f
3160 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3161 const IDESC * UNUSED idesc = abuf->idesc;
3162 int cycles = 0;
3164 int referenced = 0;
3165 int UNUSED insn_referenced = abuf->written;
3166 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3168 return cycles;
3169 #undef FLD
3172 static int
3173 model_crisv10_bcc_b (SIM_CPU *current_cpu, void *sem_arg)
3175 #define FLD(f) abuf->fields.sfmt_bcc_b.f
3176 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3177 const IDESC * UNUSED idesc = abuf->idesc;
3178 int cycles = 0;
3180 int referenced = 0;
3181 int UNUSED insn_referenced = abuf->written;
3182 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3184 return cycles;
3185 #undef FLD
3188 static int
3189 model_crisv10_ba_b (SIM_CPU *current_cpu, void *sem_arg)
3191 #define FLD(f) abuf->fields.sfmt_bcc_b.f
3192 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3193 const IDESC * UNUSED idesc = abuf->idesc;
3194 int cycles = 0;
3196 int referenced = 0;
3197 int UNUSED insn_referenced = abuf->written;
3198 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3200 return cycles;
3201 #undef FLD
3204 static int
3205 model_crisv10_bcc_w (SIM_CPU *current_cpu, void *sem_arg)
3207 #define FLD(f) abuf->fields.sfmt_bcc_w.f
3208 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3209 const IDESC * UNUSED idesc = abuf->idesc;
3210 int cycles = 0;
3212 int referenced = 0;
3213 int UNUSED insn_referenced = abuf->written;
3214 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
3217 int referenced = 0;
3218 int UNUSED insn_referenced = abuf->written;
3219 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3221 return cycles;
3222 #undef FLD
3225 static int
3226 model_crisv10_ba_w (SIM_CPU *current_cpu, void *sem_arg)
3228 #define FLD(f) abuf->fields.sfmt_bcc_w.f
3229 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3230 const IDESC * UNUSED idesc = abuf->idesc;
3231 int cycles = 0;
3233 int referenced = 0;
3234 int UNUSED insn_referenced = abuf->written;
3235 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
3238 int referenced = 0;
3239 int UNUSED insn_referenced = abuf->written;
3240 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3242 return cycles;
3243 #undef FLD
3246 static int
3247 model_crisv10_jump_r (SIM_CPU *current_cpu, void *sem_arg)
3249 #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f
3250 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3251 const IDESC * UNUSED idesc = abuf->idesc;
3252 int cycles = 0;
3254 int referenced = 0;
3255 int UNUSED insn_referenced = abuf->written;
3256 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3258 return cycles;
3259 #undef FLD
3262 static int
3263 model_crisv10_jump_m (SIM_CPU *current_cpu, void *sem_arg)
3265 #define FLD(f) abuf->fields.sfmt_move_m_sprv10.f
3266 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3267 const IDESC * UNUSED idesc = abuf->idesc;
3268 int cycles = 0;
3270 int referenced = 0;
3271 int UNUSED insn_referenced = abuf->written;
3272 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3275 int referenced = 0;
3276 int UNUSED insn_referenced = abuf->written;
3277 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3279 return cycles;
3280 #undef FLD
3283 static int
3284 model_crisv10_jump_c (SIM_CPU *current_cpu, void *sem_arg)
3286 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3287 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3288 const IDESC * UNUSED idesc = abuf->idesc;
3289 int cycles = 0;
3291 int referenced = 0;
3292 int UNUSED insn_referenced = abuf->written;
3293 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
3296 int referenced = 0;
3297 int UNUSED insn_referenced = abuf->written;
3298 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3300 return cycles;
3301 #undef FLD
3304 static int
3305 model_crisv10_break (SIM_CPU *current_cpu, void *sem_arg)
3307 #define FLD(f) abuf->fields.sfmt_break.f
3308 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3309 const IDESC * UNUSED idesc = abuf->idesc;
3310 int cycles = 0;
3312 int referenced = 0;
3313 int UNUSED insn_referenced = abuf->written;
3314 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3316 return cycles;
3317 #undef FLD
3320 static int
3321 model_crisv10_bound_r_b_r (SIM_CPU *current_cpu, void *sem_arg)
3323 #define FLD(f) abuf->fields.sfmt_muls_b.f
3324 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3325 const IDESC * UNUSED idesc = abuf->idesc;
3326 int cycles = 0;
3328 int referenced = 0;
3329 int UNUSED insn_referenced = abuf->written;
3330 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3332 return cycles;
3333 #undef FLD
3336 static int
3337 model_crisv10_bound_r_w_r (SIM_CPU *current_cpu, void *sem_arg)
3339 #define FLD(f) abuf->fields.sfmt_muls_b.f
3340 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3341 const IDESC * UNUSED idesc = abuf->idesc;
3342 int cycles = 0;
3344 int referenced = 0;
3345 int UNUSED insn_referenced = abuf->written;
3346 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3348 return cycles;
3349 #undef FLD
3352 static int
3353 model_crisv10_bound_r_d_r (SIM_CPU *current_cpu, void *sem_arg)
3355 #define FLD(f) abuf->fields.sfmt_muls_b.f
3356 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3357 const IDESC * UNUSED idesc = abuf->idesc;
3358 int cycles = 0;
3360 int referenced = 0;
3361 int UNUSED insn_referenced = abuf->written;
3362 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3364 return cycles;
3365 #undef FLD
3368 static int
3369 model_crisv10_bound_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
3371 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
3372 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3373 const IDESC * UNUSED idesc = abuf->idesc;
3374 int cycles = 0;
3376 int referenced = 0;
3377 int UNUSED insn_referenced = abuf->written;
3378 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3381 int referenced = 0;
3382 int UNUSED insn_referenced = abuf->written;
3383 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3385 return cycles;
3386 #undef FLD
3389 static int
3390 model_crisv10_bound_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
3392 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
3393 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3394 const IDESC * UNUSED idesc = abuf->idesc;
3395 int cycles = 0;
3397 int referenced = 0;
3398 int UNUSED insn_referenced = abuf->written;
3399 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3402 int referenced = 0;
3403 int UNUSED insn_referenced = abuf->written;
3404 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3406 return cycles;
3407 #undef FLD
3410 static int
3411 model_crisv10_bound_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
3413 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
3414 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3415 const IDESC * UNUSED idesc = abuf->idesc;
3416 int cycles = 0;
3418 int referenced = 0;
3419 int UNUSED insn_referenced = abuf->written;
3420 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3423 int referenced = 0;
3424 int UNUSED insn_referenced = abuf->written;
3425 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3427 return cycles;
3428 #undef FLD
3431 static int
3432 model_crisv10_bound_cb (SIM_CPU *current_cpu, void *sem_arg)
3434 #define FLD(f) abuf->fields.sfmt_bound_cb.f
3435 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3436 const IDESC * UNUSED idesc = abuf->idesc;
3437 int cycles = 0;
3439 int referenced = 0;
3440 int UNUSED insn_referenced = abuf->written;
3441 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
3444 int referenced = 0;
3445 int UNUSED insn_referenced = abuf->written;
3446 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3448 return cycles;
3449 #undef FLD
3452 static int
3453 model_crisv10_bound_cw (SIM_CPU *current_cpu, void *sem_arg)
3455 #define FLD(f) abuf->fields.sfmt_bound_cw.f
3456 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3457 const IDESC * UNUSED idesc = abuf->idesc;
3458 int cycles = 0;
3460 int referenced = 0;
3461 int UNUSED insn_referenced = abuf->written;
3462 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
3465 int referenced = 0;
3466 int UNUSED insn_referenced = abuf->written;
3467 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3469 return cycles;
3470 #undef FLD
3473 static int
3474 model_crisv10_bound_cd (SIM_CPU *current_cpu, void *sem_arg)
3476 #define FLD(f) abuf->fields.sfmt_bound_cd.f
3477 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3478 const IDESC * UNUSED idesc = abuf->idesc;
3479 int cycles = 0;
3481 int referenced = 0;
3482 int UNUSED insn_referenced = abuf->written;
3483 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
3486 int referenced = 0;
3487 int UNUSED insn_referenced = abuf->written;
3488 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3490 return cycles;
3491 #undef FLD
3494 static int
3495 model_crisv10_scc (SIM_CPU *current_cpu, void *sem_arg)
3497 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
3498 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3499 const IDESC * UNUSED idesc = abuf->idesc;
3500 int cycles = 0;
3502 int referenced = 0;
3503 int UNUSED insn_referenced = abuf->written;
3504 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3506 return cycles;
3507 #undef FLD
3510 static int
3511 model_crisv10_lz (SIM_CPU *current_cpu, void *sem_arg)
3513 #define FLD(f) abuf->fields.sfmt_muls_b.f
3514 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3515 const IDESC * UNUSED idesc = abuf->idesc;
3516 int cycles = 0;
3518 int referenced = 0;
3519 int UNUSED insn_referenced = abuf->written;
3520 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3522 return cycles;
3523 #undef FLD
3526 static int
3527 model_crisv10_addoq (SIM_CPU *current_cpu, void *sem_arg)
3529 #define FLD(f) abuf->fields.sfmt_addoq.f
3530 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3531 const IDESC * UNUSED idesc = abuf->idesc;
3532 int cycles = 0;
3534 int referenced = 0;
3535 int UNUSED insn_referenced = abuf->written;
3536 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3538 return cycles;
3539 #undef FLD
3542 static int
3543 model_crisv10_bdapqpc (SIM_CPU *current_cpu, void *sem_arg)
3545 #define FLD(f) abuf->fields.sfmt_addoq.f
3546 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3547 const IDESC * UNUSED idesc = abuf->idesc;
3548 int cycles = 0;
3550 int referenced = 0;
3551 int UNUSED insn_referenced = abuf->written;
3552 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3554 return cycles;
3555 #undef FLD
3558 static int
3559 model_crisv10_bdap_32_pc (SIM_CPU *current_cpu, void *sem_arg)
3561 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3562 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3563 const IDESC * UNUSED idesc = abuf->idesc;
3564 int cycles = 0;
3566 int referenced = 0;
3567 int UNUSED insn_referenced = abuf->written;
3568 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
3571 int referenced = 0;
3572 int UNUSED insn_referenced = abuf->written;
3573 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3575 return cycles;
3576 #undef FLD
3579 static int
3580 model_crisv10_move_m_pcplus_p0 (SIM_CPU *current_cpu, void *sem_arg)
3582 #define FLD(f) abuf->fields.sfmt_move_m_spplus_p8.f
3583 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3584 const IDESC * UNUSED idesc = abuf->idesc;
3585 int cycles = 0;
3587 int referenced = 0;
3588 int UNUSED insn_referenced = abuf->written;
3589 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3592 int referenced = 0;
3593 int UNUSED insn_referenced = abuf->written;
3594 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3596 return cycles;
3597 #undef FLD
3600 static int
3601 model_crisv10_move_m_spplus_p8 (SIM_CPU *current_cpu, void *sem_arg)
3603 #define FLD(f) abuf->fields.sfmt_move_m_spplus_p8.f
3604 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3605 const IDESC * UNUSED idesc = abuf->idesc;
3606 int cycles = 0;
3608 int referenced = 0;
3609 int UNUSED insn_referenced = abuf->written;
3610 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3613 int referenced = 0;
3614 int UNUSED insn_referenced = abuf->written;
3615 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3617 return cycles;
3618 #undef FLD
3621 static int
3622 model_crisv10_addo_m_b_m (SIM_CPU *current_cpu, void *sem_arg)
3624 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
3625 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3626 const IDESC * UNUSED idesc = abuf->idesc;
3627 int cycles = 0;
3629 int referenced = 0;
3630 int UNUSED insn_referenced = abuf->written;
3631 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3634 int referenced = 0;
3635 int UNUSED insn_referenced = abuf->written;
3636 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3638 return cycles;
3639 #undef FLD
3642 static int
3643 model_crisv10_addo_m_w_m (SIM_CPU *current_cpu, void *sem_arg)
3645 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
3646 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3647 const IDESC * UNUSED idesc = abuf->idesc;
3648 int cycles = 0;
3650 int referenced = 0;
3651 int UNUSED insn_referenced = abuf->written;
3652 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3655 int referenced = 0;
3656 int UNUSED insn_referenced = abuf->written;
3657 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3659 return cycles;
3660 #undef FLD
3663 static int
3664 model_crisv10_addo_m_d_m (SIM_CPU *current_cpu, void *sem_arg)
3666 #define FLD(f) abuf->fields.sfmt_bound_m_b_m.f
3667 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3668 const IDESC * UNUSED idesc = abuf->idesc;
3669 int cycles = 0;
3671 int referenced = 0;
3672 int UNUSED insn_referenced = abuf->written;
3673 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3676 int referenced = 0;
3677 int UNUSED insn_referenced = abuf->written;
3678 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3680 return cycles;
3681 #undef FLD
3684 static int
3685 model_crisv10_addo_cb (SIM_CPU *current_cpu, void *sem_arg)
3687 #define FLD(f) abuf->fields.sfmt_bound_cb.f
3688 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3689 const IDESC * UNUSED idesc = abuf->idesc;
3690 int cycles = 0;
3692 int referenced = 0;
3693 int UNUSED insn_referenced = abuf->written;
3694 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
3697 int referenced = 0;
3698 int UNUSED insn_referenced = abuf->written;
3699 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3701 return cycles;
3702 #undef FLD
3705 static int
3706 model_crisv10_addo_cw (SIM_CPU *current_cpu, void *sem_arg)
3708 #define FLD(f) abuf->fields.sfmt_bound_cw.f
3709 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3710 const IDESC * UNUSED idesc = abuf->idesc;
3711 int cycles = 0;
3713 int referenced = 0;
3714 int UNUSED insn_referenced = abuf->written;
3715 cycles += crisv10f_model_crisv10_u_const16 (current_cpu, idesc, 0, referenced);
3718 int referenced = 0;
3719 int UNUSED insn_referenced = abuf->written;
3720 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3722 return cycles;
3723 #undef FLD
3726 static int
3727 model_crisv10_addo_cd (SIM_CPU *current_cpu, void *sem_arg)
3729 #define FLD(f) abuf->fields.sfmt_bound_cd.f
3730 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3731 const IDESC * UNUSED idesc = abuf->idesc;
3732 int cycles = 0;
3734 int referenced = 0;
3735 int UNUSED insn_referenced = abuf->written;
3736 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
3739 int referenced = 0;
3740 int UNUSED insn_referenced = abuf->written;
3741 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3743 return cycles;
3744 #undef FLD
3747 static int
3748 model_crisv10_dip_m (SIM_CPU *current_cpu, void *sem_arg)
3750 #define FLD(f) abuf->fields.sfmt_move_spr_mv10.f
3751 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3752 const IDESC * UNUSED idesc = abuf->idesc;
3753 int cycles = 0;
3755 int referenced = 0;
3756 int UNUSED insn_referenced = abuf->written;
3757 cycles += crisv10f_model_crisv10_u_mem (current_cpu, idesc, 0, referenced);
3760 int referenced = 0;
3761 int UNUSED insn_referenced = abuf->written;
3762 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3764 return cycles;
3765 #undef FLD
3768 static int
3769 model_crisv10_dip_c (SIM_CPU *current_cpu, void *sem_arg)
3771 #define FLD(f) abuf->fields.sfmt_move_c_sprv10_p9.f
3772 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3773 const IDESC * UNUSED idesc = abuf->idesc;
3774 int cycles = 0;
3776 int referenced = 0;
3777 int UNUSED insn_referenced = abuf->written;
3778 cycles += crisv10f_model_crisv10_u_const32 (current_cpu, idesc, 0, referenced);
3781 int referenced = 0;
3782 int UNUSED insn_referenced = abuf->written;
3783 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 1, referenced);
3785 return cycles;
3786 #undef FLD
3789 static int
3790 model_crisv10_addi_acr_b_r (SIM_CPU *current_cpu, void *sem_arg)
3792 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3793 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3794 const IDESC * UNUSED idesc = abuf->idesc;
3795 int cycles = 0;
3797 int referenced = 0;
3798 int UNUSED insn_referenced = abuf->written;
3799 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3801 return cycles;
3802 #undef FLD
3805 static int
3806 model_crisv10_addi_acr_w_r (SIM_CPU *current_cpu, void *sem_arg)
3808 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3809 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3810 const IDESC * UNUSED idesc = abuf->idesc;
3811 int cycles = 0;
3813 int referenced = 0;
3814 int UNUSED insn_referenced = abuf->written;
3815 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3817 return cycles;
3818 #undef FLD
3821 static int
3822 model_crisv10_addi_acr_d_r (SIM_CPU *current_cpu, void *sem_arg)
3824 #define FLD(f) abuf->fields.sfmt_add_b_r.f
3825 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3826 const IDESC * UNUSED idesc = abuf->idesc;
3827 int cycles = 0;
3829 int referenced = 0;
3830 int UNUSED insn_referenced = abuf->written;
3831 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3833 return cycles;
3834 #undef FLD
3837 static int
3838 model_crisv10_biap_pc_b_r (SIM_CPU *current_cpu, void *sem_arg)
3840 #define FLD(f) abuf->fields.sfmt_addoq.f
3841 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3842 const IDESC * UNUSED idesc = abuf->idesc;
3843 int cycles = 0;
3845 int referenced = 0;
3846 int UNUSED insn_referenced = abuf->written;
3847 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3849 return cycles;
3850 #undef FLD
3853 static int
3854 model_crisv10_biap_pc_w_r (SIM_CPU *current_cpu, void *sem_arg)
3856 #define FLD(f) abuf->fields.sfmt_addoq.f
3857 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3858 const IDESC * UNUSED idesc = abuf->idesc;
3859 int cycles = 0;
3861 int referenced = 0;
3862 int UNUSED insn_referenced = abuf->written;
3863 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3865 return cycles;
3866 #undef FLD
3869 static int
3870 model_crisv10_biap_pc_d_r (SIM_CPU *current_cpu, void *sem_arg)
3872 #define FLD(f) abuf->fields.sfmt_addoq.f
3873 const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
3874 const IDESC * UNUSED idesc = abuf->idesc;
3875 int cycles = 0;
3877 int referenced = 0;
3878 int UNUSED insn_referenced = abuf->written;
3879 cycles += crisv10f_model_crisv10_u_exec (current_cpu, idesc, 0, referenced);
3881 return cycles;
3882 #undef FLD
3885 /* We assume UNIT_NONE == 0 because the tables don't always terminate
3886 entries with it. */
3888 /* Model timing data for `crisv10'. */
3890 static const INSN_TIMING crisv10_timing[] = {
3891 { CRISV10F_INSN_X_INVALID, 0, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3892 { CRISV10F_INSN_X_AFTER, 0, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3893 { CRISV10F_INSN_X_BEFORE, 0, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3894 { CRISV10F_INSN_X_CTI_CHAIN, 0, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3895 { CRISV10F_INSN_X_CHAIN, 0, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3896 { CRISV10F_INSN_X_BEGIN, 0, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3897 { CRISV10F_INSN_NOP, model_crisv10_nop, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3898 { CRISV10F_INSN_MOVE_B_R, model_crisv10_move_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3899 { CRISV10F_INSN_MOVE_W_R, model_crisv10_move_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3900 { CRISV10F_INSN_MOVE_D_R, model_crisv10_move_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3901 { CRISV10F_INSN_MOVEPCR, model_crisv10_movepcr, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3902 { CRISV10F_INSN_MOVEQ, model_crisv10_moveq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3903 { CRISV10F_INSN_MOVS_B_R, model_crisv10_movs_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3904 { CRISV10F_INSN_MOVS_W_R, model_crisv10_movs_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3905 { CRISV10F_INSN_MOVU_B_R, model_crisv10_movu_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3906 { CRISV10F_INSN_MOVU_W_R, model_crisv10_movu_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3907 { CRISV10F_INSN_MOVECBR, model_crisv10_movecbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3908 { CRISV10F_INSN_MOVECWR, model_crisv10_movecwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3909 { CRISV10F_INSN_MOVECDR, model_crisv10_movecdr, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3910 { CRISV10F_INSN_MOVSCBR, model_crisv10_movscbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3911 { CRISV10F_INSN_MOVSCWR, model_crisv10_movscwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3912 { CRISV10F_INSN_MOVUCBR, model_crisv10_movucbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3913 { CRISV10F_INSN_MOVUCWR, model_crisv10_movucwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3914 { CRISV10F_INSN_ADDQ, model_crisv10_addq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3915 { CRISV10F_INSN_SUBQ, model_crisv10_subq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3916 { CRISV10F_INSN_CMP_R_B_R, model_crisv10_cmp_r_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3917 { CRISV10F_INSN_CMP_R_W_R, model_crisv10_cmp_r_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3918 { CRISV10F_INSN_CMP_R_D_R, model_crisv10_cmp_r_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3919 { CRISV10F_INSN_CMP_M_B_M, model_crisv10_cmp_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3920 { CRISV10F_INSN_CMP_M_W_M, model_crisv10_cmp_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3921 { CRISV10F_INSN_CMP_M_D_M, model_crisv10_cmp_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3922 { CRISV10F_INSN_CMPCBR, model_crisv10_cmpcbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3923 { CRISV10F_INSN_CMPCWR, model_crisv10_cmpcwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3924 { CRISV10F_INSN_CMPCDR, model_crisv10_cmpcdr, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3925 { CRISV10F_INSN_CMPQ, model_crisv10_cmpq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3926 { CRISV10F_INSN_CMPS_M_B_M, model_crisv10_cmps_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3927 { CRISV10F_INSN_CMPS_M_W_M, model_crisv10_cmps_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3928 { CRISV10F_INSN_CMPSCBR, model_crisv10_cmpscbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3929 { CRISV10F_INSN_CMPSCWR, model_crisv10_cmpscwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3930 { CRISV10F_INSN_CMPU_M_B_M, model_crisv10_cmpu_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3931 { CRISV10F_INSN_CMPU_M_W_M, model_crisv10_cmpu_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3932 { CRISV10F_INSN_CMPUCBR, model_crisv10_cmpucbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3933 { CRISV10F_INSN_CMPUCWR, model_crisv10_cmpucwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3934 { CRISV10F_INSN_MOVE_M_B_M, model_crisv10_move_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3935 { CRISV10F_INSN_MOVE_M_W_M, model_crisv10_move_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3936 { CRISV10F_INSN_MOVE_M_D_M, model_crisv10_move_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3937 { CRISV10F_INSN_MOVS_M_B_M, model_crisv10_movs_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3938 { CRISV10F_INSN_MOVS_M_W_M, model_crisv10_movs_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3939 { CRISV10F_INSN_MOVU_M_B_M, model_crisv10_movu_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3940 { CRISV10F_INSN_MOVU_M_W_M, model_crisv10_movu_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3941 { CRISV10F_INSN_MOVE_R_SPRV10, model_crisv10_move_r_sprv10, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3942 { CRISV10F_INSN_MOVE_SPR_RV10, model_crisv10_move_spr_rv10, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3943 { CRISV10F_INSN_RET_TYPE, model_crisv10_ret_type, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3944 { CRISV10F_INSN_MOVE_M_SPRV10, model_crisv10_move_m_sprv10, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3945 { CRISV10F_INSN_MOVE_C_SPRV10_P5, model_crisv10_move_c_sprv10_p5, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3946 { CRISV10F_INSN_MOVE_C_SPRV10_P9, model_crisv10_move_c_sprv10_p9, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3947 { CRISV10F_INSN_MOVE_C_SPRV10_P10, model_crisv10_move_c_sprv10_p10, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3948 { CRISV10F_INSN_MOVE_C_SPRV10_P11, model_crisv10_move_c_sprv10_p11, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3949 { CRISV10F_INSN_MOVE_C_SPRV10_P12, model_crisv10_move_c_sprv10_p12, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3950 { CRISV10F_INSN_MOVE_C_SPRV10_P13, model_crisv10_move_c_sprv10_p13, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3951 { CRISV10F_INSN_MOVE_C_SPRV10_P7, model_crisv10_move_c_sprv10_p7, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3952 { CRISV10F_INSN_MOVE_C_SPRV10_P14, model_crisv10_move_c_sprv10_p14, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3953 { CRISV10F_INSN_MOVE_C_SPRV10_P15, model_crisv10_move_c_sprv10_p15, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3954 { CRISV10F_INSN_MOVE_SPR_MV10, model_crisv10_move_spr_mv10, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3955 { CRISV10F_INSN_SBFS, model_crisv10_sbfs, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3956 { CRISV10F_INSN_MOVEM_R_M, model_crisv10_movem_r_m, { { (int) UNIT_CRISV10_U_MOVEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3957 { CRISV10F_INSN_MOVEM_M_R, model_crisv10_movem_m_r, { { (int) UNIT_CRISV10_U_MOVEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3958 { CRISV10F_INSN_MOVEM_M_PC, model_crisv10_movem_m_pc, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3959 { CRISV10F_INSN_ADD_B_R, model_crisv10_add_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3960 { CRISV10F_INSN_ADD_W_R, model_crisv10_add_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3961 { CRISV10F_INSN_ADD_D_R, model_crisv10_add_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3962 { CRISV10F_INSN_ADD_M_B_M, model_crisv10_add_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3963 { CRISV10F_INSN_ADD_M_W_M, model_crisv10_add_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3964 { CRISV10F_INSN_ADD_M_D_M, model_crisv10_add_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3965 { CRISV10F_INSN_ADDCBR, model_crisv10_addcbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3966 { CRISV10F_INSN_ADDCWR, model_crisv10_addcwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3967 { CRISV10F_INSN_ADDCDR, model_crisv10_addcdr, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3968 { CRISV10F_INSN_ADDCPC, model_crisv10_addcpc, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_STALL, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3969 { CRISV10F_INSN_ADDS_B_R, model_crisv10_adds_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3970 { CRISV10F_INSN_ADDS_W_R, model_crisv10_adds_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3971 { CRISV10F_INSN_ADDS_M_B_M, model_crisv10_adds_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3972 { CRISV10F_INSN_ADDS_M_W_M, model_crisv10_adds_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3973 { CRISV10F_INSN_ADDSCBR, model_crisv10_addscbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3974 { CRISV10F_INSN_ADDSCWR, model_crisv10_addscwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3975 { CRISV10F_INSN_ADDSPCPC, model_crisv10_addspcpc, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_STALL, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3976 { CRISV10F_INSN_ADDU_B_R, model_crisv10_addu_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3977 { CRISV10F_INSN_ADDU_W_R, model_crisv10_addu_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3978 { CRISV10F_INSN_ADDU_M_B_M, model_crisv10_addu_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3979 { CRISV10F_INSN_ADDU_M_W_M, model_crisv10_addu_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3980 { CRISV10F_INSN_ADDUCBR, model_crisv10_adducbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3981 { CRISV10F_INSN_ADDUCWR, model_crisv10_adducwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3982 { CRISV10F_INSN_SUB_B_R, model_crisv10_sub_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3983 { CRISV10F_INSN_SUB_W_R, model_crisv10_sub_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3984 { CRISV10F_INSN_SUB_D_R, model_crisv10_sub_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3985 { CRISV10F_INSN_SUB_M_B_M, model_crisv10_sub_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3986 { CRISV10F_INSN_SUB_M_W_M, model_crisv10_sub_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3987 { CRISV10F_INSN_SUB_M_D_M, model_crisv10_sub_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3988 { CRISV10F_INSN_SUBCBR, model_crisv10_subcbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3989 { CRISV10F_INSN_SUBCWR, model_crisv10_subcwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3990 { CRISV10F_INSN_SUBCDR, model_crisv10_subcdr, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3991 { CRISV10F_INSN_SUBS_B_R, model_crisv10_subs_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3992 { CRISV10F_INSN_SUBS_W_R, model_crisv10_subs_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3993 { CRISV10F_INSN_SUBS_M_B_M, model_crisv10_subs_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3994 { CRISV10F_INSN_SUBS_M_W_M, model_crisv10_subs_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3995 { CRISV10F_INSN_SUBSCBR, model_crisv10_subscbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3996 { CRISV10F_INSN_SUBSCWR, model_crisv10_subscwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3997 { CRISV10F_INSN_SUBU_B_R, model_crisv10_subu_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3998 { CRISV10F_INSN_SUBU_W_R, model_crisv10_subu_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
3999 { CRISV10F_INSN_SUBU_M_B_M, model_crisv10_subu_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4000 { CRISV10F_INSN_SUBU_M_W_M, model_crisv10_subu_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4001 { CRISV10F_INSN_SUBUCBR, model_crisv10_subucbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4002 { CRISV10F_INSN_SUBUCWR, model_crisv10_subucwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4003 { CRISV10F_INSN_ADDI_B_R, model_crisv10_addi_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4004 { CRISV10F_INSN_ADDI_W_R, model_crisv10_addi_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4005 { CRISV10F_INSN_ADDI_D_R, model_crisv10_addi_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4006 { CRISV10F_INSN_NEG_B_R, model_crisv10_neg_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4007 { CRISV10F_INSN_NEG_W_R, model_crisv10_neg_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4008 { CRISV10F_INSN_NEG_D_R, model_crisv10_neg_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4009 { CRISV10F_INSN_TEST_M_B_M, model_crisv10_test_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4010 { CRISV10F_INSN_TEST_M_W_M, model_crisv10_test_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4011 { CRISV10F_INSN_TEST_M_D_M, model_crisv10_test_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4012 { CRISV10F_INSN_MOVE_R_M_B_M, model_crisv10_move_r_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4013 { CRISV10F_INSN_MOVE_R_M_W_M, model_crisv10_move_r_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4014 { CRISV10F_INSN_MOVE_R_M_D_M, model_crisv10_move_r_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4015 { CRISV10F_INSN_MULS_B, model_crisv10_muls_b, { { (int) UNIT_CRISV10_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4016 { CRISV10F_INSN_MULS_W, model_crisv10_muls_w, { { (int) UNIT_CRISV10_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4017 { CRISV10F_INSN_MULS_D, model_crisv10_muls_d, { { (int) UNIT_CRISV10_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4018 { CRISV10F_INSN_MULU_B, model_crisv10_mulu_b, { { (int) UNIT_CRISV10_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4019 { CRISV10F_INSN_MULU_W, model_crisv10_mulu_w, { { (int) UNIT_CRISV10_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4020 { CRISV10F_INSN_MULU_D, model_crisv10_mulu_d, { { (int) UNIT_CRISV10_U_MULTIPLY, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4021 { CRISV10F_INSN_MSTEP, model_crisv10_mstep, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4022 { CRISV10F_INSN_DSTEP, model_crisv10_dstep, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4023 { CRISV10F_INSN_ABS, model_crisv10_abs, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4024 { CRISV10F_INSN_AND_B_R, model_crisv10_and_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4025 { CRISV10F_INSN_AND_W_R, model_crisv10_and_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4026 { CRISV10F_INSN_AND_D_R, model_crisv10_and_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4027 { CRISV10F_INSN_AND_M_B_M, model_crisv10_and_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4028 { CRISV10F_INSN_AND_M_W_M, model_crisv10_and_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4029 { CRISV10F_INSN_AND_M_D_M, model_crisv10_and_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4030 { CRISV10F_INSN_ANDCBR, model_crisv10_andcbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4031 { CRISV10F_INSN_ANDCWR, model_crisv10_andcwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4032 { CRISV10F_INSN_ANDCDR, model_crisv10_andcdr, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4033 { CRISV10F_INSN_ANDQ, model_crisv10_andq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4034 { CRISV10F_INSN_ORR_B_R, model_crisv10_orr_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4035 { CRISV10F_INSN_ORR_W_R, model_crisv10_orr_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4036 { CRISV10F_INSN_ORR_D_R, model_crisv10_orr_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4037 { CRISV10F_INSN_OR_M_B_M, model_crisv10_or_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4038 { CRISV10F_INSN_OR_M_W_M, model_crisv10_or_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4039 { CRISV10F_INSN_OR_M_D_M, model_crisv10_or_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4040 { CRISV10F_INSN_ORCBR, model_crisv10_orcbr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4041 { CRISV10F_INSN_ORCWR, model_crisv10_orcwr, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4042 { CRISV10F_INSN_ORCDR, model_crisv10_orcdr, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4043 { CRISV10F_INSN_ORQ, model_crisv10_orq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4044 { CRISV10F_INSN_XOR, model_crisv10_xor, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4045 { CRISV10F_INSN_SWAP, model_crisv10_swap, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4046 { CRISV10F_INSN_ASRR_B_R, model_crisv10_asrr_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4047 { CRISV10F_INSN_ASRR_W_R, model_crisv10_asrr_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4048 { CRISV10F_INSN_ASRR_D_R, model_crisv10_asrr_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4049 { CRISV10F_INSN_ASRQ, model_crisv10_asrq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4050 { CRISV10F_INSN_LSRR_B_R, model_crisv10_lsrr_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4051 { CRISV10F_INSN_LSRR_W_R, model_crisv10_lsrr_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4052 { CRISV10F_INSN_LSRR_D_R, model_crisv10_lsrr_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4053 { CRISV10F_INSN_LSRQ, model_crisv10_lsrq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4054 { CRISV10F_INSN_LSLR_B_R, model_crisv10_lslr_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4055 { CRISV10F_INSN_LSLR_W_R, model_crisv10_lslr_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4056 { CRISV10F_INSN_LSLR_D_R, model_crisv10_lslr_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4057 { CRISV10F_INSN_LSLQ, model_crisv10_lslq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4058 { CRISV10F_INSN_BTST, model_crisv10_btst, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4059 { CRISV10F_INSN_BTSTQ, model_crisv10_btstq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4060 { CRISV10F_INSN_SETF, model_crisv10_setf, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4061 { CRISV10F_INSN_CLEARF, model_crisv10_clearf, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4062 { CRISV10F_INSN_BCC_B, model_crisv10_bcc_b, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4063 { CRISV10F_INSN_BA_B, model_crisv10_ba_b, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4064 { CRISV10F_INSN_BCC_W, model_crisv10_bcc_w, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4065 { CRISV10F_INSN_BA_W, model_crisv10_ba_w, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4066 { CRISV10F_INSN_JUMP_R, model_crisv10_jump_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4067 { CRISV10F_INSN_JUMP_M, model_crisv10_jump_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4068 { CRISV10F_INSN_JUMP_C, model_crisv10_jump_c, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4069 { CRISV10F_INSN_BREAK, model_crisv10_break, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4070 { CRISV10F_INSN_BOUND_R_B_R, model_crisv10_bound_r_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4071 { CRISV10F_INSN_BOUND_R_W_R, model_crisv10_bound_r_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4072 { CRISV10F_INSN_BOUND_R_D_R, model_crisv10_bound_r_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4073 { CRISV10F_INSN_BOUND_M_B_M, model_crisv10_bound_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4074 { CRISV10F_INSN_BOUND_M_W_M, model_crisv10_bound_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4075 { CRISV10F_INSN_BOUND_M_D_M, model_crisv10_bound_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4076 { CRISV10F_INSN_BOUND_CB, model_crisv10_bound_cb, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4077 { CRISV10F_INSN_BOUND_CW, model_crisv10_bound_cw, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4078 { CRISV10F_INSN_BOUND_CD, model_crisv10_bound_cd, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4079 { CRISV10F_INSN_SCC, model_crisv10_scc, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4080 { CRISV10F_INSN_LZ, model_crisv10_lz, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4081 { CRISV10F_INSN_ADDOQ, model_crisv10_addoq, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4082 { CRISV10F_INSN_BDAPQPC, model_crisv10_bdapqpc, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4083 { CRISV10F_INSN_BDAP_32_PC, model_crisv10_bdap_32_pc, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4084 { CRISV10F_INSN_MOVE_M_PCPLUS_P0, model_crisv10_move_m_pcplus_p0, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4085 { CRISV10F_INSN_MOVE_M_SPPLUS_P8, model_crisv10_move_m_spplus_p8, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4086 { CRISV10F_INSN_ADDO_M_B_M, model_crisv10_addo_m_b_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4087 { CRISV10F_INSN_ADDO_M_W_M, model_crisv10_addo_m_w_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4088 { CRISV10F_INSN_ADDO_M_D_M, model_crisv10_addo_m_d_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4089 { CRISV10F_INSN_ADDO_CB, model_crisv10_addo_cb, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4090 { CRISV10F_INSN_ADDO_CW, model_crisv10_addo_cw, { { (int) UNIT_CRISV10_U_CONST16, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4091 { CRISV10F_INSN_ADDO_CD, model_crisv10_addo_cd, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4092 { CRISV10F_INSN_DIP_M, model_crisv10_dip_m, { { (int) UNIT_CRISV10_U_MEM, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4093 { CRISV10F_INSN_DIP_C, model_crisv10_dip_c, { { (int) UNIT_CRISV10_U_CONST32, 1, 1 }, { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4094 { CRISV10F_INSN_ADDI_ACR_B_R, model_crisv10_addi_acr_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4095 { CRISV10F_INSN_ADDI_ACR_W_R, model_crisv10_addi_acr_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4096 { CRISV10F_INSN_ADDI_ACR_D_R, model_crisv10_addi_acr_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4097 { CRISV10F_INSN_BIAP_PC_B_R, model_crisv10_biap_pc_b_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4098 { CRISV10F_INSN_BIAP_PC_W_R, model_crisv10_biap_pc_w_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4099 { CRISV10F_INSN_BIAP_PC_D_R, model_crisv10_biap_pc_d_r, { { (int) UNIT_CRISV10_U_EXEC, 1, 1 } } },
4102 #endif /* WITH_PROFILE_MODEL_P */
4104 static void
4105 crisv10_model_init (SIM_CPU *cpu)
4107 CPU_MODEL_DATA (cpu) = (void *) zalloc (sizeof (MODEL_CRISV10_DATA));
4110 #if WITH_PROFILE_MODEL_P
4111 #define TIMING_DATA(td) td
4112 #else
4113 #define TIMING_DATA(td) 0
4114 #endif
4116 static const SIM_MODEL crisv10_models[] =
4118 { "crisv10", & crisv10_mach, MODEL_CRISV10, TIMING_DATA (& crisv10_timing[0]), crisv10_model_init },
4119 { 0 }
4122 /* The properties of this cpu's implementation. */
4124 static const SIM_MACH_IMP_PROPERTIES crisv10f_imp_properties =
4126 sizeof (SIM_CPU),
4127 #if WITH_SCACHE
4128 sizeof (SCACHE)
4129 #else
4131 #endif
4135 static void
4136 crisv10f_prepare_run (SIM_CPU *cpu)
4138 if (CPU_IDESC (cpu) == NULL)
4139 crisv10f_init_idesc_table (cpu);
4142 static const CGEN_INSN *
4143 crisv10f_get_idata (SIM_CPU *cpu, int inum)
4145 return CPU_IDESC (cpu) [inum].idata;
4148 static void
4149 crisv10_init_cpu (SIM_CPU *cpu)
4151 CPU_REG_FETCH (cpu) = crisv10f_fetch_register;
4152 CPU_REG_STORE (cpu) = crisv10f_store_register;
4153 CPU_PC_FETCH (cpu) = crisv10f_h_pc_get;
4154 CPU_PC_STORE (cpu) = crisv10f_h_pc_set;
4155 CPU_GET_IDATA (cpu) = crisv10f_get_idata;
4156 CPU_MAX_INSNS (cpu) = CRISV10F_INSN__MAX;
4157 CPU_INSN_NAME (cpu) = cgen_insn_name;
4158 CPU_FULL_ENGINE_FN (cpu) = crisv10f_engine_run_full;
4159 #if WITH_FAST
4160 CPU_FAST_ENGINE_FN (cpu) = crisv10f_engine_run_fast;
4161 #else
4162 CPU_FAST_ENGINE_FN (cpu) = crisv10f_engine_run_full;
4163 #endif
4166 const SIM_MACH crisv10_mach =
4168 "crisv10", "cris", MACH_CRISV10,
4169 32, 32, & crisv10_models[0], & crisv10f_imp_properties,
4170 crisv10_init_cpu,
4171 crisv10f_prepare_run