1 /* Simulator instruction semantics for fr30bf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
7 This file is part of the GNU Simulators.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #define WANT_CPU fr30bf
26 #define WANT_CPU_FR30BF
33 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
35 /* This is used so that we can compile two copies of the semantic code,
36 one with full feature support and one without that runs fast(er).
37 FAST_P, when desired, is defined on the command line, -DFAST_P=1. */
39 #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
41 #define TRACE_RESULT(cpu, abuf, name, type, val)
43 #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
46 /* x-invalid: --invalid-- */
49 SEM_FN_NAME (fr30bf
,x_invalid
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
51 #define FLD(f) abuf->fields.fmt_empty.f
52 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
53 int UNUSED written
= 0;
54 IADDR UNUSED pc
= abuf
->addr
;
55 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
58 /* Update the recorded pc in the cpu state struct.
59 Only necessary for WITH_SCACHE case, but to avoid the
60 conditional compilation .... */
62 /* Virtual insns have zero size. Overwrite vpc with address of next insn
63 using the default-insn-bitsize spec. When executing insns in parallel
64 we may want to queue the fault and continue execution. */
65 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
66 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
73 /* x-after: --after-- */
76 SEM_FN_NAME (fr30bf
,x_after
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
78 #define FLD(f) abuf->fields.fmt_empty.f
79 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
80 int UNUSED written
= 0;
81 IADDR UNUSED pc
= abuf
->addr
;
82 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
85 #if WITH_SCACHE_PBB_FR30BF
86 fr30bf_pbb_after (current_cpu
, sem_arg
);
94 /* x-before: --before-- */
97 SEM_FN_NAME (fr30bf
,x_before
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
99 #define FLD(f) abuf->fields.fmt_empty.f
100 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
101 int UNUSED written
= 0;
102 IADDR UNUSED pc
= abuf
->addr
;
103 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
106 #if WITH_SCACHE_PBB_FR30BF
107 fr30bf_pbb_before (current_cpu
, sem_arg
);
115 /* x-cti-chain: --cti-chain-- */
118 SEM_FN_NAME (fr30bf
,x_cti_chain
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
120 #define FLD(f) abuf->fields.fmt_empty.f
121 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
122 int UNUSED written
= 0;
123 IADDR UNUSED pc
= abuf
->addr
;
124 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
127 #if WITH_SCACHE_PBB_FR30BF
129 vpc
= fr30bf_pbb_cti_chain (current_cpu
, sem_arg
,
130 pbb_br_type
, pbb_br_npc
);
133 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
134 vpc
= fr30bf_pbb_cti_chain (current_cpu
, sem_arg
,
135 CPU_PBB_BR_TYPE (current_cpu
),
136 CPU_PBB_BR_NPC (current_cpu
));
145 /* x-chain: --chain-- */
148 SEM_FN_NAME (fr30bf
,x_chain
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
150 #define FLD(f) abuf->fields.fmt_empty.f
151 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
152 int UNUSED written
= 0;
153 IADDR UNUSED pc
= abuf
->addr
;
154 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
157 #if WITH_SCACHE_PBB_FR30BF
158 vpc
= fr30bf_pbb_chain (current_cpu
, sem_arg
);
169 /* x-begin: --begin-- */
172 SEM_FN_NAME (fr30bf
,x_begin
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
174 #define FLD(f) abuf->fields.fmt_empty.f
175 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
176 int UNUSED written
= 0;
177 IADDR UNUSED pc
= abuf
->addr
;
178 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
181 #if WITH_SCACHE_PBB_FR30BF
183 /* In the switch case FAST_P is a constant, allowing several optimizations
184 in any called inline functions. */
185 vpc
= fr30bf_pbb_begin (current_cpu
, FAST_P
);
187 vpc
= fr30bf_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
196 /* add: add $Rj,$Ri */
199 SEM_FN_NAME (fr30bf
,add
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
201 #define FLD(f) abuf->fields.sfmt_add.f
202 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
203 int UNUSED written
= 0;
204 IADDR UNUSED pc
= abuf
->addr
;
205 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
209 BI opval
= ADDOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
210 CPU (h_vbit
) = opval
;
211 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
214 BI opval
= ADDCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
215 CPU (h_cbit
) = opval
;
216 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
219 SI opval
= ADDSI (* FLD (i_Ri
), * FLD (i_Rj
));
220 * FLD (i_Ri
) = opval
;
221 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
225 BI opval
= EQSI (* FLD (i_Ri
), 0);
226 CPU (h_zbit
) = opval
;
227 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
230 BI opval
= LTSI (* FLD (i_Ri
), 0);
231 CPU (h_nbit
) = opval
;
232 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
241 /* addi: add $u4,$Ri */
244 SEM_FN_NAME (fr30bf
,addi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
246 #define FLD(f) abuf->fields.sfmt_addi.f
247 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
248 int UNUSED written
= 0;
249 IADDR UNUSED pc
= abuf
->addr
;
250 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
254 BI opval
= ADDOFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
255 CPU (h_vbit
) = opval
;
256 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
259 BI opval
= ADDCFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
260 CPU (h_cbit
) = opval
;
261 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
264 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_u4
));
265 * FLD (i_Ri
) = opval
;
266 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
270 BI opval
= EQSI (* FLD (i_Ri
), 0);
271 CPU (h_zbit
) = opval
;
272 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
275 BI opval
= LTSI (* FLD (i_Ri
), 0);
276 CPU (h_nbit
) = opval
;
277 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
286 /* add2: add2 $m4,$Ri */
289 SEM_FN_NAME (fr30bf
,add2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
291 #define FLD(f) abuf->fields.sfmt_add2.f
292 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
293 int UNUSED written
= 0;
294 IADDR UNUSED pc
= abuf
->addr
;
295 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
299 BI opval
= ADDOFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
300 CPU (h_vbit
) = opval
;
301 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
304 BI opval
= ADDCFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
305 CPU (h_cbit
) = opval
;
306 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
309 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_m4
));
310 * FLD (i_Ri
) = opval
;
311 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
315 BI opval
= EQSI (* FLD (i_Ri
), 0);
316 CPU (h_zbit
) = opval
;
317 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
320 BI opval
= LTSI (* FLD (i_Ri
), 0);
321 CPU (h_nbit
) = opval
;
322 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
331 /* addc: addc $Rj,$Ri */
334 SEM_FN_NAME (fr30bf
,addc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
336 #define FLD(f) abuf->fields.sfmt_add.f
337 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
338 int UNUSED written
= 0;
339 IADDR UNUSED pc
= abuf
->addr
;
340 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
344 tmp_tmp
= ADDCSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
346 BI opval
= ADDOFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
347 CPU (h_vbit
) = opval
;
348 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
351 BI opval
= ADDCFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
352 CPU (h_cbit
) = opval
;
353 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
357 * FLD (i_Ri
) = opval
;
358 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
362 BI opval
= EQSI (* FLD (i_Ri
), 0);
363 CPU (h_zbit
) = opval
;
364 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
367 BI opval
= LTSI (* FLD (i_Ri
), 0);
368 CPU (h_nbit
) = opval
;
369 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
378 /* addn: addn $Rj,$Ri */
381 SEM_FN_NAME (fr30bf
,addn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
383 #define FLD(f) abuf->fields.sfmt_add.f
384 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
385 int UNUSED written
= 0;
386 IADDR UNUSED pc
= abuf
->addr
;
387 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
390 SI opval
= ADDSI (* FLD (i_Ri
), * FLD (i_Rj
));
391 * FLD (i_Ri
) = opval
;
392 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
399 /* addni: addn $u4,$Ri */
402 SEM_FN_NAME (fr30bf
,addni
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
404 #define FLD(f) abuf->fields.sfmt_addi.f
405 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
406 int UNUSED written
= 0;
407 IADDR UNUSED pc
= abuf
->addr
;
408 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
411 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_u4
));
412 * FLD (i_Ri
) = opval
;
413 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
420 /* addn2: addn2 $m4,$Ri */
423 SEM_FN_NAME (fr30bf
,addn2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
425 #define FLD(f) abuf->fields.sfmt_add2.f
426 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
427 int UNUSED written
= 0;
428 IADDR UNUSED pc
= abuf
->addr
;
429 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
432 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_m4
));
433 * FLD (i_Ri
) = opval
;
434 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
441 /* sub: sub $Rj,$Ri */
444 SEM_FN_NAME (fr30bf
,sub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
446 #define FLD(f) abuf->fields.sfmt_add.f
447 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
448 int UNUSED written
= 0;
449 IADDR UNUSED pc
= abuf
->addr
;
450 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
454 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
455 CPU (h_vbit
) = opval
;
456 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
459 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
460 CPU (h_cbit
) = opval
;
461 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
464 SI opval
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
465 * FLD (i_Ri
) = opval
;
466 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
470 BI opval
= EQSI (* FLD (i_Ri
), 0);
471 CPU (h_zbit
) = opval
;
472 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
475 BI opval
= LTSI (* FLD (i_Ri
), 0);
476 CPU (h_nbit
) = opval
;
477 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
486 /* subc: subc $Rj,$Ri */
489 SEM_FN_NAME (fr30bf
,subc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
491 #define FLD(f) abuf->fields.sfmt_add.f
492 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
493 int UNUSED written
= 0;
494 IADDR UNUSED pc
= abuf
->addr
;
495 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
499 tmp_tmp
= SUBCSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
501 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
502 CPU (h_vbit
) = opval
;
503 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
506 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
507 CPU (h_cbit
) = opval
;
508 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
512 * FLD (i_Ri
) = opval
;
513 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
517 BI opval
= EQSI (* FLD (i_Ri
), 0);
518 CPU (h_zbit
) = opval
;
519 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
522 BI opval
= LTSI (* FLD (i_Ri
), 0);
523 CPU (h_nbit
) = opval
;
524 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
533 /* subn: subn $Rj,$Ri */
536 SEM_FN_NAME (fr30bf
,subn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
538 #define FLD(f) abuf->fields.sfmt_add.f
539 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
540 int UNUSED written
= 0;
541 IADDR UNUSED pc
= abuf
->addr
;
542 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
545 SI opval
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
546 * FLD (i_Ri
) = opval
;
547 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
554 /* cmp: cmp $Rj,$Ri */
557 SEM_FN_NAME (fr30bf
,cmp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
559 #define FLD(f) abuf->fields.sfmt_str13.f
560 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
561 int UNUSED written
= 0;
562 IADDR UNUSED pc
= abuf
->addr
;
563 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
568 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
569 CPU (h_vbit
) = opval
;
570 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
573 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
574 CPU (h_cbit
) = opval
;
575 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
577 tmp_tmp1
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
580 BI opval
= EQSI (tmp_tmp1
, 0);
581 CPU (h_zbit
) = opval
;
582 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
585 BI opval
= LTSI (tmp_tmp1
, 0);
586 CPU (h_nbit
) = opval
;
587 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
596 /* cmpi: cmp $u4,$Ri */
599 SEM_FN_NAME (fr30bf
,cmpi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
601 #define FLD(f) abuf->fields.sfmt_addi.f
602 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
603 int UNUSED written
= 0;
604 IADDR UNUSED pc
= abuf
->addr
;
605 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
610 BI opval
= SUBOFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
611 CPU (h_vbit
) = opval
;
612 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
615 BI opval
= SUBCFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
616 CPU (h_cbit
) = opval
;
617 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
619 tmp_tmp1
= SUBSI (* FLD (i_Ri
), FLD (f_u4
));
622 BI opval
= EQSI (tmp_tmp1
, 0);
623 CPU (h_zbit
) = opval
;
624 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
627 BI opval
= LTSI (tmp_tmp1
, 0);
628 CPU (h_nbit
) = opval
;
629 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
638 /* cmp2: cmp2 $m4,$Ri */
641 SEM_FN_NAME (fr30bf
,cmp2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
643 #define FLD(f) abuf->fields.sfmt_add2.f
644 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
645 int UNUSED written
= 0;
646 IADDR UNUSED pc
= abuf
->addr
;
647 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
652 BI opval
= SUBOFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
653 CPU (h_vbit
) = opval
;
654 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
657 BI opval
= SUBCFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
658 CPU (h_cbit
) = opval
;
659 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
661 tmp_tmp1
= SUBSI (* FLD (i_Ri
), FLD (f_m4
));
664 BI opval
= EQSI (tmp_tmp1
, 0);
665 CPU (h_zbit
) = opval
;
666 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
669 BI opval
= LTSI (tmp_tmp1
, 0);
670 CPU (h_nbit
) = opval
;
671 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
680 /* and: and $Rj,$Ri */
683 SEM_FN_NAME (fr30bf
,and) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
685 #define FLD(f) abuf->fields.sfmt_add.f
686 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
687 int UNUSED written
= 0;
688 IADDR UNUSED pc
= abuf
->addr
;
689 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
693 SI opval
= ANDSI (* FLD (i_Ri
), * FLD (i_Rj
));
694 * FLD (i_Ri
) = opval
;
695 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
699 BI opval
= EQSI (* FLD (i_Ri
), 0);
700 CPU (h_zbit
) = opval
;
701 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
704 BI opval
= LTSI (* FLD (i_Ri
), 0);
705 CPU (h_nbit
) = opval
;
706 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
718 SEM_FN_NAME (fr30bf
,or) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
720 #define FLD(f) abuf->fields.sfmt_add.f
721 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
722 int UNUSED written
= 0;
723 IADDR UNUSED pc
= abuf
->addr
;
724 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
728 SI opval
= ORSI (* FLD (i_Ri
), * FLD (i_Rj
));
729 * FLD (i_Ri
) = opval
;
730 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
734 BI opval
= EQSI (* FLD (i_Ri
), 0);
735 CPU (h_zbit
) = opval
;
736 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
739 BI opval
= LTSI (* FLD (i_Ri
), 0);
740 CPU (h_nbit
) = opval
;
741 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
750 /* eor: eor $Rj,$Ri */
753 SEM_FN_NAME (fr30bf
,eor
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
755 #define FLD(f) abuf->fields.sfmt_add.f
756 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
757 int UNUSED written
= 0;
758 IADDR UNUSED pc
= abuf
->addr
;
759 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
763 SI opval
= XORSI (* FLD (i_Ri
), * FLD (i_Rj
));
764 * FLD (i_Ri
) = opval
;
765 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
769 BI opval
= EQSI (* FLD (i_Ri
), 0);
770 CPU (h_zbit
) = opval
;
771 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
774 BI opval
= LTSI (* FLD (i_Ri
), 0);
775 CPU (h_nbit
) = opval
;
776 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
785 /* andm: and $Rj,@$Ri */
788 SEM_FN_NAME (fr30bf
,andm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
790 #define FLD(f) abuf->fields.sfmt_str13.f
791 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
792 int UNUSED written
= 0;
793 IADDR UNUSED pc
= abuf
->addr
;
794 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
798 tmp_tmp
= ANDSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
801 BI opval
= EQSI (tmp_tmp
, 0);
802 CPU (h_zbit
) = opval
;
803 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
806 BI opval
= LTSI (tmp_tmp
, 0);
807 CPU (h_nbit
) = opval
;
808 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
813 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
814 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
822 /* andh: andh $Rj,@$Ri */
825 SEM_FN_NAME (fr30bf
,andh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
827 #define FLD(f) abuf->fields.sfmt_str13.f
828 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
829 int UNUSED written
= 0;
830 IADDR UNUSED pc
= abuf
->addr
;
831 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
835 tmp_tmp
= ANDHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
838 BI opval
= EQHI (tmp_tmp
, 0);
839 CPU (h_zbit
) = opval
;
840 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
843 BI opval
= LTHI (tmp_tmp
, 0);
844 CPU (h_nbit
) = opval
;
845 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
850 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
851 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
859 /* andb: andb $Rj,@$Ri */
862 SEM_FN_NAME (fr30bf
,andb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
864 #define FLD(f) abuf->fields.sfmt_str13.f
865 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
866 int UNUSED written
= 0;
867 IADDR UNUSED pc
= abuf
->addr
;
868 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
872 tmp_tmp
= ANDQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
875 BI opval
= EQQI (tmp_tmp
, 0);
876 CPU (h_zbit
) = opval
;
877 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
880 BI opval
= LTQI (tmp_tmp
, 0);
881 CPU (h_nbit
) = opval
;
882 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
887 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
888 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
896 /* orm: or $Rj,@$Ri */
899 SEM_FN_NAME (fr30bf
,orm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
901 #define FLD(f) abuf->fields.sfmt_str13.f
902 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
903 int UNUSED written
= 0;
904 IADDR UNUSED pc
= abuf
->addr
;
905 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
909 tmp_tmp
= ORSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
912 BI opval
= EQSI (tmp_tmp
, 0);
913 CPU (h_zbit
) = opval
;
914 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
917 BI opval
= LTSI (tmp_tmp
, 0);
918 CPU (h_nbit
) = opval
;
919 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
924 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
925 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
933 /* orh: orh $Rj,@$Ri */
936 SEM_FN_NAME (fr30bf
,orh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
938 #define FLD(f) abuf->fields.sfmt_str13.f
939 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
940 int UNUSED written
= 0;
941 IADDR UNUSED pc
= abuf
->addr
;
942 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
946 tmp_tmp
= ORHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
949 BI opval
= EQHI (tmp_tmp
, 0);
950 CPU (h_zbit
) = opval
;
951 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
954 BI opval
= LTHI (tmp_tmp
, 0);
955 CPU (h_nbit
) = opval
;
956 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
961 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
962 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
970 /* orb: orb $Rj,@$Ri */
973 SEM_FN_NAME (fr30bf
,orb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
975 #define FLD(f) abuf->fields.sfmt_str13.f
976 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
977 int UNUSED written
= 0;
978 IADDR UNUSED pc
= abuf
->addr
;
979 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
983 tmp_tmp
= ORQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
986 BI opval
= EQQI (tmp_tmp
, 0);
987 CPU (h_zbit
) = opval
;
988 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
991 BI opval
= LTQI (tmp_tmp
, 0);
992 CPU (h_nbit
) = opval
;
993 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
998 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
999 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1007 /* eorm: eor $Rj,@$Ri */
1010 SEM_FN_NAME (fr30bf
,eorm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1012 #define FLD(f) abuf->fields.sfmt_str13.f
1013 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1014 int UNUSED written
= 0;
1015 IADDR UNUSED pc
= abuf
->addr
;
1016 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1020 tmp_tmp
= XORSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1023 BI opval
= EQSI (tmp_tmp
, 0);
1024 CPU (h_zbit
) = opval
;
1025 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1028 BI opval
= LTSI (tmp_tmp
, 0);
1029 CPU (h_nbit
) = opval
;
1030 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1035 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1036 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1044 /* eorh: eorh $Rj,@$Ri */
1047 SEM_FN_NAME (fr30bf
,eorh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1049 #define FLD(f) abuf->fields.sfmt_str13.f
1050 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1051 int UNUSED written
= 0;
1052 IADDR UNUSED pc
= abuf
->addr
;
1053 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1057 tmp_tmp
= XORHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1060 BI opval
= EQHI (tmp_tmp
, 0);
1061 CPU (h_zbit
) = opval
;
1062 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1065 BI opval
= LTHI (tmp_tmp
, 0);
1066 CPU (h_nbit
) = opval
;
1067 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1072 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1073 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1081 /* eorb: eorb $Rj,@$Ri */
1084 SEM_FN_NAME (fr30bf
,eorb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1086 #define FLD(f) abuf->fields.sfmt_str13.f
1087 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1088 int UNUSED written
= 0;
1089 IADDR UNUSED pc
= abuf
->addr
;
1090 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1094 tmp_tmp
= XORQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1097 BI opval
= EQQI (tmp_tmp
, 0);
1098 CPU (h_zbit
) = opval
;
1099 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1102 BI opval
= LTQI (tmp_tmp
, 0);
1103 CPU (h_nbit
) = opval
;
1104 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1109 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1110 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1118 /* bandl: bandl $u4,@$Ri */
1121 SEM_FN_NAME (fr30bf
,bandl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1123 #define FLD(f) abuf->fields.sfmt_addi.f
1124 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1125 int UNUSED written
= 0;
1126 IADDR UNUSED pc
= abuf
->addr
;
1127 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1130 QI opval
= ANDQI (ORQI (FLD (f_u4
), 240), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1131 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1132 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1139 /* borl: borl $u4,@$Ri */
1142 SEM_FN_NAME (fr30bf
,borl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1144 #define FLD(f) abuf->fields.sfmt_addi.f
1145 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1146 int UNUSED written
= 0;
1147 IADDR UNUSED pc
= abuf
->addr
;
1148 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1151 QI opval
= ORQI (FLD (f_u4
), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1152 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1153 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1160 /* beorl: beorl $u4,@$Ri */
1163 SEM_FN_NAME (fr30bf
,beorl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1165 #define FLD(f) abuf->fields.sfmt_addi.f
1166 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1167 int UNUSED written
= 0;
1168 IADDR UNUSED pc
= abuf
->addr
;
1169 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1172 QI opval
= XORQI (FLD (f_u4
), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1173 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1174 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1181 /* bandh: bandh $u4,@$Ri */
1184 SEM_FN_NAME (fr30bf
,bandh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1186 #define FLD(f) abuf->fields.sfmt_addi.f
1187 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1188 int UNUSED written
= 0;
1189 IADDR UNUSED pc
= abuf
->addr
;
1190 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1193 QI opval
= ANDQI (ORQI (SLLQI (FLD (f_u4
), 4), 15), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1194 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1195 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1202 /* borh: borh $u4,@$Ri */
1205 SEM_FN_NAME (fr30bf
,borh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1207 #define FLD(f) abuf->fields.sfmt_addi.f
1208 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1209 int UNUSED written
= 0;
1210 IADDR UNUSED pc
= abuf
->addr
;
1211 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1214 QI opval
= ORQI (SLLQI (FLD (f_u4
), 4), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1215 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1216 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1223 /* beorh: beorh $u4,@$Ri */
1226 SEM_FN_NAME (fr30bf
,beorh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1228 #define FLD(f) abuf->fields.sfmt_addi.f
1229 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1230 int UNUSED written
= 0;
1231 IADDR UNUSED pc
= abuf
->addr
;
1232 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1235 QI opval
= XORQI (SLLQI (FLD (f_u4
), 4), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1236 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1237 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1244 /* btstl: btstl $u4,@$Ri */
1247 SEM_FN_NAME (fr30bf
,btstl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1249 #define FLD(f) abuf->fields.sfmt_addi.f
1250 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1251 int UNUSED written
= 0;
1252 IADDR UNUSED pc
= abuf
->addr
;
1253 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1257 tmp_tmp
= ANDQI (FLD (f_u4
), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1259 BI opval
= EQQI (tmp_tmp
, 0);
1260 CPU (h_zbit
) = opval
;
1261 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1265 CPU (h_nbit
) = opval
;
1266 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1274 /* btsth: btsth $u4,@$Ri */
1277 SEM_FN_NAME (fr30bf
,btsth
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1279 #define FLD(f) abuf->fields.sfmt_addi.f
1280 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1281 int UNUSED written
= 0;
1282 IADDR UNUSED pc
= abuf
->addr
;
1283 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1287 tmp_tmp
= ANDQI (SLLQI (FLD (f_u4
), 4), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1289 BI opval
= EQQI (tmp_tmp
, 0);
1290 CPU (h_zbit
) = opval
;
1291 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1294 BI opval
= LTQI (tmp_tmp
, 0);
1295 CPU (h_nbit
) = opval
;
1296 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1304 /* mul: mul $Rj,$Ri */
1307 SEM_FN_NAME (fr30bf
,mul
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1309 #define FLD(f) abuf->fields.sfmt_str13.f
1310 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1311 int UNUSED written
= 0;
1312 IADDR UNUSED pc
= abuf
->addr
;
1313 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1317 tmp_tmp
= MULDI (EXTSIDI (* FLD (i_Rj
)), EXTSIDI (* FLD (i_Ri
)));
1319 SI opval
= TRUNCDISI (tmp_tmp
);
1320 SET_H_DR (((UINT
) 5), opval
);
1321 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1324 SI opval
= TRUNCDISI (SRLDI (tmp_tmp
, 32));
1325 SET_H_DR (((UINT
) 4), opval
);
1326 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1329 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1330 CPU (h_nbit
) = opval
;
1331 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1334 BI opval
= EQDI (tmp_tmp
, MAKEDI (0, 0));
1335 CPU (h_zbit
) = opval
;
1336 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1339 BI opval
= ORIF (GTDI (tmp_tmp
, MAKEDI (0, 2147483647)), LTDI (tmp_tmp
, NEGDI (MAKEDI (0, 0x80000000))));
1340 CPU (h_vbit
) = opval
;
1341 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1349 /* mulu: mulu $Rj,$Ri */
1352 SEM_FN_NAME (fr30bf
,mulu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1354 #define FLD(f) abuf->fields.sfmt_str13.f
1355 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1356 int UNUSED written
= 0;
1357 IADDR UNUSED pc
= abuf
->addr
;
1358 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1362 tmp_tmp
= MULDI (ZEXTSIDI (* FLD (i_Rj
)), ZEXTSIDI (* FLD (i_Ri
)));
1364 SI opval
= TRUNCDISI (tmp_tmp
);
1365 SET_H_DR (((UINT
) 5), opval
);
1366 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1369 SI opval
= TRUNCDISI (SRLDI (tmp_tmp
, 32));
1370 SET_H_DR (((UINT
) 4), opval
);
1371 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1374 BI opval
= LTSI (GET_H_DR (((UINT
) 4)), 0);
1375 CPU (h_nbit
) = opval
;
1376 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1379 BI opval
= EQSI (GET_H_DR (((UINT
) 5)), 0);
1380 CPU (h_zbit
) = opval
;
1381 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1384 BI opval
= NESI (GET_H_DR (((UINT
) 4)), 0);
1385 CPU (h_vbit
) = opval
;
1386 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1394 /* mulh: mulh $Rj,$Ri */
1397 SEM_FN_NAME (fr30bf
,mulh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1399 #define FLD(f) abuf->fields.sfmt_str13.f
1400 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1401 int UNUSED written
= 0;
1402 IADDR UNUSED pc
= abuf
->addr
;
1403 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1407 SI opval
= MULHI (TRUNCSIHI (* FLD (i_Rj
)), TRUNCSIHI (* FLD (i_Ri
)));
1408 SET_H_DR (((UINT
) 5), opval
);
1409 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1412 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1413 CPU (h_nbit
) = opval
;
1414 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1417 BI opval
= GESI (GET_H_DR (((UINT
) 5)), 0);
1418 CPU (h_zbit
) = opval
;
1419 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1427 /* muluh: muluh $Rj,$Ri */
1430 SEM_FN_NAME (fr30bf
,muluh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1432 #define FLD(f) abuf->fields.sfmt_str13.f
1433 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1434 int UNUSED written
= 0;
1435 IADDR UNUSED pc
= abuf
->addr
;
1436 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1440 SI opval
= MULSI (ANDSI (* FLD (i_Rj
), 65535), ANDSI (* FLD (i_Ri
), 65535));
1441 SET_H_DR (((UINT
) 5), opval
);
1442 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1445 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1446 CPU (h_nbit
) = opval
;
1447 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1450 BI opval
= GESI (GET_H_DR (((UINT
) 5)), 0);
1451 CPU (h_zbit
) = opval
;
1452 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1460 /* div0s: div0s $Ri */
1463 SEM_FN_NAME (fr30bf
,div0s
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1465 #define FLD(f) abuf->fields.sfmt_mov2dr.f
1466 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1467 int UNUSED written
= 0;
1468 IADDR UNUSED pc
= abuf
->addr
;
1469 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1473 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1474 CPU (h_d0bit
) = opval
;
1475 TRACE_RESULT (current_cpu
, abuf
, "d0bit", 'x', opval
);
1478 BI opval
= XORBI (CPU (h_d0bit
), LTSI (* FLD (i_Ri
), 0));
1479 CPU (h_d1bit
) = opval
;
1480 TRACE_RESULT (current_cpu
, abuf
, "d1bit", 'x', opval
);
1482 if (NEBI (CPU (h_d0bit
), 0)) {
1484 SI opval
= 0xffffffff;
1485 SET_H_DR (((UINT
) 4), opval
);
1486 written
|= (1 << 5);
1487 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1492 SET_H_DR (((UINT
) 4), opval
);
1493 written
|= (1 << 5);
1494 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1499 abuf
->written
= written
;
1504 /* div0u: div0u $Ri */
1507 SEM_FN_NAME (fr30bf
,div0u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1509 #define FLD(f) abuf->fields.fmt_empty.f
1510 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1511 int UNUSED written
= 0;
1512 IADDR UNUSED pc
= abuf
->addr
;
1513 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1518 CPU (h_d0bit
) = opval
;
1519 TRACE_RESULT (current_cpu
, abuf
, "d0bit", 'x', opval
);
1523 CPU (h_d1bit
) = opval
;
1524 TRACE_RESULT (current_cpu
, abuf
, "d1bit", 'x', opval
);
1528 SET_H_DR (((UINT
) 4), opval
);
1529 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1537 /* div1: div1 $Ri */
1540 SEM_FN_NAME (fr30bf
,div1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1542 #define FLD(f) abuf->fields.sfmt_mov2dr.f
1543 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1544 int UNUSED written
= 0;
1545 IADDR UNUSED pc
= abuf
->addr
;
1546 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1551 SI opval
= SLLSI (GET_H_DR (((UINT
) 4)), 1);
1552 SET_H_DR (((UINT
) 4), opval
);
1553 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1555 if (LTSI (GET_H_DR (((UINT
) 5)), 0)) {
1557 SI opval
= ADDSI (GET_H_DR (((UINT
) 4)), 1);
1558 SET_H_DR (((UINT
) 4), opval
);
1559 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1563 SI opval
= SLLSI (GET_H_DR (((UINT
) 5)), 1);
1564 SET_H_DR (((UINT
) 5), opval
);
1565 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1567 if (EQBI (CPU (h_d1bit
), 1)) {
1569 tmp_tmp
= ADDSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1571 BI opval
= ADDCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1572 CPU (h_cbit
) = opval
;
1573 written
|= (1 << 6);
1574 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1579 tmp_tmp
= SUBSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1581 BI opval
= SUBCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1582 CPU (h_cbit
) = opval
;
1583 written
|= (1 << 6);
1584 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1588 if (NOTBI (XORBI (XORBI (CPU (h_d0bit
), CPU (h_d1bit
)), CPU (h_cbit
)))) {
1592 SET_H_DR (((UINT
) 4), opval
);
1593 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1596 SI opval
= ORSI (GET_H_DR (((UINT
) 5)), 1);
1597 SET_H_DR (((UINT
) 5), opval
);
1598 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1603 BI opval
= EQSI (GET_H_DR (((UINT
) 4)), 0);
1604 CPU (h_zbit
) = opval
;
1605 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1609 abuf
->written
= written
;
1614 /* div2: div2 $Ri */
1617 SEM_FN_NAME (fr30bf
,div2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1619 #define FLD(f) abuf->fields.sfmt_mov2dr.f
1620 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1621 int UNUSED written
= 0;
1622 IADDR UNUSED pc
= abuf
->addr
;
1623 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1627 if (EQBI (CPU (h_d1bit
), 1)) {
1629 tmp_tmp
= ADDSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1631 BI opval
= ADDCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1632 CPU (h_cbit
) = opval
;
1633 written
|= (1 << 3);
1634 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1639 tmp_tmp
= SUBSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1641 BI opval
= SUBCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1642 CPU (h_cbit
) = opval
;
1643 written
|= (1 << 3);
1644 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1648 if (EQSI (tmp_tmp
, 0)) {
1652 CPU (h_zbit
) = opval
;
1653 written
|= (1 << 5);
1654 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1658 SET_H_DR (((UINT
) 4), opval
);
1659 written
|= (1 << 4);
1660 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1666 CPU (h_zbit
) = opval
;
1667 written
|= (1 << 5);
1668 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1673 abuf
->written
= written
;
1681 SEM_FN_NAME (fr30bf
,div3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1683 #define FLD(f) abuf->fields.fmt_empty.f
1684 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1685 int UNUSED written
= 0;
1686 IADDR UNUSED pc
= abuf
->addr
;
1687 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1689 if (EQBI (CPU (h_zbit
), 1)) {
1691 SI opval
= ADDSI (GET_H_DR (((UINT
) 5)), 1);
1692 SET_H_DR (((UINT
) 5), opval
);
1693 written
|= (1 << 2);
1694 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1698 abuf
->written
= written
;
1706 SEM_FN_NAME (fr30bf
,div4s
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1708 #define FLD(f) abuf->fields.fmt_empty.f
1709 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1710 int UNUSED written
= 0;
1711 IADDR UNUSED pc
= abuf
->addr
;
1712 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1714 if (EQBI (CPU (h_d1bit
), 1)) {
1716 SI opval
= NEGSI (GET_H_DR (((UINT
) 5)));
1717 SET_H_DR (((UINT
) 5), opval
);
1718 written
|= (1 << 2);
1719 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1723 abuf
->written
= written
;
1728 /* lsl: lsl $Rj,$Ri */
1731 SEM_FN_NAME (fr30bf
,lsl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1733 #define FLD(f) abuf->fields.sfmt_add.f
1734 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1735 int UNUSED written
= 0;
1736 IADDR UNUSED pc
= abuf
->addr
;
1737 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1741 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
1742 if (NESI (tmp_shift
, 0)) {
1745 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1746 CPU (h_cbit
) = opval
;
1747 written
|= (1 << 3);
1748 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1751 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1752 * FLD (i_Ri
) = opval
;
1753 written
|= (1 << 2);
1754 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1760 CPU (h_cbit
) = opval
;
1761 written
|= (1 << 3);
1762 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1766 BI opval
= LTSI (* FLD (i_Ri
), 0);
1767 CPU (h_nbit
) = opval
;
1768 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1771 BI opval
= EQSI (* FLD (i_Ri
), 0);
1772 CPU (h_zbit
) = opval
;
1773 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1777 abuf
->written
= written
;
1782 /* lsli: lsl $u4,$Ri */
1785 SEM_FN_NAME (fr30bf
,lsli
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1787 #define FLD(f) abuf->fields.sfmt_addi.f
1788 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1789 int UNUSED written
= 0;
1790 IADDR UNUSED pc
= abuf
->addr
;
1791 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1795 tmp_shift
= FLD (f_u4
);
1796 if (NESI (tmp_shift
, 0)) {
1799 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1800 CPU (h_cbit
) = opval
;
1801 written
|= (1 << 3);
1802 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1805 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1806 * FLD (i_Ri
) = opval
;
1807 written
|= (1 << 2);
1808 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1814 CPU (h_cbit
) = opval
;
1815 written
|= (1 << 3);
1816 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1820 BI opval
= LTSI (* FLD (i_Ri
), 0);
1821 CPU (h_nbit
) = opval
;
1822 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1825 BI opval
= EQSI (* FLD (i_Ri
), 0);
1826 CPU (h_zbit
) = opval
;
1827 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1831 abuf
->written
= written
;
1836 /* lsl2: lsl2 $u4,$Ri */
1839 SEM_FN_NAME (fr30bf
,lsl2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1841 #define FLD(f) abuf->fields.sfmt_addi.f
1842 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1843 int UNUSED written
= 0;
1844 IADDR UNUSED pc
= abuf
->addr
;
1845 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1849 tmp_shift
= ADDSI (FLD (f_u4
), 16);
1850 if (NESI (tmp_shift
, 0)) {
1853 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1854 CPU (h_cbit
) = opval
;
1855 written
|= (1 << 3);
1856 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1859 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1860 * FLD (i_Ri
) = opval
;
1861 written
|= (1 << 2);
1862 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1868 CPU (h_cbit
) = opval
;
1869 written
|= (1 << 3);
1870 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1874 BI opval
= LTSI (* FLD (i_Ri
), 0);
1875 CPU (h_nbit
) = opval
;
1876 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1879 BI opval
= EQSI (* FLD (i_Ri
), 0);
1880 CPU (h_zbit
) = opval
;
1881 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1885 abuf
->written
= written
;
1890 /* lsr: lsr $Rj,$Ri */
1893 SEM_FN_NAME (fr30bf
,lsr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1895 #define FLD(f) abuf->fields.sfmt_add.f
1896 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1897 int UNUSED written
= 0;
1898 IADDR UNUSED pc
= abuf
->addr
;
1899 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1903 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
1904 if (NESI (tmp_shift
, 0)) {
1907 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
1908 CPU (h_cbit
) = opval
;
1909 written
|= (1 << 3);
1910 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1913 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
1914 * FLD (i_Ri
) = opval
;
1915 written
|= (1 << 2);
1916 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1922 CPU (h_cbit
) = opval
;
1923 written
|= (1 << 3);
1924 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1928 BI opval
= LTSI (* FLD (i_Ri
), 0);
1929 CPU (h_nbit
) = opval
;
1930 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1933 BI opval
= EQSI (* FLD (i_Ri
), 0);
1934 CPU (h_zbit
) = opval
;
1935 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1939 abuf
->written
= written
;
1944 /* lsri: lsr $u4,$Ri */
1947 SEM_FN_NAME (fr30bf
,lsri
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1949 #define FLD(f) abuf->fields.sfmt_addi.f
1950 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1951 int UNUSED written
= 0;
1952 IADDR UNUSED pc
= abuf
->addr
;
1953 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1957 tmp_shift
= FLD (f_u4
);
1958 if (NESI (tmp_shift
, 0)) {
1961 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
1962 CPU (h_cbit
) = opval
;
1963 written
|= (1 << 3);
1964 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1967 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
1968 * FLD (i_Ri
) = opval
;
1969 written
|= (1 << 2);
1970 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1976 CPU (h_cbit
) = opval
;
1977 written
|= (1 << 3);
1978 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1982 BI opval
= LTSI (* FLD (i_Ri
), 0);
1983 CPU (h_nbit
) = opval
;
1984 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1987 BI opval
= EQSI (* FLD (i_Ri
), 0);
1988 CPU (h_zbit
) = opval
;
1989 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1993 abuf
->written
= written
;
1998 /* lsr2: lsr2 $u4,$Ri */
2001 SEM_FN_NAME (fr30bf
,lsr2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2003 #define FLD(f) abuf->fields.sfmt_addi.f
2004 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2005 int UNUSED written
= 0;
2006 IADDR UNUSED pc
= abuf
->addr
;
2007 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2011 tmp_shift
= ADDSI (FLD (f_u4
), 16);
2012 if (NESI (tmp_shift
, 0)) {
2015 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2016 CPU (h_cbit
) = opval
;
2017 written
|= (1 << 3);
2018 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2021 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
2022 * FLD (i_Ri
) = opval
;
2023 written
|= (1 << 2);
2024 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2030 CPU (h_cbit
) = opval
;
2031 written
|= (1 << 3);
2032 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2036 BI opval
= LTSI (* FLD (i_Ri
), 0);
2037 CPU (h_nbit
) = opval
;
2038 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2041 BI opval
= EQSI (* FLD (i_Ri
), 0);
2042 CPU (h_zbit
) = opval
;
2043 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2047 abuf
->written
= written
;
2052 /* asr: asr $Rj,$Ri */
2055 SEM_FN_NAME (fr30bf
,asr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2057 #define FLD(f) abuf->fields.sfmt_add.f
2058 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2059 int UNUSED written
= 0;
2060 IADDR UNUSED pc
= abuf
->addr
;
2061 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2065 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
2066 if (NESI (tmp_shift
, 0)) {
2069 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2070 CPU (h_cbit
) = opval
;
2071 written
|= (1 << 3);
2072 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2075 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2076 * FLD (i_Ri
) = opval
;
2077 written
|= (1 << 2);
2078 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2084 CPU (h_cbit
) = opval
;
2085 written
|= (1 << 3);
2086 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2090 BI opval
= LTSI (* FLD (i_Ri
), 0);
2091 CPU (h_nbit
) = opval
;
2092 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2095 BI opval
= EQSI (* FLD (i_Ri
), 0);
2096 CPU (h_zbit
) = opval
;
2097 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2101 abuf
->written
= written
;
2106 /* asri: asr $u4,$Ri */
2109 SEM_FN_NAME (fr30bf
,asri
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2111 #define FLD(f) abuf->fields.sfmt_addi.f
2112 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2113 int UNUSED written
= 0;
2114 IADDR UNUSED pc
= abuf
->addr
;
2115 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2119 tmp_shift
= FLD (f_u4
);
2120 if (NESI (tmp_shift
, 0)) {
2123 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2124 CPU (h_cbit
) = opval
;
2125 written
|= (1 << 3);
2126 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2129 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2130 * FLD (i_Ri
) = opval
;
2131 written
|= (1 << 2);
2132 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2138 CPU (h_cbit
) = opval
;
2139 written
|= (1 << 3);
2140 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2144 BI opval
= LTSI (* FLD (i_Ri
), 0);
2145 CPU (h_nbit
) = opval
;
2146 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2149 BI opval
= EQSI (* FLD (i_Ri
), 0);
2150 CPU (h_zbit
) = opval
;
2151 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2155 abuf
->written
= written
;
2160 /* asr2: asr2 $u4,$Ri */
2163 SEM_FN_NAME (fr30bf
,asr2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2165 #define FLD(f) abuf->fields.sfmt_addi.f
2166 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2167 int UNUSED written
= 0;
2168 IADDR UNUSED pc
= abuf
->addr
;
2169 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2173 tmp_shift
= ADDSI (FLD (f_u4
), 16);
2174 if (NESI (tmp_shift
, 0)) {
2177 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2178 CPU (h_cbit
) = opval
;
2179 written
|= (1 << 3);
2180 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2183 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2184 * FLD (i_Ri
) = opval
;
2185 written
|= (1 << 2);
2186 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2192 CPU (h_cbit
) = opval
;
2193 written
|= (1 << 3);
2194 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2198 BI opval
= LTSI (* FLD (i_Ri
), 0);
2199 CPU (h_nbit
) = opval
;
2200 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2203 BI opval
= EQSI (* FLD (i_Ri
), 0);
2204 CPU (h_zbit
) = opval
;
2205 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2209 abuf
->written
= written
;
2214 /* ldi8: ldi:8 $i8,$Ri */
2217 SEM_FN_NAME (fr30bf
,ldi8
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2219 #define FLD(f) abuf->fields.sfmt_ldi8.f
2220 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2221 int UNUSED written
= 0;
2222 IADDR UNUSED pc
= abuf
->addr
;
2223 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2226 SI opval
= FLD (f_i8
);
2227 * FLD (i_Ri
) = opval
;
2228 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2235 /* ldi20: ldi:20 $i20,$Ri */
2238 SEM_FN_NAME (fr30bf
,ldi20
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2240 #define FLD(f) abuf->fields.sfmt_ldi20.f
2241 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2242 int UNUSED written
= 0;
2243 IADDR UNUSED pc
= abuf
->addr
;
2244 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2247 SI opval
= FLD (f_i20
);
2248 * FLD (i_Ri
) = opval
;
2249 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2256 /* ldi32: ldi:32 $i32,$Ri */
2259 SEM_FN_NAME (fr30bf
,ldi32
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2261 #define FLD(f) abuf->fields.sfmt_ldi32.f
2262 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2263 int UNUSED written
= 0;
2264 IADDR UNUSED pc
= abuf
->addr
;
2265 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
2268 SI opval
= FLD (f_i32
);
2269 * FLD (i_Ri
) = opval
;
2270 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2277 /* ld: ld @$Rj,$Ri */
2280 SEM_FN_NAME (fr30bf
,ld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2282 #define FLD(f) abuf->fields.sfmt_ldr13.f
2283 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2284 int UNUSED written
= 0;
2285 IADDR UNUSED pc
= abuf
->addr
;
2286 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2289 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_Rj
));
2290 * FLD (i_Ri
) = opval
;
2291 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2298 /* lduh: lduh @$Rj,$Ri */
2301 SEM_FN_NAME (fr30bf
,lduh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2303 #define FLD(f) abuf->fields.sfmt_ldr13.f
2304 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2305 int UNUSED written
= 0;
2306 IADDR UNUSED pc
= abuf
->addr
;
2307 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2310 SI opval
= GETMEMUHI (current_cpu
, pc
, * FLD (i_Rj
));
2311 * FLD (i_Ri
) = opval
;
2312 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2319 /* ldub: ldub @$Rj,$Ri */
2322 SEM_FN_NAME (fr30bf
,ldub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2324 #define FLD(f) abuf->fields.sfmt_ldr13.f
2325 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2326 int UNUSED written
= 0;
2327 IADDR UNUSED pc
= abuf
->addr
;
2328 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2331 SI opval
= GETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
));
2332 * FLD (i_Ri
) = opval
;
2333 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2340 /* ldr13: ld @($R13,$Rj),$Ri */
2343 SEM_FN_NAME (fr30bf
,ldr13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2345 #define FLD(f) abuf->fields.sfmt_ldr13.f
2346 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2347 int UNUSED written
= 0;
2348 IADDR UNUSED pc
= abuf
->addr
;
2349 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2352 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2353 * FLD (i_Ri
) = opval
;
2354 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2361 /* ldr13uh: lduh @($R13,$Rj),$Ri */
2364 SEM_FN_NAME (fr30bf
,ldr13uh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2366 #define FLD(f) abuf->fields.sfmt_ldr13.f
2367 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2368 int UNUSED written
= 0;
2369 IADDR UNUSED pc
= abuf
->addr
;
2370 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2373 SI opval
= GETMEMUHI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2374 * FLD (i_Ri
) = opval
;
2375 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2382 /* ldr13ub: ldub @($R13,$Rj),$Ri */
2385 SEM_FN_NAME (fr30bf
,ldr13ub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2387 #define FLD(f) abuf->fields.sfmt_ldr13.f
2388 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2389 int UNUSED written
= 0;
2390 IADDR UNUSED pc
= abuf
->addr
;
2391 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2394 SI opval
= GETMEMUQI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2395 * FLD (i_Ri
) = opval
;
2396 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2403 /* ldr14: ld @($R14,$disp10),$Ri */
2406 SEM_FN_NAME (fr30bf
,ldr14
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2408 #define FLD(f) abuf->fields.sfmt_ldr14.f
2409 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2410 int UNUSED written
= 0;
2411 IADDR UNUSED pc
= abuf
->addr
;
2412 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2415 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_disp10
), CPU (h_gr
[((UINT
) 14)])));
2416 * FLD (i_Ri
) = opval
;
2417 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2424 /* ldr14uh: lduh @($R14,$disp9),$Ri */
2427 SEM_FN_NAME (fr30bf
,ldr14uh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2429 #define FLD(f) abuf->fields.sfmt_ldr14uh.f
2430 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2431 int UNUSED written
= 0;
2432 IADDR UNUSED pc
= abuf
->addr
;
2433 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2436 SI opval
= GETMEMUHI (current_cpu
, pc
, ADDSI (FLD (f_disp9
), CPU (h_gr
[((UINT
) 14)])));
2437 * FLD (i_Ri
) = opval
;
2438 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2445 /* ldr14ub: ldub @($R14,$disp8),$Ri */
2448 SEM_FN_NAME (fr30bf
,ldr14ub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2450 #define FLD(f) abuf->fields.sfmt_ldr14ub.f
2451 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2452 int UNUSED written
= 0;
2453 IADDR UNUSED pc
= abuf
->addr
;
2454 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2457 SI opval
= GETMEMUQI (current_cpu
, pc
, ADDSI (FLD (f_disp8
), CPU (h_gr
[((UINT
) 14)])));
2458 * FLD (i_Ri
) = opval
;
2459 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2466 /* ldr15: ld @($R15,$udisp6),$Ri */
2469 SEM_FN_NAME (fr30bf
,ldr15
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2471 #define FLD(f) abuf->fields.sfmt_ldr15.f
2472 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2473 int UNUSED written
= 0;
2474 IADDR UNUSED pc
= abuf
->addr
;
2475 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2478 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_udisp6
), CPU (h_gr
[((UINT
) 15)])));
2479 * FLD (i_Ri
) = opval
;
2480 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2487 /* ldr15gr: ld @$R15+,$Ri */
2490 SEM_FN_NAME (fr30bf
,ldr15gr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2492 #define FLD(f) abuf->fields.sfmt_ldr15gr.f
2493 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2494 int UNUSED written
= 0;
2495 IADDR UNUSED pc
= abuf
->addr
;
2496 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2500 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2501 * FLD (i_Ri
) = opval
;
2502 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2504 if (NESI (FLD (f_Ri
), 15)) {
2506 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2507 CPU (h_gr
[((UINT
) 15)]) = opval
;
2508 written
|= (1 << 4);
2509 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2514 abuf
->written
= written
;
2519 /* ldr15dr: ld @$R15+,$Rs2 */
2522 SEM_FN_NAME (fr30bf
,ldr15dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2524 #define FLD(f) abuf->fields.sfmt_ldr15dr.f
2525 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2526 int UNUSED written
= 0;
2527 IADDR UNUSED pc
= abuf
->addr
;
2528 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2532 tmp_tmp
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2534 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2535 CPU (h_gr
[((UINT
) 15)]) = opval
;
2536 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2540 SET_H_DR (FLD (f_Rs2
), opval
);
2541 TRACE_RESULT (current_cpu
, abuf
, "Rs2", 'x', opval
);
2549 /* ldr15ps: ld @$R15+,$ps */
2552 SEM_FN_NAME (fr30bf
,ldr15ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2554 #define FLD(f) abuf->fields.sfmt_addsp.f
2555 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2556 int UNUSED written
= 0;
2557 IADDR UNUSED pc
= abuf
->addr
;
2558 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2562 USI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2564 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
2567 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2568 CPU (h_gr
[((UINT
) 15)]) = opval
;
2569 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2577 /* st: st $Ri,@$Rj */
2580 SEM_FN_NAME (fr30bf
,st
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2582 #define FLD(f) abuf->fields.sfmt_str13.f
2583 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2584 int UNUSED written
= 0;
2585 IADDR UNUSED pc
= abuf
->addr
;
2586 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2589 SI opval
= * FLD (i_Ri
);
2590 SETMEMSI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2591 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2598 /* sth: sth $Ri,@$Rj */
2601 SEM_FN_NAME (fr30bf
,sth
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2603 #define FLD(f) abuf->fields.sfmt_str13.f
2604 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2605 int UNUSED written
= 0;
2606 IADDR UNUSED pc
= abuf
->addr
;
2607 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2610 HI opval
= * FLD (i_Ri
);
2611 SETMEMHI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2612 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2619 /* stb: stb $Ri,@$Rj */
2622 SEM_FN_NAME (fr30bf
,stb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2624 #define FLD(f) abuf->fields.sfmt_str13.f
2625 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2626 int UNUSED written
= 0;
2627 IADDR UNUSED pc
= abuf
->addr
;
2628 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2631 QI opval
= * FLD (i_Ri
);
2632 SETMEMQI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2633 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2640 /* str13: st $Ri,@($R13,$Rj) */
2643 SEM_FN_NAME (fr30bf
,str13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2645 #define FLD(f) abuf->fields.sfmt_str13.f
2646 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2647 int UNUSED written
= 0;
2648 IADDR UNUSED pc
= abuf
->addr
;
2649 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2652 SI opval
= * FLD (i_Ri
);
2653 SETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2654 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2661 /* str13h: sth $Ri,@($R13,$Rj) */
2664 SEM_FN_NAME (fr30bf
,str13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2666 #define FLD(f) abuf->fields.sfmt_str13.f
2667 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2668 int UNUSED written
= 0;
2669 IADDR UNUSED pc
= abuf
->addr
;
2670 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2673 HI opval
= * FLD (i_Ri
);
2674 SETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2675 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2682 /* str13b: stb $Ri,@($R13,$Rj) */
2685 SEM_FN_NAME (fr30bf
,str13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2687 #define FLD(f) abuf->fields.sfmt_str13.f
2688 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2689 int UNUSED written
= 0;
2690 IADDR UNUSED pc
= abuf
->addr
;
2691 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2694 QI opval
= * FLD (i_Ri
);
2695 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2696 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2703 /* str14: st $Ri,@($R14,$disp10) */
2706 SEM_FN_NAME (fr30bf
,str14
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2708 #define FLD(f) abuf->fields.sfmt_str14.f
2709 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2710 int UNUSED written
= 0;
2711 IADDR UNUSED pc
= abuf
->addr
;
2712 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2715 SI opval
= * FLD (i_Ri
);
2716 SETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_disp10
), CPU (h_gr
[((UINT
) 14)])), opval
);
2717 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2724 /* str14h: sth $Ri,@($R14,$disp9) */
2727 SEM_FN_NAME (fr30bf
,str14h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2729 #define FLD(f) abuf->fields.sfmt_str14h.f
2730 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2731 int UNUSED written
= 0;
2732 IADDR UNUSED pc
= abuf
->addr
;
2733 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2736 HI opval
= * FLD (i_Ri
);
2737 SETMEMHI (current_cpu
, pc
, ADDSI (FLD (f_disp9
), CPU (h_gr
[((UINT
) 14)])), opval
);
2738 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2745 /* str14b: stb $Ri,@($R14,$disp8) */
2748 SEM_FN_NAME (fr30bf
,str14b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2750 #define FLD(f) abuf->fields.sfmt_str14b.f
2751 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2752 int UNUSED written
= 0;
2753 IADDR UNUSED pc
= abuf
->addr
;
2754 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2757 QI opval
= * FLD (i_Ri
);
2758 SETMEMQI (current_cpu
, pc
, ADDSI (FLD (f_disp8
), CPU (h_gr
[((UINT
) 14)])), opval
);
2759 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2766 /* str15: st $Ri,@($R15,$udisp6) */
2769 SEM_FN_NAME (fr30bf
,str15
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2771 #define FLD(f) abuf->fields.sfmt_str15.f
2772 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2773 int UNUSED written
= 0;
2774 IADDR UNUSED pc
= abuf
->addr
;
2775 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2778 SI opval
= * FLD (i_Ri
);
2779 SETMEMSI (current_cpu
, pc
, ADDSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_udisp6
)), opval
);
2780 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2787 /* str15gr: st $Ri,@-$R15 */
2790 SEM_FN_NAME (fr30bf
,str15gr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2792 #define FLD(f) abuf->fields.sfmt_str15gr.f
2793 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2794 int UNUSED written
= 0;
2795 IADDR UNUSED pc
= abuf
->addr
;
2796 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2800 tmp_tmp
= * FLD (i_Ri
);
2802 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2803 CPU (h_gr
[((UINT
) 15)]) = opval
;
2804 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2808 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2809 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2817 /* str15dr: st $Rs2,@-$R15 */
2820 SEM_FN_NAME (fr30bf
,str15dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2822 #define FLD(f) abuf->fields.sfmt_ldr15dr.f
2823 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2824 int UNUSED written
= 0;
2825 IADDR UNUSED pc
= abuf
->addr
;
2826 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2830 tmp_tmp
= GET_H_DR (FLD (f_Rs2
));
2832 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2833 CPU (h_gr
[((UINT
) 15)]) = opval
;
2834 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2838 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2839 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2847 /* str15ps: st $ps,@-$R15 */
2850 SEM_FN_NAME (fr30bf
,str15ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2852 #define FLD(f) abuf->fields.sfmt_addsp.f
2853 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2854 int UNUSED written
= 0;
2855 IADDR UNUSED pc
= abuf
->addr
;
2856 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2860 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2861 CPU (h_gr
[((UINT
) 15)]) = opval
;
2862 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2865 SI opval
= GET_H_PS ();
2866 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2867 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2875 /* mov: mov $Rj,$Ri */
2878 SEM_FN_NAME (fr30bf
,mov
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2880 #define FLD(f) abuf->fields.sfmt_ldr13.f
2881 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2882 int UNUSED written
= 0;
2883 IADDR UNUSED pc
= abuf
->addr
;
2884 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2887 SI opval
= * FLD (i_Rj
);
2888 * FLD (i_Ri
) = opval
;
2889 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2896 /* movdr: mov $Rs1,$Ri */
2899 SEM_FN_NAME (fr30bf
,movdr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2901 #define FLD(f) abuf->fields.sfmt_movdr.f
2902 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2903 int UNUSED written
= 0;
2904 IADDR UNUSED pc
= abuf
->addr
;
2905 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2908 SI opval
= GET_H_DR (FLD (f_Rs1
));
2909 * FLD (i_Ri
) = opval
;
2910 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2917 /* movps: mov $ps,$Ri */
2920 SEM_FN_NAME (fr30bf
,movps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2922 #define FLD(f) abuf->fields.sfmt_movdr.f
2923 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2924 int UNUSED written
= 0;
2925 IADDR UNUSED pc
= abuf
->addr
;
2926 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2929 SI opval
= GET_H_PS ();
2930 * FLD (i_Ri
) = opval
;
2931 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2938 /* mov2dr: mov $Ri,$Rs1 */
2941 SEM_FN_NAME (fr30bf
,mov2dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2943 #define FLD(f) abuf->fields.sfmt_mov2dr.f
2944 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2945 int UNUSED written
= 0;
2946 IADDR UNUSED pc
= abuf
->addr
;
2947 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2950 SI opval
= * FLD (i_Ri
);
2951 SET_H_DR (FLD (f_Rs1
), opval
);
2952 TRACE_RESULT (current_cpu
, abuf
, "Rs1", 'x', opval
);
2959 /* mov2ps: mov $Ri,$ps */
2962 SEM_FN_NAME (fr30bf
,mov2ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2964 #define FLD(f) abuf->fields.sfmt_mov2dr.f
2965 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2966 int UNUSED written
= 0;
2967 IADDR UNUSED pc
= abuf
->addr
;
2968 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2971 USI opval
= * FLD (i_Ri
);
2973 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
2983 SEM_FN_NAME (fr30bf
,jmp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2985 #define FLD(f) abuf->fields.sfmt_mov2dr.f
2986 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2987 int UNUSED written
= 0;
2988 IADDR UNUSED pc
= abuf
->addr
;
2990 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2993 USI opval
= * FLD (i_Ri
);
2994 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2995 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
2998 SEM_BRANCH_FINI (vpc
);
3003 /* jmpd: jmp:d @$Ri */
3006 SEM_FN_NAME (fr30bf
,jmpd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3008 #define FLD(f) abuf->fields.sfmt_mov2dr.f
3009 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3010 int UNUSED written
= 0;
3011 IADDR UNUSED pc
= abuf
->addr
;
3013 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3017 USI opval
= * FLD (i_Ri
);
3018 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3019 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3023 SEM_BRANCH_FINI (vpc
);
3028 /* callr: call @$Ri */
3031 SEM_FN_NAME (fr30bf
,callr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3033 #define FLD(f) abuf->fields.sfmt_mov2dr.f
3034 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3035 int UNUSED written
= 0;
3036 IADDR UNUSED pc
= abuf
->addr
;
3038 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3042 SI opval
= ADDSI (pc
, 2);
3043 SET_H_DR (((UINT
) 1), opval
);
3044 TRACE_RESULT (current_cpu
, abuf
, "dr-1", 'x', opval
);
3047 USI opval
= * FLD (i_Ri
);
3048 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3049 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3053 SEM_BRANCH_FINI (vpc
);
3058 /* callrd: call:d @$Ri */
3061 SEM_FN_NAME (fr30bf
,callrd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3063 #define FLD(f) abuf->fields.sfmt_mov2dr.f
3064 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3065 int UNUSED written
= 0;
3066 IADDR UNUSED pc
= abuf
->addr
;
3068 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3073 SI opval
= ADDSI (pc
, 4);
3074 SET_H_DR (((UINT
) 1), opval
);
3075 TRACE_RESULT (current_cpu
, abuf
, "dr-1", 'x', opval
);
3078 USI opval
= * FLD (i_Ri
);
3079 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3080 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3085 SEM_BRANCH_FINI (vpc
);
3090 /* call: call $label12 */
3093 SEM_FN_NAME (fr30bf
,call
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3095 #define FLD(f) abuf->fields.sfmt_call.f
3096 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3097 int UNUSED written
= 0;
3098 IADDR UNUSED pc
= abuf
->addr
;
3100 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3104 SI opval
= ADDSI (pc
, 2);
3105 SET_H_DR (((UINT
) 1), opval
);
3106 TRACE_RESULT (current_cpu
, abuf
, "dr-1", 'x', opval
);
3109 USI opval
= FLD (i_label12
);
3110 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3111 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3115 SEM_BRANCH_FINI (vpc
);
3120 /* calld: call:d $label12 */
3123 SEM_FN_NAME (fr30bf
,calld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3125 #define FLD(f) abuf->fields.sfmt_call.f
3126 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3127 int UNUSED written
= 0;
3128 IADDR UNUSED pc
= abuf
->addr
;
3130 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3135 SI opval
= ADDSI (pc
, 4);
3136 SET_H_DR (((UINT
) 1), opval
);
3137 TRACE_RESULT (current_cpu
, abuf
, "dr-1", 'x', opval
);
3140 USI opval
= FLD (i_label12
);
3141 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3142 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3147 SEM_BRANCH_FINI (vpc
);
3155 SEM_FN_NAME (fr30bf
,ret
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3157 #define FLD(f) abuf->fields.fmt_empty.f
3158 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3159 int UNUSED written
= 0;
3160 IADDR UNUSED pc
= abuf
->addr
;
3162 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3165 USI opval
= GET_H_DR (((UINT
) 1));
3166 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3167 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3170 SEM_BRANCH_FINI (vpc
);
3178 SEM_FN_NAME (fr30bf
,ret_d
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3180 #define FLD(f) abuf->fields.fmt_empty.f
3181 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3182 int UNUSED written
= 0;
3183 IADDR UNUSED pc
= abuf
->addr
;
3185 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3189 USI opval
= GET_H_DR (((UINT
) 1));
3190 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3191 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3195 SEM_BRANCH_FINI (vpc
);
3203 SEM_FN_NAME (fr30bf
,int) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3205 #define FLD(f) abuf->fields.sfmt_int.f
3206 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3207 int UNUSED written
= 0;
3208 IADDR UNUSED pc
= abuf
->addr
;
3210 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3217 SI opval
= fr30_int (current_cpu
, pc
, FLD (f_u8
));
3218 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3219 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3223 SEM_BRANCH_FINI (vpc
);
3231 SEM_FN_NAME (fr30bf
,inte
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3233 #define FLD(f) abuf->fields.fmt_empty.f
3234 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3235 int UNUSED written
= 0;
3236 IADDR UNUSED pc
= abuf
->addr
;
3238 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3245 SI opval
= fr30_inte (current_cpu
, pc
);
3246 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3247 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3251 SEM_BRANCH_FINI (vpc
);
3259 SEM_FN_NAME (fr30bf
,reti
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3261 #define FLD(f) abuf->fields.fmt_empty.f
3262 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3263 int UNUSED written
= 0;
3264 IADDR UNUSED pc
= abuf
->addr
;
3266 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3268 if (EQBI (GET_H_SBIT (), 0)) {
3271 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 2)));
3272 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3273 written
|= (1 << 7);
3274 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3277 SI opval
= ADDSI (GET_H_DR (((UINT
) 2)), 4);
3278 SET_H_DR (((UINT
) 2), opval
);
3279 written
|= (1 << 5);
3280 TRACE_RESULT (current_cpu
, abuf
, "dr-2", 'x', opval
);
3283 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 2)));
3285 written
|= (1 << 8);
3286 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
3289 SI opval
= ADDSI (GET_H_DR (((UINT
) 2)), 4);
3290 SET_H_DR (((UINT
) 2), opval
);
3291 written
|= (1 << 5);
3292 TRACE_RESULT (current_cpu
, abuf
, "dr-2", 'x', opval
);
3298 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 3)));
3299 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3300 written
|= (1 << 7);
3301 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3304 SI opval
= ADDSI (GET_H_DR (((UINT
) 3)), 4);
3305 SET_H_DR (((UINT
) 3), opval
);
3306 written
|= (1 << 6);
3307 TRACE_RESULT (current_cpu
, abuf
, "dr-3", 'x', opval
);
3310 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 3)));
3312 written
|= (1 << 8);
3313 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
3316 SI opval
= ADDSI (GET_H_DR (((UINT
) 3)), 4);
3317 SET_H_DR (((UINT
) 3), opval
);
3318 written
|= (1 << 6);
3319 TRACE_RESULT (current_cpu
, abuf
, "dr-3", 'x', opval
);
3324 abuf
->written
= written
;
3325 SEM_BRANCH_FINI (vpc
);
3330 /* brad: bra:d $label9 */
3333 SEM_FN_NAME (fr30bf
,brad
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3335 #define FLD(f) abuf->fields.sfmt_brad.f
3336 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3337 int UNUSED written
= 0;
3338 IADDR UNUSED pc
= abuf
->addr
;
3340 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3344 USI opval
= FLD (i_label9
);
3345 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3346 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3350 SEM_BRANCH_FINI (vpc
);
3355 /* bra: bra $label9 */
3358 SEM_FN_NAME (fr30bf
,bra
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3360 #define FLD(f) abuf->fields.sfmt_brad.f
3361 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3362 int UNUSED written
= 0;
3363 IADDR UNUSED pc
= abuf
->addr
;
3365 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3368 USI opval
= FLD (i_label9
);
3369 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3370 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3373 SEM_BRANCH_FINI (vpc
);
3378 /* bnod: bno:d $label9 */
3381 SEM_FN_NAME (fr30bf
,bnod
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3383 #define FLD(f) abuf->fields.fmt_empty.f
3384 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3385 int UNUSED written
= 0;
3386 IADDR UNUSED pc
= abuf
->addr
;
3387 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3397 /* bno: bno $label9 */
3400 SEM_FN_NAME (fr30bf
,bno
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3402 #define FLD(f) abuf->fields.fmt_empty.f
3403 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3404 int UNUSED written
= 0;
3405 IADDR UNUSED pc
= abuf
->addr
;
3406 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3414 /* beqd: beq:d $label9 */
3417 SEM_FN_NAME (fr30bf
,beqd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3419 #define FLD(f) abuf->fields.sfmt_brad.f
3420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3421 int UNUSED written
= 0;
3422 IADDR UNUSED pc
= abuf
->addr
;
3424 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3429 USI opval
= FLD (i_label9
);
3430 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3431 written
|= (1 << 2);
3432 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3437 abuf
->written
= written
;
3438 SEM_BRANCH_FINI (vpc
);
3443 /* beq: beq $label9 */
3446 SEM_FN_NAME (fr30bf
,beq
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3448 #define FLD(f) abuf->fields.sfmt_brad.f
3449 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3450 int UNUSED written
= 0;
3451 IADDR UNUSED pc
= abuf
->addr
;
3453 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3457 USI opval
= FLD (i_label9
);
3458 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3459 written
|= (1 << 2);
3460 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3464 abuf
->written
= written
;
3465 SEM_BRANCH_FINI (vpc
);
3470 /* bned: bne:d $label9 */
3473 SEM_FN_NAME (fr30bf
,bned
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3475 #define FLD(f) abuf->fields.sfmt_brad.f
3476 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3477 int UNUSED written
= 0;
3478 IADDR UNUSED pc
= abuf
->addr
;
3480 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3483 if (NOTBI (CPU (h_zbit
))) {
3485 USI opval
= FLD (i_label9
);
3486 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3487 written
|= (1 << 2);
3488 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3493 abuf
->written
= written
;
3494 SEM_BRANCH_FINI (vpc
);
3499 /* bne: bne $label9 */
3502 SEM_FN_NAME (fr30bf
,bne
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3504 #define FLD(f) abuf->fields.sfmt_brad.f
3505 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3506 int UNUSED written
= 0;
3507 IADDR UNUSED pc
= abuf
->addr
;
3509 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3511 if (NOTBI (CPU (h_zbit
))) {
3513 USI opval
= FLD (i_label9
);
3514 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3515 written
|= (1 << 2);
3516 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3520 abuf
->written
= written
;
3521 SEM_BRANCH_FINI (vpc
);
3526 /* bcd: bc:d $label9 */
3529 SEM_FN_NAME (fr30bf
,bcd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3531 #define FLD(f) abuf->fields.sfmt_brad.f
3532 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3533 int UNUSED written
= 0;
3534 IADDR UNUSED pc
= abuf
->addr
;
3536 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3541 USI opval
= FLD (i_label9
);
3542 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3543 written
|= (1 << 2);
3544 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3549 abuf
->written
= written
;
3550 SEM_BRANCH_FINI (vpc
);
3555 /* bc: bc $label9 */
3558 SEM_FN_NAME (fr30bf
,bc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3560 #define FLD(f) abuf->fields.sfmt_brad.f
3561 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3562 int UNUSED written
= 0;
3563 IADDR UNUSED pc
= abuf
->addr
;
3565 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3569 USI opval
= FLD (i_label9
);
3570 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3571 written
|= (1 << 2);
3572 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3576 abuf
->written
= written
;
3577 SEM_BRANCH_FINI (vpc
);
3582 /* bncd: bnc:d $label9 */
3585 SEM_FN_NAME (fr30bf
,bncd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3587 #define FLD(f) abuf->fields.sfmt_brad.f
3588 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3589 int UNUSED written
= 0;
3590 IADDR UNUSED pc
= abuf
->addr
;
3592 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3595 if (NOTBI (CPU (h_cbit
))) {
3597 USI opval
= FLD (i_label9
);
3598 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3599 written
|= (1 << 2);
3600 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3605 abuf
->written
= written
;
3606 SEM_BRANCH_FINI (vpc
);
3611 /* bnc: bnc $label9 */
3614 SEM_FN_NAME (fr30bf
,bnc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3616 #define FLD(f) abuf->fields.sfmt_brad.f
3617 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3618 int UNUSED written
= 0;
3619 IADDR UNUSED pc
= abuf
->addr
;
3621 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3623 if (NOTBI (CPU (h_cbit
))) {
3625 USI opval
= FLD (i_label9
);
3626 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3627 written
|= (1 << 2);
3628 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3632 abuf
->written
= written
;
3633 SEM_BRANCH_FINI (vpc
);
3638 /* bnd: bn:d $label9 */
3641 SEM_FN_NAME (fr30bf
,bnd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3643 #define FLD(f) abuf->fields.sfmt_brad.f
3644 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3645 int UNUSED written
= 0;
3646 IADDR UNUSED pc
= abuf
->addr
;
3648 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3653 USI opval
= FLD (i_label9
);
3654 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3655 written
|= (1 << 2);
3656 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3661 abuf
->written
= written
;
3662 SEM_BRANCH_FINI (vpc
);
3667 /* bn: bn $label9 */
3670 SEM_FN_NAME (fr30bf
,bn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3672 #define FLD(f) abuf->fields.sfmt_brad.f
3673 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3674 int UNUSED written
= 0;
3675 IADDR UNUSED pc
= abuf
->addr
;
3677 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3681 USI opval
= FLD (i_label9
);
3682 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3683 written
|= (1 << 2);
3684 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3688 abuf
->written
= written
;
3689 SEM_BRANCH_FINI (vpc
);
3694 /* bpd: bp:d $label9 */
3697 SEM_FN_NAME (fr30bf
,bpd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3699 #define FLD(f) abuf->fields.sfmt_brad.f
3700 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3701 int UNUSED written
= 0;
3702 IADDR UNUSED pc
= abuf
->addr
;
3704 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3707 if (NOTBI (CPU (h_nbit
))) {
3709 USI opval
= FLD (i_label9
);
3710 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3711 written
|= (1 << 2);
3712 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3717 abuf
->written
= written
;
3718 SEM_BRANCH_FINI (vpc
);
3723 /* bp: bp $label9 */
3726 SEM_FN_NAME (fr30bf
,bp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3728 #define FLD(f) abuf->fields.sfmt_brad.f
3729 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3730 int UNUSED written
= 0;
3731 IADDR UNUSED pc
= abuf
->addr
;
3733 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3735 if (NOTBI (CPU (h_nbit
))) {
3737 USI opval
= FLD (i_label9
);
3738 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3739 written
|= (1 << 2);
3740 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3744 abuf
->written
= written
;
3745 SEM_BRANCH_FINI (vpc
);
3750 /* bvd: bv:d $label9 */
3753 SEM_FN_NAME (fr30bf
,bvd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3755 #define FLD(f) abuf->fields.sfmt_brad.f
3756 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3757 int UNUSED written
= 0;
3758 IADDR UNUSED pc
= abuf
->addr
;
3760 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3765 USI opval
= FLD (i_label9
);
3766 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3767 written
|= (1 << 2);
3768 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3773 abuf
->written
= written
;
3774 SEM_BRANCH_FINI (vpc
);
3779 /* bv: bv $label9 */
3782 SEM_FN_NAME (fr30bf
,bv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3784 #define FLD(f) abuf->fields.sfmt_brad.f
3785 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3786 int UNUSED written
= 0;
3787 IADDR UNUSED pc
= abuf
->addr
;
3789 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3793 USI opval
= FLD (i_label9
);
3794 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3795 written
|= (1 << 2);
3796 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3800 abuf
->written
= written
;
3801 SEM_BRANCH_FINI (vpc
);
3806 /* bnvd: bnv:d $label9 */
3809 SEM_FN_NAME (fr30bf
,bnvd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3811 #define FLD(f) abuf->fields.sfmt_brad.f
3812 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3813 int UNUSED written
= 0;
3814 IADDR UNUSED pc
= abuf
->addr
;
3816 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3819 if (NOTBI (CPU (h_vbit
))) {
3821 USI opval
= FLD (i_label9
);
3822 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3823 written
|= (1 << 2);
3824 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3829 abuf
->written
= written
;
3830 SEM_BRANCH_FINI (vpc
);
3835 /* bnv: bnv $label9 */
3838 SEM_FN_NAME (fr30bf
,bnv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3840 #define FLD(f) abuf->fields.sfmt_brad.f
3841 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3842 int UNUSED written
= 0;
3843 IADDR UNUSED pc
= abuf
->addr
;
3845 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3847 if (NOTBI (CPU (h_vbit
))) {
3849 USI opval
= FLD (i_label9
);
3850 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3851 written
|= (1 << 2);
3852 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3856 abuf
->written
= written
;
3857 SEM_BRANCH_FINI (vpc
);
3862 /* bltd: blt:d $label9 */
3865 SEM_FN_NAME (fr30bf
,bltd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3867 #define FLD(f) abuf->fields.sfmt_brad.f
3868 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3869 int UNUSED written
= 0;
3870 IADDR UNUSED pc
= abuf
->addr
;
3872 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3875 if (XORBI (CPU (h_vbit
), CPU (h_nbit
))) {
3877 USI opval
= FLD (i_label9
);
3878 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3879 written
|= (1 << 3);
3880 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3885 abuf
->written
= written
;
3886 SEM_BRANCH_FINI (vpc
);
3891 /* blt: blt $label9 */
3894 SEM_FN_NAME (fr30bf
,blt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3896 #define FLD(f) abuf->fields.sfmt_brad.f
3897 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3898 int UNUSED written
= 0;
3899 IADDR UNUSED pc
= abuf
->addr
;
3901 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3903 if (XORBI (CPU (h_vbit
), CPU (h_nbit
))) {
3905 USI opval
= FLD (i_label9
);
3906 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3907 written
|= (1 << 3);
3908 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3912 abuf
->written
= written
;
3913 SEM_BRANCH_FINI (vpc
);
3918 /* bged: bge:d $label9 */
3921 SEM_FN_NAME (fr30bf
,bged
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3923 #define FLD(f) abuf->fields.sfmt_brad.f
3924 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3925 int UNUSED written
= 0;
3926 IADDR UNUSED pc
= abuf
->addr
;
3928 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3931 if (NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)))) {
3933 USI opval
= FLD (i_label9
);
3934 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3935 written
|= (1 << 3);
3936 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3941 abuf
->written
= written
;
3942 SEM_BRANCH_FINI (vpc
);
3947 /* bge: bge $label9 */
3950 SEM_FN_NAME (fr30bf
,bge
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3952 #define FLD(f) abuf->fields.sfmt_brad.f
3953 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3954 int UNUSED written
= 0;
3955 IADDR UNUSED pc
= abuf
->addr
;
3957 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3959 if (NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)))) {
3961 USI opval
= FLD (i_label9
);
3962 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3963 written
|= (1 << 3);
3964 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3968 abuf
->written
= written
;
3969 SEM_BRANCH_FINI (vpc
);
3974 /* bled: ble:d $label9 */
3977 SEM_FN_NAME (fr30bf
,bled
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3979 #define FLD(f) abuf->fields.sfmt_brad.f
3980 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3981 int UNUSED written
= 0;
3982 IADDR UNUSED pc
= abuf
->addr
;
3984 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3987 if (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
))) {
3989 USI opval
= FLD (i_label9
);
3990 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3991 written
|= (1 << 4);
3992 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3997 abuf
->written
= written
;
3998 SEM_BRANCH_FINI (vpc
);
4003 /* ble: ble $label9 */
4006 SEM_FN_NAME (fr30bf
,ble
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4008 #define FLD(f) abuf->fields.sfmt_brad.f
4009 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4010 int UNUSED written
= 0;
4011 IADDR UNUSED pc
= abuf
->addr
;
4013 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4015 if (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
))) {
4017 USI opval
= FLD (i_label9
);
4018 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4019 written
|= (1 << 4);
4020 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4024 abuf
->written
= written
;
4025 SEM_BRANCH_FINI (vpc
);
4030 /* bgtd: bgt:d $label9 */
4033 SEM_FN_NAME (fr30bf
,bgtd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4035 #define FLD(f) abuf->fields.sfmt_brad.f
4036 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4037 int UNUSED written
= 0;
4038 IADDR UNUSED pc
= abuf
->addr
;
4040 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4043 if (NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)))) {
4045 USI opval
= FLD (i_label9
);
4046 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4047 written
|= (1 << 4);
4048 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4053 abuf
->written
= written
;
4054 SEM_BRANCH_FINI (vpc
);
4059 /* bgt: bgt $label9 */
4062 SEM_FN_NAME (fr30bf
,bgt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4064 #define FLD(f) abuf->fields.sfmt_brad.f
4065 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4066 int UNUSED written
= 0;
4067 IADDR UNUSED pc
= abuf
->addr
;
4069 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4071 if (NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)))) {
4073 USI opval
= FLD (i_label9
);
4074 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4075 written
|= (1 << 4);
4076 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4080 abuf
->written
= written
;
4081 SEM_BRANCH_FINI (vpc
);
4086 /* blsd: bls:d $label9 */
4089 SEM_FN_NAME (fr30bf
,blsd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4091 #define FLD(f) abuf->fields.sfmt_brad.f
4092 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4093 int UNUSED written
= 0;
4094 IADDR UNUSED pc
= abuf
->addr
;
4096 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4099 if (ORBI (CPU (h_cbit
), CPU (h_zbit
))) {
4101 USI opval
= FLD (i_label9
);
4102 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4103 written
|= (1 << 3);
4104 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4109 abuf
->written
= written
;
4110 SEM_BRANCH_FINI (vpc
);
4115 /* bls: bls $label9 */
4118 SEM_FN_NAME (fr30bf
,bls
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4120 #define FLD(f) abuf->fields.sfmt_brad.f
4121 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4122 int UNUSED written
= 0;
4123 IADDR UNUSED pc
= abuf
->addr
;
4125 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4127 if (ORBI (CPU (h_cbit
), CPU (h_zbit
))) {
4129 USI opval
= FLD (i_label9
);
4130 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4131 written
|= (1 << 3);
4132 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4136 abuf
->written
= written
;
4137 SEM_BRANCH_FINI (vpc
);
4142 /* bhid: bhi:d $label9 */
4145 SEM_FN_NAME (fr30bf
,bhid
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4147 #define FLD(f) abuf->fields.sfmt_brad.f
4148 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4149 int UNUSED written
= 0;
4150 IADDR UNUSED pc
= abuf
->addr
;
4152 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4155 if (NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)))) {
4157 USI opval
= FLD (i_label9
);
4158 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4159 written
|= (1 << 3);
4160 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4165 abuf
->written
= written
;
4166 SEM_BRANCH_FINI (vpc
);
4171 /* bhi: bhi $label9 */
4174 SEM_FN_NAME (fr30bf
,bhi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4176 #define FLD(f) abuf->fields.sfmt_brad.f
4177 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4178 int UNUSED written
= 0;
4179 IADDR UNUSED pc
= abuf
->addr
;
4181 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4183 if (NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)))) {
4185 USI opval
= FLD (i_label9
);
4186 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4187 written
|= (1 << 3);
4188 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4192 abuf
->written
= written
;
4193 SEM_BRANCH_FINI (vpc
);
4198 /* dmovr13: dmov $R13,@$dir10 */
4201 SEM_FN_NAME (fr30bf
,dmovr13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4203 #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
4204 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4205 int UNUSED written
= 0;
4206 IADDR UNUSED pc
= abuf
->addr
;
4207 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4210 SI opval
= CPU (h_gr
[((UINT
) 13)]);
4211 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4212 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4219 /* dmovr13h: dmovh $R13,@$dir9 */
4222 SEM_FN_NAME (fr30bf
,dmovr13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4224 #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
4225 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4226 int UNUSED written
= 0;
4227 IADDR UNUSED pc
= abuf
->addr
;
4228 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4231 HI opval
= CPU (h_gr
[((UINT
) 13)]);
4232 SETMEMHI (current_cpu
, pc
, FLD (f_dir9
), opval
);
4233 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4240 /* dmovr13b: dmovb $R13,@$dir8 */
4243 SEM_FN_NAME (fr30bf
,dmovr13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4245 #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
4246 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4247 int UNUSED written
= 0;
4248 IADDR UNUSED pc
= abuf
->addr
;
4249 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4252 QI opval
= CPU (h_gr
[((UINT
) 13)]);
4253 SETMEMQI (current_cpu
, pc
, FLD (f_dir8
), opval
);
4254 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4261 /* dmovr13pi: dmov @$R13+,@$dir10 */
4264 SEM_FN_NAME (fr30bf
,dmovr13pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4266 #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
4267 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4268 int UNUSED written
= 0;
4269 IADDR UNUSED pc
= abuf
->addr
;
4270 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4274 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4275 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4276 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4279 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 4);
4280 CPU (h_gr
[((UINT
) 13)]) = opval
;
4281 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4289 /* dmovr13pih: dmovh @$R13+,@$dir9 */
4292 SEM_FN_NAME (fr30bf
,dmovr13pih
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4294 #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
4295 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4296 int UNUSED written
= 0;
4297 IADDR UNUSED pc
= abuf
->addr
;
4298 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4302 HI opval
= GETMEMHI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4303 SETMEMHI (current_cpu
, pc
, FLD (f_dir9
), opval
);
4304 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4307 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 2);
4308 CPU (h_gr
[((UINT
) 13)]) = opval
;
4309 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4317 /* dmovr13pib: dmovb @$R13+,@$dir8 */
4320 SEM_FN_NAME (fr30bf
,dmovr13pib
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4322 #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
4323 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4324 int UNUSED written
= 0;
4325 IADDR UNUSED pc
= abuf
->addr
;
4326 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4330 QI opval
= GETMEMQI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4331 SETMEMQI (current_cpu
, pc
, FLD (f_dir8
), opval
);
4332 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4335 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 1);
4336 CPU (h_gr
[((UINT
) 13)]) = opval
;
4337 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4345 /* dmovr15pi: dmov @$R15+,@$dir10 */
4348 SEM_FN_NAME (fr30bf
,dmovr15pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4350 #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
4351 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4352 int UNUSED written
= 0;
4353 IADDR UNUSED pc
= abuf
->addr
;
4354 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4358 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4359 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4360 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4363 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4364 CPU (h_gr
[((UINT
) 15)]) = opval
;
4365 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4373 /* dmov2r13: dmov @$dir10,$R13 */
4376 SEM_FN_NAME (fr30bf
,dmov2r13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4378 #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
4379 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4380 int UNUSED written
= 0;
4381 IADDR UNUSED pc
= abuf
->addr
;
4382 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4385 SI opval
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4386 CPU (h_gr
[((UINT
) 13)]) = opval
;
4387 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4394 /* dmov2r13h: dmovh @$dir9,$R13 */
4397 SEM_FN_NAME (fr30bf
,dmov2r13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4399 #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
4400 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4401 int UNUSED written
= 0;
4402 IADDR UNUSED pc
= abuf
->addr
;
4403 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4406 SI opval
= GETMEMHI (current_cpu
, pc
, FLD (f_dir9
));
4407 CPU (h_gr
[((UINT
) 13)]) = opval
;
4408 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4415 /* dmov2r13b: dmovb @$dir8,$R13 */
4418 SEM_FN_NAME (fr30bf
,dmov2r13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4420 #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
4421 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4422 int UNUSED written
= 0;
4423 IADDR UNUSED pc
= abuf
->addr
;
4424 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4427 SI opval
= GETMEMQI (current_cpu
, pc
, FLD (f_dir8
));
4428 CPU (h_gr
[((UINT
) 13)]) = opval
;
4429 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4436 /* dmov2r13pi: dmov @$dir10,@$R13+ */
4439 SEM_FN_NAME (fr30bf
,dmov2r13pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4441 #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
4442 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4443 int UNUSED written
= 0;
4444 IADDR UNUSED pc
= abuf
->addr
;
4445 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4449 SI opval
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4450 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4451 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4454 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 4);
4455 CPU (h_gr
[((UINT
) 13)]) = opval
;
4456 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4464 /* dmov2r13pih: dmovh @$dir9,@$R13+ */
4467 SEM_FN_NAME (fr30bf
,dmov2r13pih
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4469 #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
4470 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4471 int UNUSED written
= 0;
4472 IADDR UNUSED pc
= abuf
->addr
;
4473 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4477 HI opval
= GETMEMHI (current_cpu
, pc
, FLD (f_dir9
));
4478 SETMEMHI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4479 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4482 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 2);
4483 CPU (h_gr
[((UINT
) 13)]) = opval
;
4484 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4492 /* dmov2r13pib: dmovb @$dir8,@$R13+ */
4495 SEM_FN_NAME (fr30bf
,dmov2r13pib
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4497 #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
4498 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4499 int UNUSED written
= 0;
4500 IADDR UNUSED pc
= abuf
->addr
;
4501 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4505 QI opval
= GETMEMQI (current_cpu
, pc
, FLD (f_dir8
));
4506 SETMEMQI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4507 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4510 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 1);
4511 CPU (h_gr
[((UINT
) 13)]) = opval
;
4512 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4520 /* dmov2r15pd: dmov @$dir10,@-$R15 */
4523 SEM_FN_NAME (fr30bf
,dmov2r15pd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4525 #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
4526 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4527 int UNUSED written
= 0;
4528 IADDR UNUSED pc
= abuf
->addr
;
4529 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4533 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
4534 CPU (h_gr
[((UINT
) 15)]) = opval
;
4535 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4538 SI opval
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4539 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
4540 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4548 /* ldres: ldres @$Ri+,$u4 */
4551 SEM_FN_NAME (fr30bf
,ldres
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4553 #define FLD(f) abuf->fields.sfmt_add2.f
4554 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4555 int UNUSED written
= 0;
4556 IADDR UNUSED pc
= abuf
->addr
;
4557 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4560 SI opval
= ADDSI (* FLD (i_Ri
), 4);
4561 * FLD (i_Ri
) = opval
;
4562 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4569 /* stres: stres $u4,@$Ri+ */
4572 SEM_FN_NAME (fr30bf
,stres
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4574 #define FLD(f) abuf->fields.sfmt_add2.f
4575 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4576 int UNUSED written
= 0;
4577 IADDR UNUSED pc
= abuf
->addr
;
4578 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4581 SI opval
= ADDSI (* FLD (i_Ri
), 4);
4582 * FLD (i_Ri
) = opval
;
4583 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4590 /* copop: copop $u4c,$ccc,$CRj,$CRi */
4593 SEM_FN_NAME (fr30bf
,copop
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4595 #define FLD(f) abuf->fields.fmt_empty.f
4596 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4597 int UNUSED written
= 0;
4598 IADDR UNUSED pc
= abuf
->addr
;
4599 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4607 /* copld: copld $u4c,$ccc,$Rjc,$CRi */
4610 SEM_FN_NAME (fr30bf
,copld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4612 #define FLD(f) abuf->fields.fmt_empty.f
4613 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4614 int UNUSED written
= 0;
4615 IADDR UNUSED pc
= abuf
->addr
;
4616 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4624 /* copst: copst $u4c,$ccc,$CRj,$Ric */
4627 SEM_FN_NAME (fr30bf
,copst
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4629 #define FLD(f) abuf->fields.fmt_empty.f
4630 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4631 int UNUSED written
= 0;
4632 IADDR UNUSED pc
= abuf
->addr
;
4633 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4641 /* copsv: copsv $u4c,$ccc,$CRj,$Ric */
4644 SEM_FN_NAME (fr30bf
,copsv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4646 #define FLD(f) abuf->fields.fmt_empty.f
4647 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4648 int UNUSED written
= 0;
4649 IADDR UNUSED pc
= abuf
->addr
;
4650 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4661 SEM_FN_NAME (fr30bf
,nop
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4663 #define FLD(f) abuf->fields.fmt_empty.f
4664 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4665 int UNUSED written
= 0;
4666 IADDR UNUSED pc
= abuf
->addr
;
4667 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4675 /* andccr: andccr $u8 */
4678 SEM_FN_NAME (fr30bf
,andccr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4680 #define FLD(f) abuf->fields.sfmt_int.f
4681 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4682 int UNUSED written
= 0;
4683 IADDR UNUSED pc
= abuf
->addr
;
4684 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4687 UQI opval
= ANDQI (GET_H_CCR (), FLD (f_u8
));
4689 TRACE_RESULT (current_cpu
, abuf
, "ccr", 'x', opval
);
4696 /* orccr: orccr $u8 */
4699 SEM_FN_NAME (fr30bf
,orccr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4701 #define FLD(f) abuf->fields.sfmt_int.f
4702 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4703 int UNUSED written
= 0;
4704 IADDR UNUSED pc
= abuf
->addr
;
4705 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4708 UQI opval
= ORQI (GET_H_CCR (), FLD (f_u8
));
4710 TRACE_RESULT (current_cpu
, abuf
, "ccr", 'x', opval
);
4717 /* stilm: stilm $u8 */
4720 SEM_FN_NAME (fr30bf
,stilm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4722 #define FLD(f) abuf->fields.sfmt_int.f
4723 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4724 int UNUSED written
= 0;
4725 IADDR UNUSED pc
= abuf
->addr
;
4726 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4729 UQI opval
= ANDSI (FLD (f_u8
), 31);
4731 TRACE_RESULT (current_cpu
, abuf
, "ilm", 'x', opval
);
4738 /* addsp: addsp $s10 */
4741 SEM_FN_NAME (fr30bf
,addsp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4743 #define FLD(f) abuf->fields.sfmt_addsp.f
4744 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4745 int UNUSED written
= 0;
4746 IADDR UNUSED pc
= abuf
->addr
;
4747 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4750 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_s10
));
4751 CPU (h_gr
[((UINT
) 15)]) = opval
;
4752 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4759 /* extsb: extsb $Ri */
4762 SEM_FN_NAME (fr30bf
,extsb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4764 #define FLD(f) abuf->fields.sfmt_add2.f
4765 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4766 int UNUSED written
= 0;
4767 IADDR UNUSED pc
= abuf
->addr
;
4768 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4771 SI opval
= EXTQISI (ANDQI (* FLD (i_Ri
), 255));
4772 * FLD (i_Ri
) = opval
;
4773 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4780 /* extub: extub $Ri */
4783 SEM_FN_NAME (fr30bf
,extub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4785 #define FLD(f) abuf->fields.sfmt_add2.f
4786 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4787 int UNUSED written
= 0;
4788 IADDR UNUSED pc
= abuf
->addr
;
4789 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4792 SI opval
= ZEXTQISI (ANDQI (* FLD (i_Ri
), 255));
4793 * FLD (i_Ri
) = opval
;
4794 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4801 /* extsh: extsh $Ri */
4804 SEM_FN_NAME (fr30bf
,extsh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4806 #define FLD(f) abuf->fields.sfmt_add2.f
4807 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4808 int UNUSED written
= 0;
4809 IADDR UNUSED pc
= abuf
->addr
;
4810 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4813 SI opval
= EXTHISI (ANDHI (* FLD (i_Ri
), 65535));
4814 * FLD (i_Ri
) = opval
;
4815 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4822 /* extuh: extuh $Ri */
4825 SEM_FN_NAME (fr30bf
,extuh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4827 #define FLD(f) abuf->fields.sfmt_add2.f
4828 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4829 int UNUSED written
= 0;
4830 IADDR UNUSED pc
= abuf
->addr
;
4831 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4834 SI opval
= ZEXTHISI (ANDHI (* FLD (i_Ri
), 65535));
4835 * FLD (i_Ri
) = opval
;
4836 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4843 /* ldm0: ldm0 ($reglist_low_ld) */
4846 SEM_FN_NAME (fr30bf
,ldm0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4848 #define FLD(f) abuf->fields.sfmt_ldm0.f
4849 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4850 int UNUSED written
= 0;
4851 IADDR UNUSED pc
= abuf
->addr
;
4852 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4855 if (ANDSI (FLD (f_reglist_low_ld
), 1)) {
4858 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4859 CPU (h_gr
[((UINT
) 0)]) = opval
;
4860 written
|= (1 << 3);
4861 TRACE_RESULT (current_cpu
, abuf
, "gr-0", 'x', opval
);
4864 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4865 CPU (h_gr
[((UINT
) 15)]) = opval
;
4866 written
|= (1 << 5);
4867 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4871 if (ANDSI (FLD (f_reglist_low_ld
), 2)) {
4874 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4875 CPU (h_gr
[((UINT
) 1)]) = opval
;
4876 written
|= (1 << 4);
4877 TRACE_RESULT (current_cpu
, abuf
, "gr-1", 'x', opval
);
4880 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4881 CPU (h_gr
[((UINT
) 15)]) = opval
;
4882 written
|= (1 << 5);
4883 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4887 if (ANDSI (FLD (f_reglist_low_ld
), 4)) {
4890 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4891 CPU (h_gr
[((UINT
) 2)]) = opval
;
4892 written
|= (1 << 6);
4893 TRACE_RESULT (current_cpu
, abuf
, "gr-2", 'x', opval
);
4896 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4897 CPU (h_gr
[((UINT
) 15)]) = opval
;
4898 written
|= (1 << 5);
4899 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4903 if (ANDSI (FLD (f_reglist_low_ld
), 8)) {
4906 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4907 CPU (h_gr
[((UINT
) 3)]) = opval
;
4908 written
|= (1 << 7);
4909 TRACE_RESULT (current_cpu
, abuf
, "gr-3", 'x', opval
);
4912 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4913 CPU (h_gr
[((UINT
) 15)]) = opval
;
4914 written
|= (1 << 5);
4915 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4919 if (ANDSI (FLD (f_reglist_low_ld
), 16)) {
4922 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4923 CPU (h_gr
[((UINT
) 4)]) = opval
;
4924 written
|= (1 << 8);
4925 TRACE_RESULT (current_cpu
, abuf
, "gr-4", 'x', opval
);
4928 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4929 CPU (h_gr
[((UINT
) 15)]) = opval
;
4930 written
|= (1 << 5);
4931 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4935 if (ANDSI (FLD (f_reglist_low_ld
), 32)) {
4938 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4939 CPU (h_gr
[((UINT
) 5)]) = opval
;
4940 written
|= (1 << 9);
4941 TRACE_RESULT (current_cpu
, abuf
, "gr-5", 'x', opval
);
4944 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4945 CPU (h_gr
[((UINT
) 15)]) = opval
;
4946 written
|= (1 << 5);
4947 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4951 if (ANDSI (FLD (f_reglist_low_ld
), 64)) {
4954 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4955 CPU (h_gr
[((UINT
) 6)]) = opval
;
4956 written
|= (1 << 10);
4957 TRACE_RESULT (current_cpu
, abuf
, "gr-6", 'x', opval
);
4960 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4961 CPU (h_gr
[((UINT
) 15)]) = opval
;
4962 written
|= (1 << 5);
4963 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4967 if (ANDSI (FLD (f_reglist_low_ld
), 128)) {
4970 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4971 CPU (h_gr
[((UINT
) 7)]) = opval
;
4972 written
|= (1 << 11);
4973 TRACE_RESULT (current_cpu
, abuf
, "gr-7", 'x', opval
);
4976 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4977 CPU (h_gr
[((UINT
) 15)]) = opval
;
4978 written
|= (1 << 5);
4979 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4985 abuf
->written
= written
;
4990 /* ldm1: ldm1 ($reglist_hi_ld) */
4993 SEM_FN_NAME (fr30bf
,ldm1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4995 #define FLD(f) abuf->fields.sfmt_ldm1.f
4996 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4997 int UNUSED written
= 0;
4998 IADDR UNUSED pc
= abuf
->addr
;
4999 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5002 if (ANDSI (FLD (f_reglist_hi_ld
), 1)) {
5005 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5006 CPU (h_gr
[((UINT
) 8)]) = opval
;
5007 written
|= (1 << 9);
5008 TRACE_RESULT (current_cpu
, abuf
, "gr-8", 'x', opval
);
5011 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5012 CPU (h_gr
[((UINT
) 15)]) = opval
;
5013 written
|= (1 << 8);
5014 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5018 if (ANDSI (FLD (f_reglist_hi_ld
), 2)) {
5021 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5022 CPU (h_gr
[((UINT
) 9)]) = opval
;
5023 written
|= (1 << 10);
5024 TRACE_RESULT (current_cpu
, abuf
, "gr-9", 'x', opval
);
5027 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5028 CPU (h_gr
[((UINT
) 15)]) = opval
;
5029 written
|= (1 << 8);
5030 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5034 if (ANDSI (FLD (f_reglist_hi_ld
), 4)) {
5037 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5038 CPU (h_gr
[((UINT
) 10)]) = opval
;
5039 written
|= (1 << 3);
5040 TRACE_RESULT (current_cpu
, abuf
, "gr-10", 'x', opval
);
5043 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5044 CPU (h_gr
[((UINT
) 15)]) = opval
;
5045 written
|= (1 << 8);
5046 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5050 if (ANDSI (FLD (f_reglist_hi_ld
), 8)) {
5053 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5054 CPU (h_gr
[((UINT
) 11)]) = opval
;
5055 written
|= (1 << 4);
5056 TRACE_RESULT (current_cpu
, abuf
, "gr-11", 'x', opval
);
5059 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5060 CPU (h_gr
[((UINT
) 15)]) = opval
;
5061 written
|= (1 << 8);
5062 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5066 if (ANDSI (FLD (f_reglist_hi_ld
), 16)) {
5069 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5070 CPU (h_gr
[((UINT
) 12)]) = opval
;
5071 written
|= (1 << 5);
5072 TRACE_RESULT (current_cpu
, abuf
, "gr-12", 'x', opval
);
5075 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5076 CPU (h_gr
[((UINT
) 15)]) = opval
;
5077 written
|= (1 << 8);
5078 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5082 if (ANDSI (FLD (f_reglist_hi_ld
), 32)) {
5085 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5086 CPU (h_gr
[((UINT
) 13)]) = opval
;
5087 written
|= (1 << 6);
5088 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
5091 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5092 CPU (h_gr
[((UINT
) 15)]) = opval
;
5093 written
|= (1 << 8);
5094 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5098 if (ANDSI (FLD (f_reglist_hi_ld
), 64)) {
5101 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5102 CPU (h_gr
[((UINT
) 14)]) = opval
;
5103 written
|= (1 << 7);
5104 TRACE_RESULT (current_cpu
, abuf
, "gr-14", 'x', opval
);
5107 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5108 CPU (h_gr
[((UINT
) 15)]) = opval
;
5109 written
|= (1 << 8);
5110 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5114 if (ANDSI (FLD (f_reglist_hi_ld
), 128)) {
5116 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5117 CPU (h_gr
[((UINT
) 15)]) = opval
;
5118 written
|= (1 << 8);
5119 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5124 abuf
->written
= written
;
5129 /* stm0: stm0 ($reglist_low_st) */
5132 SEM_FN_NAME (fr30bf
,stm0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5134 #define FLD(f) abuf->fields.sfmt_stm0.f
5135 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5136 int UNUSED written
= 0;
5137 IADDR UNUSED pc
= abuf
->addr
;
5138 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5141 if (ANDSI (FLD (f_reglist_low_st
), 1)) {
5144 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5145 CPU (h_gr
[((UINT
) 15)]) = opval
;
5146 written
|= (1 << 10);
5147 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5150 SI opval
= CPU (h_gr
[((UINT
) 7)]);
5151 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5152 written
|= (1 << 11);
5153 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5157 if (ANDSI (FLD (f_reglist_low_st
), 2)) {
5160 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5161 CPU (h_gr
[((UINT
) 15)]) = opval
;
5162 written
|= (1 << 10);
5163 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5166 SI opval
= CPU (h_gr
[((UINT
) 6)]);
5167 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5168 written
|= (1 << 11);
5169 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5173 if (ANDSI (FLD (f_reglist_low_st
), 4)) {
5176 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5177 CPU (h_gr
[((UINT
) 15)]) = opval
;
5178 written
|= (1 << 10);
5179 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5182 SI opval
= CPU (h_gr
[((UINT
) 5)]);
5183 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5184 written
|= (1 << 11);
5185 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5189 if (ANDSI (FLD (f_reglist_low_st
), 8)) {
5192 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5193 CPU (h_gr
[((UINT
) 15)]) = opval
;
5194 written
|= (1 << 10);
5195 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5198 SI opval
= CPU (h_gr
[((UINT
) 4)]);
5199 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5200 written
|= (1 << 11);
5201 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5205 if (ANDSI (FLD (f_reglist_low_st
), 16)) {
5208 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5209 CPU (h_gr
[((UINT
) 15)]) = opval
;
5210 written
|= (1 << 10);
5211 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5214 SI opval
= CPU (h_gr
[((UINT
) 3)]);
5215 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5216 written
|= (1 << 11);
5217 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5221 if (ANDSI (FLD (f_reglist_low_st
), 32)) {
5224 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5225 CPU (h_gr
[((UINT
) 15)]) = opval
;
5226 written
|= (1 << 10);
5227 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5230 SI opval
= CPU (h_gr
[((UINT
) 2)]);
5231 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5232 written
|= (1 << 11);
5233 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5237 if (ANDSI (FLD (f_reglist_low_st
), 64)) {
5240 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5241 CPU (h_gr
[((UINT
) 15)]) = opval
;
5242 written
|= (1 << 10);
5243 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5246 SI opval
= CPU (h_gr
[((UINT
) 1)]);
5247 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5248 written
|= (1 << 11);
5249 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5253 if (ANDSI (FLD (f_reglist_low_st
), 128)) {
5256 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5257 CPU (h_gr
[((UINT
) 15)]) = opval
;
5258 written
|= (1 << 10);
5259 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5262 SI opval
= CPU (h_gr
[((UINT
) 0)]);
5263 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5264 written
|= (1 << 11);
5265 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5271 abuf
->written
= written
;
5276 /* stm1: stm1 ($reglist_hi_st) */
5279 SEM_FN_NAME (fr30bf
,stm1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5281 #define FLD(f) abuf->fields.sfmt_stm1.f
5282 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5283 int UNUSED written
= 0;
5284 IADDR UNUSED pc
= abuf
->addr
;
5285 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5288 if (ANDSI (FLD (f_reglist_hi_st
), 1)) {
5291 tmp_save_r15
= CPU (h_gr
[((UINT
) 15)]);
5293 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5294 CPU (h_gr
[((UINT
) 15)]) = opval
;
5295 written
|= (1 << 9);
5296 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5299 SI opval
= tmp_save_r15
;
5300 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5301 written
|= (1 << 10);
5302 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5306 if (ANDSI (FLD (f_reglist_hi_st
), 2)) {
5309 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5310 CPU (h_gr
[((UINT
) 15)]) = opval
;
5311 written
|= (1 << 9);
5312 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5315 SI opval
= CPU (h_gr
[((UINT
) 14)]);
5316 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5317 written
|= (1 << 10);
5318 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5322 if (ANDSI (FLD (f_reglist_hi_st
), 4)) {
5325 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5326 CPU (h_gr
[((UINT
) 15)]) = opval
;
5327 written
|= (1 << 9);
5328 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5331 SI opval
= CPU (h_gr
[((UINT
) 13)]);
5332 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5333 written
|= (1 << 10);
5334 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5338 if (ANDSI (FLD (f_reglist_hi_st
), 8)) {
5341 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5342 CPU (h_gr
[((UINT
) 15)]) = opval
;
5343 written
|= (1 << 9);
5344 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5347 SI opval
= CPU (h_gr
[((UINT
) 12)]);
5348 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5349 written
|= (1 << 10);
5350 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5354 if (ANDSI (FLD (f_reglist_hi_st
), 16)) {
5357 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5358 CPU (h_gr
[((UINT
) 15)]) = opval
;
5359 written
|= (1 << 9);
5360 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5363 SI opval
= CPU (h_gr
[((UINT
) 11)]);
5364 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5365 written
|= (1 << 10);
5366 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5370 if (ANDSI (FLD (f_reglist_hi_st
), 32)) {
5373 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5374 CPU (h_gr
[((UINT
) 15)]) = opval
;
5375 written
|= (1 << 9);
5376 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5379 SI opval
= CPU (h_gr
[((UINT
) 10)]);
5380 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5381 written
|= (1 << 10);
5382 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5386 if (ANDSI (FLD (f_reglist_hi_st
), 64)) {
5389 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5390 CPU (h_gr
[((UINT
) 15)]) = opval
;
5391 written
|= (1 << 9);
5392 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5395 SI opval
= CPU (h_gr
[((UINT
) 9)]);
5396 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5397 written
|= (1 << 10);
5398 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5402 if (ANDSI (FLD (f_reglist_hi_st
), 128)) {
5405 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5406 CPU (h_gr
[((UINT
) 15)]) = opval
;
5407 written
|= (1 << 9);
5408 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5411 SI opval
= CPU (h_gr
[((UINT
) 8)]);
5412 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5413 written
|= (1 << 10);
5414 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5420 abuf
->written
= written
;
5425 /* enter: enter $u10 */
5428 SEM_FN_NAME (fr30bf
,enter
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5430 #define FLD(f) abuf->fields.sfmt_enter.f
5431 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5432 int UNUSED written
= 0;
5433 IADDR UNUSED pc
= abuf
->addr
;
5434 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5438 tmp_tmp
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5440 SI opval
= CPU (h_gr
[((UINT
) 14)]);
5441 SETMEMSI (current_cpu
, pc
, tmp_tmp
, opval
);
5442 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5446 CPU (h_gr
[((UINT
) 14)]) = opval
;
5447 TRACE_RESULT (current_cpu
, abuf
, "gr-14", 'x', opval
);
5450 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_u10
));
5451 CPU (h_gr
[((UINT
) 15)]) = opval
;
5452 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5463 SEM_FN_NAME (fr30bf
,leave
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5465 #define FLD(f) abuf->fields.sfmt_enter.f
5466 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5467 int UNUSED written
= 0;
5468 IADDR UNUSED pc
= abuf
->addr
;
5469 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5473 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 14)]), 4);
5474 CPU (h_gr
[((UINT
) 15)]) = opval
;
5475 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5478 SI opval
= GETMEMSI (current_cpu
, pc
, SUBSI (CPU (h_gr
[((UINT
) 15)]), 4));
5479 CPU (h_gr
[((UINT
) 14)]) = opval
;
5480 TRACE_RESULT (current_cpu
, abuf
, "gr-14", 'x', opval
);
5488 /* xchb: xchb @$Rj,$Ri */
5491 SEM_FN_NAME (fr30bf
,xchb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5493 #define FLD(f) abuf->fields.sfmt_add.f
5494 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5495 int UNUSED written
= 0;
5496 IADDR UNUSED pc
= abuf
->addr
;
5497 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5501 tmp_tmp
= * FLD (i_Ri
);
5503 SI opval
= GETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
));
5504 * FLD (i_Ri
) = opval
;
5505 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
5508 UQI opval
= tmp_tmp
;
5509 SETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
5510 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5518 /* Table of all semantic fns. */
5520 static const struct sem_fn_desc sem_fns
[] = {
5521 { FR30BF_INSN_X_INVALID
, SEM_FN_NAME (fr30bf
,x_invalid
) },
5522 { FR30BF_INSN_X_AFTER
, SEM_FN_NAME (fr30bf
,x_after
) },
5523 { FR30BF_INSN_X_BEFORE
, SEM_FN_NAME (fr30bf
,x_before
) },
5524 { FR30BF_INSN_X_CTI_CHAIN
, SEM_FN_NAME (fr30bf
,x_cti_chain
) },
5525 { FR30BF_INSN_X_CHAIN
, SEM_FN_NAME (fr30bf
,x_chain
) },
5526 { FR30BF_INSN_X_BEGIN
, SEM_FN_NAME (fr30bf
,x_begin
) },
5527 { FR30BF_INSN_ADD
, SEM_FN_NAME (fr30bf
,add
) },
5528 { FR30BF_INSN_ADDI
, SEM_FN_NAME (fr30bf
,addi
) },
5529 { FR30BF_INSN_ADD2
, SEM_FN_NAME (fr30bf
,add2
) },
5530 { FR30BF_INSN_ADDC
, SEM_FN_NAME (fr30bf
,addc
) },
5531 { FR30BF_INSN_ADDN
, SEM_FN_NAME (fr30bf
,addn
) },
5532 { FR30BF_INSN_ADDNI
, SEM_FN_NAME (fr30bf
,addni
) },
5533 { FR30BF_INSN_ADDN2
, SEM_FN_NAME (fr30bf
,addn2
) },
5534 { FR30BF_INSN_SUB
, SEM_FN_NAME (fr30bf
,sub
) },
5535 { FR30BF_INSN_SUBC
, SEM_FN_NAME (fr30bf
,subc
) },
5536 { FR30BF_INSN_SUBN
, SEM_FN_NAME (fr30bf
,subn
) },
5537 { FR30BF_INSN_CMP
, SEM_FN_NAME (fr30bf
,cmp
) },
5538 { FR30BF_INSN_CMPI
, SEM_FN_NAME (fr30bf
,cmpi
) },
5539 { FR30BF_INSN_CMP2
, SEM_FN_NAME (fr30bf
,cmp2
) },
5540 { FR30BF_INSN_AND
, SEM_FN_NAME (fr30bf
,and) },
5541 { FR30BF_INSN_OR
, SEM_FN_NAME (fr30bf
,or) },
5542 { FR30BF_INSN_EOR
, SEM_FN_NAME (fr30bf
,eor
) },
5543 { FR30BF_INSN_ANDM
, SEM_FN_NAME (fr30bf
,andm
) },
5544 { FR30BF_INSN_ANDH
, SEM_FN_NAME (fr30bf
,andh
) },
5545 { FR30BF_INSN_ANDB
, SEM_FN_NAME (fr30bf
,andb
) },
5546 { FR30BF_INSN_ORM
, SEM_FN_NAME (fr30bf
,orm
) },
5547 { FR30BF_INSN_ORH
, SEM_FN_NAME (fr30bf
,orh
) },
5548 { FR30BF_INSN_ORB
, SEM_FN_NAME (fr30bf
,orb
) },
5549 { FR30BF_INSN_EORM
, SEM_FN_NAME (fr30bf
,eorm
) },
5550 { FR30BF_INSN_EORH
, SEM_FN_NAME (fr30bf
,eorh
) },
5551 { FR30BF_INSN_EORB
, SEM_FN_NAME (fr30bf
,eorb
) },
5552 { FR30BF_INSN_BANDL
, SEM_FN_NAME (fr30bf
,bandl
) },
5553 { FR30BF_INSN_BORL
, SEM_FN_NAME (fr30bf
,borl
) },
5554 { FR30BF_INSN_BEORL
, SEM_FN_NAME (fr30bf
,beorl
) },
5555 { FR30BF_INSN_BANDH
, SEM_FN_NAME (fr30bf
,bandh
) },
5556 { FR30BF_INSN_BORH
, SEM_FN_NAME (fr30bf
,borh
) },
5557 { FR30BF_INSN_BEORH
, SEM_FN_NAME (fr30bf
,beorh
) },
5558 { FR30BF_INSN_BTSTL
, SEM_FN_NAME (fr30bf
,btstl
) },
5559 { FR30BF_INSN_BTSTH
, SEM_FN_NAME (fr30bf
,btsth
) },
5560 { FR30BF_INSN_MUL
, SEM_FN_NAME (fr30bf
,mul
) },
5561 { FR30BF_INSN_MULU
, SEM_FN_NAME (fr30bf
,mulu
) },
5562 { FR30BF_INSN_MULH
, SEM_FN_NAME (fr30bf
,mulh
) },
5563 { FR30BF_INSN_MULUH
, SEM_FN_NAME (fr30bf
,muluh
) },
5564 { FR30BF_INSN_DIV0S
, SEM_FN_NAME (fr30bf
,div0s
) },
5565 { FR30BF_INSN_DIV0U
, SEM_FN_NAME (fr30bf
,div0u
) },
5566 { FR30BF_INSN_DIV1
, SEM_FN_NAME (fr30bf
,div1
) },
5567 { FR30BF_INSN_DIV2
, SEM_FN_NAME (fr30bf
,div2
) },
5568 { FR30BF_INSN_DIV3
, SEM_FN_NAME (fr30bf
,div3
) },
5569 { FR30BF_INSN_DIV4S
, SEM_FN_NAME (fr30bf
,div4s
) },
5570 { FR30BF_INSN_LSL
, SEM_FN_NAME (fr30bf
,lsl
) },
5571 { FR30BF_INSN_LSLI
, SEM_FN_NAME (fr30bf
,lsli
) },
5572 { FR30BF_INSN_LSL2
, SEM_FN_NAME (fr30bf
,lsl2
) },
5573 { FR30BF_INSN_LSR
, SEM_FN_NAME (fr30bf
,lsr
) },
5574 { FR30BF_INSN_LSRI
, SEM_FN_NAME (fr30bf
,lsri
) },
5575 { FR30BF_INSN_LSR2
, SEM_FN_NAME (fr30bf
,lsr2
) },
5576 { FR30BF_INSN_ASR
, SEM_FN_NAME (fr30bf
,asr
) },
5577 { FR30BF_INSN_ASRI
, SEM_FN_NAME (fr30bf
,asri
) },
5578 { FR30BF_INSN_ASR2
, SEM_FN_NAME (fr30bf
,asr2
) },
5579 { FR30BF_INSN_LDI8
, SEM_FN_NAME (fr30bf
,ldi8
) },
5580 { FR30BF_INSN_LDI20
, SEM_FN_NAME (fr30bf
,ldi20
) },
5581 { FR30BF_INSN_LDI32
, SEM_FN_NAME (fr30bf
,ldi32
) },
5582 { FR30BF_INSN_LD
, SEM_FN_NAME (fr30bf
,ld
) },
5583 { FR30BF_INSN_LDUH
, SEM_FN_NAME (fr30bf
,lduh
) },
5584 { FR30BF_INSN_LDUB
, SEM_FN_NAME (fr30bf
,ldub
) },
5585 { FR30BF_INSN_LDR13
, SEM_FN_NAME (fr30bf
,ldr13
) },
5586 { FR30BF_INSN_LDR13UH
, SEM_FN_NAME (fr30bf
,ldr13uh
) },
5587 { FR30BF_INSN_LDR13UB
, SEM_FN_NAME (fr30bf
,ldr13ub
) },
5588 { FR30BF_INSN_LDR14
, SEM_FN_NAME (fr30bf
,ldr14
) },
5589 { FR30BF_INSN_LDR14UH
, SEM_FN_NAME (fr30bf
,ldr14uh
) },
5590 { FR30BF_INSN_LDR14UB
, SEM_FN_NAME (fr30bf
,ldr14ub
) },
5591 { FR30BF_INSN_LDR15
, SEM_FN_NAME (fr30bf
,ldr15
) },
5592 { FR30BF_INSN_LDR15GR
, SEM_FN_NAME (fr30bf
,ldr15gr
) },
5593 { FR30BF_INSN_LDR15DR
, SEM_FN_NAME (fr30bf
,ldr15dr
) },
5594 { FR30BF_INSN_LDR15PS
, SEM_FN_NAME (fr30bf
,ldr15ps
) },
5595 { FR30BF_INSN_ST
, SEM_FN_NAME (fr30bf
,st
) },
5596 { FR30BF_INSN_STH
, SEM_FN_NAME (fr30bf
,sth
) },
5597 { FR30BF_INSN_STB
, SEM_FN_NAME (fr30bf
,stb
) },
5598 { FR30BF_INSN_STR13
, SEM_FN_NAME (fr30bf
,str13
) },
5599 { FR30BF_INSN_STR13H
, SEM_FN_NAME (fr30bf
,str13h
) },
5600 { FR30BF_INSN_STR13B
, SEM_FN_NAME (fr30bf
,str13b
) },
5601 { FR30BF_INSN_STR14
, SEM_FN_NAME (fr30bf
,str14
) },
5602 { FR30BF_INSN_STR14H
, SEM_FN_NAME (fr30bf
,str14h
) },
5603 { FR30BF_INSN_STR14B
, SEM_FN_NAME (fr30bf
,str14b
) },
5604 { FR30BF_INSN_STR15
, SEM_FN_NAME (fr30bf
,str15
) },
5605 { FR30BF_INSN_STR15GR
, SEM_FN_NAME (fr30bf
,str15gr
) },
5606 { FR30BF_INSN_STR15DR
, SEM_FN_NAME (fr30bf
,str15dr
) },
5607 { FR30BF_INSN_STR15PS
, SEM_FN_NAME (fr30bf
,str15ps
) },
5608 { FR30BF_INSN_MOV
, SEM_FN_NAME (fr30bf
,mov
) },
5609 { FR30BF_INSN_MOVDR
, SEM_FN_NAME (fr30bf
,movdr
) },
5610 { FR30BF_INSN_MOVPS
, SEM_FN_NAME (fr30bf
,movps
) },
5611 { FR30BF_INSN_MOV2DR
, SEM_FN_NAME (fr30bf
,mov2dr
) },
5612 { FR30BF_INSN_MOV2PS
, SEM_FN_NAME (fr30bf
,mov2ps
) },
5613 { FR30BF_INSN_JMP
, SEM_FN_NAME (fr30bf
,jmp
) },
5614 { FR30BF_INSN_JMPD
, SEM_FN_NAME (fr30bf
,jmpd
) },
5615 { FR30BF_INSN_CALLR
, SEM_FN_NAME (fr30bf
,callr
) },
5616 { FR30BF_INSN_CALLRD
, SEM_FN_NAME (fr30bf
,callrd
) },
5617 { FR30BF_INSN_CALL
, SEM_FN_NAME (fr30bf
,call
) },
5618 { FR30BF_INSN_CALLD
, SEM_FN_NAME (fr30bf
,calld
) },
5619 { FR30BF_INSN_RET
, SEM_FN_NAME (fr30bf
,ret
) },
5620 { FR30BF_INSN_RET_D
, SEM_FN_NAME (fr30bf
,ret_d
) },
5621 { FR30BF_INSN_INT
, SEM_FN_NAME (fr30bf
,int) },
5622 { FR30BF_INSN_INTE
, SEM_FN_NAME (fr30bf
,inte
) },
5623 { FR30BF_INSN_RETI
, SEM_FN_NAME (fr30bf
,reti
) },
5624 { FR30BF_INSN_BRAD
, SEM_FN_NAME (fr30bf
,brad
) },
5625 { FR30BF_INSN_BRA
, SEM_FN_NAME (fr30bf
,bra
) },
5626 { FR30BF_INSN_BNOD
, SEM_FN_NAME (fr30bf
,bnod
) },
5627 { FR30BF_INSN_BNO
, SEM_FN_NAME (fr30bf
,bno
) },
5628 { FR30BF_INSN_BEQD
, SEM_FN_NAME (fr30bf
,beqd
) },
5629 { FR30BF_INSN_BEQ
, SEM_FN_NAME (fr30bf
,beq
) },
5630 { FR30BF_INSN_BNED
, SEM_FN_NAME (fr30bf
,bned
) },
5631 { FR30BF_INSN_BNE
, SEM_FN_NAME (fr30bf
,bne
) },
5632 { FR30BF_INSN_BCD
, SEM_FN_NAME (fr30bf
,bcd
) },
5633 { FR30BF_INSN_BC
, SEM_FN_NAME (fr30bf
,bc
) },
5634 { FR30BF_INSN_BNCD
, SEM_FN_NAME (fr30bf
,bncd
) },
5635 { FR30BF_INSN_BNC
, SEM_FN_NAME (fr30bf
,bnc
) },
5636 { FR30BF_INSN_BND
, SEM_FN_NAME (fr30bf
,bnd
) },
5637 { FR30BF_INSN_BN
, SEM_FN_NAME (fr30bf
,bn
) },
5638 { FR30BF_INSN_BPD
, SEM_FN_NAME (fr30bf
,bpd
) },
5639 { FR30BF_INSN_BP
, SEM_FN_NAME (fr30bf
,bp
) },
5640 { FR30BF_INSN_BVD
, SEM_FN_NAME (fr30bf
,bvd
) },
5641 { FR30BF_INSN_BV
, SEM_FN_NAME (fr30bf
,bv
) },
5642 { FR30BF_INSN_BNVD
, SEM_FN_NAME (fr30bf
,bnvd
) },
5643 { FR30BF_INSN_BNV
, SEM_FN_NAME (fr30bf
,bnv
) },
5644 { FR30BF_INSN_BLTD
, SEM_FN_NAME (fr30bf
,bltd
) },
5645 { FR30BF_INSN_BLT
, SEM_FN_NAME (fr30bf
,blt
) },
5646 { FR30BF_INSN_BGED
, SEM_FN_NAME (fr30bf
,bged
) },
5647 { FR30BF_INSN_BGE
, SEM_FN_NAME (fr30bf
,bge
) },
5648 { FR30BF_INSN_BLED
, SEM_FN_NAME (fr30bf
,bled
) },
5649 { FR30BF_INSN_BLE
, SEM_FN_NAME (fr30bf
,ble
) },
5650 { FR30BF_INSN_BGTD
, SEM_FN_NAME (fr30bf
,bgtd
) },
5651 { FR30BF_INSN_BGT
, SEM_FN_NAME (fr30bf
,bgt
) },
5652 { FR30BF_INSN_BLSD
, SEM_FN_NAME (fr30bf
,blsd
) },
5653 { FR30BF_INSN_BLS
, SEM_FN_NAME (fr30bf
,bls
) },
5654 { FR30BF_INSN_BHID
, SEM_FN_NAME (fr30bf
,bhid
) },
5655 { FR30BF_INSN_BHI
, SEM_FN_NAME (fr30bf
,bhi
) },
5656 { FR30BF_INSN_DMOVR13
, SEM_FN_NAME (fr30bf
,dmovr13
) },
5657 { FR30BF_INSN_DMOVR13H
, SEM_FN_NAME (fr30bf
,dmovr13h
) },
5658 { FR30BF_INSN_DMOVR13B
, SEM_FN_NAME (fr30bf
,dmovr13b
) },
5659 { FR30BF_INSN_DMOVR13PI
, SEM_FN_NAME (fr30bf
,dmovr13pi
) },
5660 { FR30BF_INSN_DMOVR13PIH
, SEM_FN_NAME (fr30bf
,dmovr13pih
) },
5661 { FR30BF_INSN_DMOVR13PIB
, SEM_FN_NAME (fr30bf
,dmovr13pib
) },
5662 { FR30BF_INSN_DMOVR15PI
, SEM_FN_NAME (fr30bf
,dmovr15pi
) },
5663 { FR30BF_INSN_DMOV2R13
, SEM_FN_NAME (fr30bf
,dmov2r13
) },
5664 { FR30BF_INSN_DMOV2R13H
, SEM_FN_NAME (fr30bf
,dmov2r13h
) },
5665 { FR30BF_INSN_DMOV2R13B
, SEM_FN_NAME (fr30bf
,dmov2r13b
) },
5666 { FR30BF_INSN_DMOV2R13PI
, SEM_FN_NAME (fr30bf
,dmov2r13pi
) },
5667 { FR30BF_INSN_DMOV2R13PIH
, SEM_FN_NAME (fr30bf
,dmov2r13pih
) },
5668 { FR30BF_INSN_DMOV2R13PIB
, SEM_FN_NAME (fr30bf
,dmov2r13pib
) },
5669 { FR30BF_INSN_DMOV2R15PD
, SEM_FN_NAME (fr30bf
,dmov2r15pd
) },
5670 { FR30BF_INSN_LDRES
, SEM_FN_NAME (fr30bf
,ldres
) },
5671 { FR30BF_INSN_STRES
, SEM_FN_NAME (fr30bf
,stres
) },
5672 { FR30BF_INSN_COPOP
, SEM_FN_NAME (fr30bf
,copop
) },
5673 { FR30BF_INSN_COPLD
, SEM_FN_NAME (fr30bf
,copld
) },
5674 { FR30BF_INSN_COPST
, SEM_FN_NAME (fr30bf
,copst
) },
5675 { FR30BF_INSN_COPSV
, SEM_FN_NAME (fr30bf
,copsv
) },
5676 { FR30BF_INSN_NOP
, SEM_FN_NAME (fr30bf
,nop
) },
5677 { FR30BF_INSN_ANDCCR
, SEM_FN_NAME (fr30bf
,andccr
) },
5678 { FR30BF_INSN_ORCCR
, SEM_FN_NAME (fr30bf
,orccr
) },
5679 { FR30BF_INSN_STILM
, SEM_FN_NAME (fr30bf
,stilm
) },
5680 { FR30BF_INSN_ADDSP
, SEM_FN_NAME (fr30bf
,addsp
) },
5681 { FR30BF_INSN_EXTSB
, SEM_FN_NAME (fr30bf
,extsb
) },
5682 { FR30BF_INSN_EXTUB
, SEM_FN_NAME (fr30bf
,extub
) },
5683 { FR30BF_INSN_EXTSH
, SEM_FN_NAME (fr30bf
,extsh
) },
5684 { FR30BF_INSN_EXTUH
, SEM_FN_NAME (fr30bf
,extuh
) },
5685 { FR30BF_INSN_LDM0
, SEM_FN_NAME (fr30bf
,ldm0
) },
5686 { FR30BF_INSN_LDM1
, SEM_FN_NAME (fr30bf
,ldm1
) },
5687 { FR30BF_INSN_STM0
, SEM_FN_NAME (fr30bf
,stm0
) },
5688 { FR30BF_INSN_STM1
, SEM_FN_NAME (fr30bf
,stm1
) },
5689 { FR30BF_INSN_ENTER
, SEM_FN_NAME (fr30bf
,enter
) },
5690 { FR30BF_INSN_LEAVE
, SEM_FN_NAME (fr30bf
,leave
) },
5691 { FR30BF_INSN_XCHB
, SEM_FN_NAME (fr30bf
,xchb
) },
5695 /* Add the semantic fns to IDESC_TABLE. */
5698 SEM_FN_NAME (fr30bf
,init_idesc_table
) (SIM_CPU
*current_cpu
)
5700 IDESC
*idesc_table
= CPU_IDESC (current_cpu
);
5701 const struct sem_fn_desc
*sf
;
5702 int mach_num
= MACH_NUM (CPU_MACH (current_cpu
));
5704 for (sf
= &sem_fns
[0]; sf
->fn
!= 0; ++sf
)
5706 const CGEN_INSN
*insn
= idesc_table
[sf
->index
].idata
;
5707 int valid_p
= (CGEN_INSN_VIRTUAL_P (insn
)
5708 || CGEN_INSN_MACH_HAS_P (insn
, mach_num
));
5711 idesc_table
[sf
->index
].sem_fast
= sf
->fn
;
5713 idesc_table
[sf
->index
].sem_fast
= SEM_FN_NAME (fr30bf
,x_invalid
);
5716 idesc_table
[sf
->index
].sem_full
= sf
->fn
;
5718 idesc_table
[sf
->index
].sem_full
= SEM_FN_NAME (fr30bf
,x_invalid
);