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 /* x-invalid: --invalid-- */
38 SEM_FN_NAME (fr30bf
,x_invalid
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
40 #define FLD(f) abuf->fields.fmt_empty.f
41 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
42 int UNUSED written
= 0;
43 IADDR UNUSED pc
= abuf
->addr
;
44 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
48 /* Update the recorded pc in the cpu state struct. */
51 sim_engine_invalid_insn (current_cpu
, pc
);
52 sim_io_error (CPU_STATE (current_cpu
), "invalid insn not handled\n");
60 /* x-after: --after-- */
63 SEM_FN_NAME (fr30bf
,x_after
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
65 #define FLD(f) abuf->fields.fmt_empty.f
66 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
67 int UNUSED written
= 0;
68 IADDR UNUSED pc
= abuf
->addr
;
69 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
72 #if WITH_SCACHE_PBB_FR30BF
73 fr30bf_pbb_after (current_cpu
, sem_arg
);
81 /* x-before: --before-- */
84 SEM_FN_NAME (fr30bf
,x_before
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
86 #define FLD(f) abuf->fields.fmt_empty.f
87 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
88 int UNUSED written
= 0;
89 IADDR UNUSED pc
= abuf
->addr
;
90 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
93 #if WITH_SCACHE_PBB_FR30BF
94 fr30bf_pbb_before (current_cpu
, sem_arg
);
102 /* x-cti-chain: --cti-chain-- */
105 SEM_FN_NAME (fr30bf
,x_cti_chain
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
107 #define FLD(f) abuf->fields.fmt_empty.f
108 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
109 int UNUSED written
= 0;
110 IADDR UNUSED pc
= abuf
->addr
;
111 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
114 #if WITH_SCACHE_PBB_FR30BF
116 vpc
= fr30bf_pbb_cti_chain (current_cpu
, sem_arg
,
117 pbb_br_npc_ptr
, pbb_br_npc
);
120 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
121 vpc
= fr30bf_pbb_cti_chain (current_cpu
, sem_arg
,
122 CPU_PBB_BR_NPC_PTR (current_cpu
),
123 CPU_PBB_BR_NPC (current_cpu
));
132 /* x-chain: --chain-- */
135 SEM_FN_NAME (fr30bf
,x_chain
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
137 #define FLD(f) abuf->fields.fmt_empty.f
138 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
139 int UNUSED written
= 0;
140 IADDR UNUSED pc
= abuf
->addr
;
141 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
144 #if WITH_SCACHE_PBB_FR30BF
145 vpc
= fr30bf_pbb_chain (current_cpu
, sem_arg
);
156 /* x-begin: --begin-- */
159 SEM_FN_NAME (fr30bf
,x_begin
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
161 #define FLD(f) abuf->fields.fmt_empty.f
162 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
163 int UNUSED written
= 0;
164 IADDR UNUSED pc
= abuf
->addr
;
165 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
168 #if WITH_SCACHE_PBB_FR30BF
170 /* In the switch case FAST_P is a constant, allowing several optimizations
171 in any called inline functions. */
172 vpc
= fr30bf_pbb_begin (current_cpu
, FAST_P
);
174 vpc
= fr30bf_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
183 /* add: add $Rj,$Ri */
186 SEM_FN_NAME (fr30bf
,add
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
188 #define FLD(f) abuf->fields.fmt_add.f
189 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
190 int UNUSED written
= 0;
191 IADDR UNUSED pc
= abuf
->addr
;
192 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
196 BI opval
= ADDOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
197 CPU (h_vbit
) = opval
;
198 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
201 BI opval
= ADDCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
202 CPU (h_cbit
) = opval
;
203 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
206 SI opval
= ADDSI (* FLD (i_Ri
), * FLD (i_Rj
));
207 * FLD (i_Ri
) = opval
;
208 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
212 BI opval
= EQSI (* FLD (i_Ri
), 0);
213 CPU (h_zbit
) = opval
;
214 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
217 BI opval
= LTSI (* FLD (i_Ri
), 0);
218 CPU (h_nbit
) = opval
;
219 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
228 /* addi: add $u4,$Ri */
231 SEM_FN_NAME (fr30bf
,addi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
233 #define FLD(f) abuf->fields.fmt_addi.f
234 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
235 int UNUSED written
= 0;
236 IADDR UNUSED pc
= abuf
->addr
;
237 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
241 BI opval
= ADDOFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
242 CPU (h_vbit
) = opval
;
243 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
246 BI opval
= ADDCFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
247 CPU (h_cbit
) = opval
;
248 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
251 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_u4
));
252 * FLD (i_Ri
) = opval
;
253 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
257 BI opval
= EQSI (* FLD (i_Ri
), 0);
258 CPU (h_zbit
) = opval
;
259 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
262 BI opval
= LTSI (* FLD (i_Ri
), 0);
263 CPU (h_nbit
) = opval
;
264 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
273 /* add2: add2 $m4,$Ri */
276 SEM_FN_NAME (fr30bf
,add2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
278 #define FLD(f) abuf->fields.fmt_add2.f
279 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
280 int UNUSED written
= 0;
281 IADDR UNUSED pc
= abuf
->addr
;
282 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
286 BI opval
= ADDOFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
287 CPU (h_vbit
) = opval
;
288 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
291 BI opval
= ADDCFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
292 CPU (h_cbit
) = opval
;
293 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
296 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_m4
));
297 * FLD (i_Ri
) = opval
;
298 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
302 BI opval
= EQSI (* FLD (i_Ri
), 0);
303 CPU (h_zbit
) = opval
;
304 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
307 BI opval
= LTSI (* FLD (i_Ri
), 0);
308 CPU (h_nbit
) = opval
;
309 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
318 /* addc: addc $Rj,$Ri */
321 SEM_FN_NAME (fr30bf
,addc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
323 #define FLD(f) abuf->fields.fmt_addc.f
324 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
325 int UNUSED written
= 0;
326 IADDR UNUSED pc
= abuf
->addr
;
327 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
331 tmp_tmp
= ADDCSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
333 BI opval
= ADDOFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
334 CPU (h_vbit
) = opval
;
335 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
338 BI opval
= ADDCFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
339 CPU (h_cbit
) = opval
;
340 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
344 * FLD (i_Ri
) = opval
;
345 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
349 BI opval
= EQSI (* FLD (i_Ri
), 0);
350 CPU (h_zbit
) = opval
;
351 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
354 BI opval
= LTSI (* FLD (i_Ri
), 0);
355 CPU (h_nbit
) = opval
;
356 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
365 /* addn: addn $Rj,$Ri */
368 SEM_FN_NAME (fr30bf
,addn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
370 #define FLD(f) abuf->fields.fmt_addn.f
371 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
372 int UNUSED written
= 0;
373 IADDR UNUSED pc
= abuf
->addr
;
374 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
377 SI opval
= ADDSI (* FLD (i_Ri
), * FLD (i_Rj
));
378 * FLD (i_Ri
) = opval
;
379 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
386 /* addni: addn $u4,$Ri */
389 SEM_FN_NAME (fr30bf
,addni
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
391 #define FLD(f) abuf->fields.fmt_addni.f
392 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
393 int UNUSED written
= 0;
394 IADDR UNUSED pc
= abuf
->addr
;
395 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
398 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_u4
));
399 * FLD (i_Ri
) = opval
;
400 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
407 /* addn2: addn2 $m4,$Ri */
410 SEM_FN_NAME (fr30bf
,addn2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
412 #define FLD(f) abuf->fields.fmt_addn2.f
413 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
414 int UNUSED written
= 0;
415 IADDR UNUSED pc
= abuf
->addr
;
416 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
419 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_m4
));
420 * FLD (i_Ri
) = opval
;
421 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
428 /* sub: sub $Rj,$Ri */
431 SEM_FN_NAME (fr30bf
,sub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
433 #define FLD(f) abuf->fields.fmt_add.f
434 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
435 int UNUSED written
= 0;
436 IADDR UNUSED pc
= abuf
->addr
;
437 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
441 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
442 CPU (h_vbit
) = opval
;
443 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
446 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
447 CPU (h_cbit
) = opval
;
448 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
451 SI opval
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
452 * FLD (i_Ri
) = opval
;
453 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
457 BI opval
= EQSI (* FLD (i_Ri
), 0);
458 CPU (h_zbit
) = opval
;
459 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
462 BI opval
= LTSI (* FLD (i_Ri
), 0);
463 CPU (h_nbit
) = opval
;
464 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
473 /* subc: subc $Rj,$Ri */
476 SEM_FN_NAME (fr30bf
,subc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
478 #define FLD(f) abuf->fields.fmt_addc.f
479 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
480 int UNUSED written
= 0;
481 IADDR UNUSED pc
= abuf
->addr
;
482 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
486 tmp_tmp
= SUBCSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
488 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
489 CPU (h_vbit
) = opval
;
490 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
493 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
494 CPU (h_cbit
) = opval
;
495 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
499 * FLD (i_Ri
) = opval
;
500 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
504 BI opval
= EQSI (* FLD (i_Ri
), 0);
505 CPU (h_zbit
) = opval
;
506 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
509 BI opval
= LTSI (* FLD (i_Ri
), 0);
510 CPU (h_nbit
) = opval
;
511 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
520 /* subn: subn $Rj,$Ri */
523 SEM_FN_NAME (fr30bf
,subn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
525 #define FLD(f) abuf->fields.fmt_addn.f
526 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
527 int UNUSED written
= 0;
528 IADDR UNUSED pc
= abuf
->addr
;
529 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
532 SI opval
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
533 * FLD (i_Ri
) = opval
;
534 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
541 /* cmp: cmp $Rj,$Ri */
544 SEM_FN_NAME (fr30bf
,cmp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
546 #define FLD(f) abuf->fields.fmt_cmp.f
547 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
548 int UNUSED written
= 0;
549 IADDR UNUSED pc
= abuf
->addr
;
550 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
555 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
556 CPU (h_vbit
) = opval
;
557 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
560 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
561 CPU (h_cbit
) = opval
;
562 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
564 tmp_tmp1
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
567 BI opval
= EQSI (tmp_tmp1
, 0);
568 CPU (h_zbit
) = opval
;
569 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
572 BI opval
= LTSI (tmp_tmp1
, 0);
573 CPU (h_nbit
) = opval
;
574 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
583 /* cmpi: cmp $u4,$Ri */
586 SEM_FN_NAME (fr30bf
,cmpi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
588 #define FLD(f) abuf->fields.fmt_cmpi.f
589 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
590 int UNUSED written
= 0;
591 IADDR UNUSED pc
= abuf
->addr
;
592 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
597 BI opval
= SUBOFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
598 CPU (h_vbit
) = opval
;
599 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
602 BI opval
= SUBCFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
603 CPU (h_cbit
) = opval
;
604 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
606 tmp_tmp1
= SUBSI (* FLD (i_Ri
), FLD (f_u4
));
609 BI opval
= EQSI (tmp_tmp1
, 0);
610 CPU (h_zbit
) = opval
;
611 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
614 BI opval
= LTSI (tmp_tmp1
, 0);
615 CPU (h_nbit
) = opval
;
616 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
625 /* cmp2: cmp2 $m4,$Ri */
628 SEM_FN_NAME (fr30bf
,cmp2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
630 #define FLD(f) abuf->fields.fmt_cmp2.f
631 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
632 int UNUSED written
= 0;
633 IADDR UNUSED pc
= abuf
->addr
;
634 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
639 BI opval
= SUBOFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
640 CPU (h_vbit
) = opval
;
641 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
644 BI opval
= SUBCFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
645 CPU (h_cbit
) = opval
;
646 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
648 tmp_tmp1
= SUBSI (* FLD (i_Ri
), FLD (f_m4
));
651 BI opval
= EQSI (tmp_tmp1
, 0);
652 CPU (h_zbit
) = opval
;
653 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
656 BI opval
= LTSI (tmp_tmp1
, 0);
657 CPU (h_nbit
) = opval
;
658 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
667 /* and: and $Rj,$Ri */
670 SEM_FN_NAME (fr30bf
,and) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
672 #define FLD(f) abuf->fields.fmt_and.f
673 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
674 int UNUSED written
= 0;
675 IADDR UNUSED pc
= abuf
->addr
;
676 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
680 SI opval
= ANDSI (* FLD (i_Ri
), * FLD (i_Rj
));
681 * FLD (i_Ri
) = opval
;
682 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
686 BI opval
= EQSI (* FLD (i_Ri
), 0);
687 CPU (h_zbit
) = opval
;
688 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
691 BI opval
= LTSI (* FLD (i_Ri
), 0);
692 CPU (h_nbit
) = opval
;
693 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
705 SEM_FN_NAME (fr30bf
,or) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
707 #define FLD(f) abuf->fields.fmt_and.f
708 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
709 int UNUSED written
= 0;
710 IADDR UNUSED pc
= abuf
->addr
;
711 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
715 SI opval
= ORSI (* FLD (i_Ri
), * FLD (i_Rj
));
716 * FLD (i_Ri
) = opval
;
717 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
721 BI opval
= EQSI (* FLD (i_Ri
), 0);
722 CPU (h_zbit
) = opval
;
723 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
726 BI opval
= LTSI (* FLD (i_Ri
), 0);
727 CPU (h_nbit
) = opval
;
728 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
737 /* eor: eor $Rj,$Ri */
740 SEM_FN_NAME (fr30bf
,eor
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
742 #define FLD(f) abuf->fields.fmt_and.f
743 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
744 int UNUSED written
= 0;
745 IADDR UNUSED pc
= abuf
->addr
;
746 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
750 SI opval
= XORSI (* FLD (i_Ri
), * FLD (i_Rj
));
751 * FLD (i_Ri
) = opval
;
752 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
756 BI opval
= EQSI (* FLD (i_Ri
), 0);
757 CPU (h_zbit
) = opval
;
758 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
761 BI opval
= LTSI (* FLD (i_Ri
), 0);
762 CPU (h_nbit
) = opval
;
763 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
772 /* andm: and $Rj,@$Ri */
775 SEM_FN_NAME (fr30bf
,andm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
777 #define FLD(f) abuf->fields.fmt_andm.f
778 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
779 int UNUSED written
= 0;
780 IADDR UNUSED pc
= abuf
->addr
;
781 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
785 tmp_tmp
= ANDSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
788 BI opval
= EQSI (tmp_tmp
, 0);
789 CPU (h_zbit
) = opval
;
790 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
793 BI opval
= LTSI (tmp_tmp
, 0);
794 CPU (h_nbit
) = opval
;
795 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
800 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
801 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
809 /* andh: andh $Rj,@$Ri */
812 SEM_FN_NAME (fr30bf
,andh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
814 #define FLD(f) abuf->fields.fmt_andh.f
815 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
816 int UNUSED written
= 0;
817 IADDR UNUSED pc
= abuf
->addr
;
818 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
822 tmp_tmp
= ANDHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
825 BI opval
= EQHI (tmp_tmp
, 0);
826 CPU (h_zbit
) = opval
;
827 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
830 BI opval
= LTHI (tmp_tmp
, 0);
831 CPU (h_nbit
) = opval
;
832 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
837 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
838 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
846 /* andb: andb $Rj,@$Ri */
849 SEM_FN_NAME (fr30bf
,andb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
851 #define FLD(f) abuf->fields.fmt_andb.f
852 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
853 int UNUSED written
= 0;
854 IADDR UNUSED pc
= abuf
->addr
;
855 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
859 tmp_tmp
= ANDQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
862 BI opval
= EQQI (tmp_tmp
, 0);
863 CPU (h_zbit
) = opval
;
864 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
867 BI opval
= LTQI (tmp_tmp
, 0);
868 CPU (h_nbit
) = opval
;
869 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
874 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
875 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
883 /* orm: or $Rj,@$Ri */
886 SEM_FN_NAME (fr30bf
,orm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
888 #define FLD(f) abuf->fields.fmt_andm.f
889 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
890 int UNUSED written
= 0;
891 IADDR UNUSED pc
= abuf
->addr
;
892 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
896 tmp_tmp
= ORSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
899 BI opval
= EQSI (tmp_tmp
, 0);
900 CPU (h_zbit
) = opval
;
901 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
904 BI opval
= LTSI (tmp_tmp
, 0);
905 CPU (h_nbit
) = opval
;
906 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
911 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
912 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
920 /* orh: orh $Rj,@$Ri */
923 SEM_FN_NAME (fr30bf
,orh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
925 #define FLD(f) abuf->fields.fmt_andh.f
926 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
927 int UNUSED written
= 0;
928 IADDR UNUSED pc
= abuf
->addr
;
929 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
933 tmp_tmp
= ORHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
936 BI opval
= EQHI (tmp_tmp
, 0);
937 CPU (h_zbit
) = opval
;
938 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
941 BI opval
= LTHI (tmp_tmp
, 0);
942 CPU (h_nbit
) = opval
;
943 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
948 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
949 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
957 /* orb: orb $Rj,@$Ri */
960 SEM_FN_NAME (fr30bf
,orb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
962 #define FLD(f) abuf->fields.fmt_andb.f
963 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
964 int UNUSED written
= 0;
965 IADDR UNUSED pc
= abuf
->addr
;
966 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
970 tmp_tmp
= ORQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
973 BI opval
= EQQI (tmp_tmp
, 0);
974 CPU (h_zbit
) = opval
;
975 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
978 BI opval
= LTQI (tmp_tmp
, 0);
979 CPU (h_nbit
) = opval
;
980 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
985 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
986 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
994 /* eorm: eor $Rj,@$Ri */
997 SEM_FN_NAME (fr30bf
,eorm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
999 #define FLD(f) abuf->fields.fmt_andm.f
1000 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1001 int UNUSED written
= 0;
1002 IADDR UNUSED pc
= abuf
->addr
;
1003 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1007 tmp_tmp
= XORSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1010 BI opval
= EQSI (tmp_tmp
, 0);
1011 CPU (h_zbit
) = opval
;
1012 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1015 BI opval
= LTSI (tmp_tmp
, 0);
1016 CPU (h_nbit
) = opval
;
1017 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1022 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1023 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1031 /* eorh: eorh $Rj,@$Ri */
1034 SEM_FN_NAME (fr30bf
,eorh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1036 #define FLD(f) abuf->fields.fmt_andh.f
1037 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1038 int UNUSED written
= 0;
1039 IADDR UNUSED pc
= abuf
->addr
;
1040 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1044 tmp_tmp
= XORHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1047 BI opval
= EQHI (tmp_tmp
, 0);
1048 CPU (h_zbit
) = opval
;
1049 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1052 BI opval
= LTHI (tmp_tmp
, 0);
1053 CPU (h_nbit
) = opval
;
1054 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1059 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1060 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1068 /* eorb: eorb $Rj,@$Ri */
1071 SEM_FN_NAME (fr30bf
,eorb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1073 #define FLD(f) abuf->fields.fmt_andb.f
1074 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1075 int UNUSED written
= 0;
1076 IADDR UNUSED pc
= abuf
->addr
;
1077 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1081 tmp_tmp
= XORQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1084 BI opval
= EQQI (tmp_tmp
, 0);
1085 CPU (h_zbit
) = opval
;
1086 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1089 BI opval
= LTQI (tmp_tmp
, 0);
1090 CPU (h_nbit
) = opval
;
1091 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1096 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1097 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1105 /* bandl: bandl $u4,@$Ri */
1108 SEM_FN_NAME (fr30bf
,bandl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1110 #define FLD(f) abuf->fields.fmt_bandl.f
1111 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1112 int UNUSED written
= 0;
1113 IADDR UNUSED pc
= abuf
->addr
;
1114 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1117 QI opval
= ANDQI (ORQI (FLD (f_u4
), 240), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1118 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1119 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1126 /* borl: borl $u4,@$Ri */
1129 SEM_FN_NAME (fr30bf
,borl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1131 #define FLD(f) abuf->fields.fmt_bandl.f
1132 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1133 int UNUSED written
= 0;
1134 IADDR UNUSED pc
= abuf
->addr
;
1135 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1138 QI opval
= ORQI (FLD (f_u4
), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1139 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1140 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1147 /* beorl: beorl $u4,@$Ri */
1150 SEM_FN_NAME (fr30bf
,beorl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1152 #define FLD(f) abuf->fields.fmt_bandl.f
1153 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1154 int UNUSED written
= 0;
1155 IADDR UNUSED pc
= abuf
->addr
;
1156 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1159 QI opval
= XORQI (FLD (f_u4
), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1160 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1161 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1168 /* bandh: bandh $u4,@$Ri */
1171 SEM_FN_NAME (fr30bf
,bandh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1173 #define FLD(f) abuf->fields.fmt_bandl.f
1174 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1175 int UNUSED written
= 0;
1176 IADDR UNUSED pc
= abuf
->addr
;
1177 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1180 QI opval
= ANDQI (ORQI (SLLQI (FLD (f_u4
), 4), 15), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1181 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1182 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1189 /* borh: borh $u4,@$Ri */
1192 SEM_FN_NAME (fr30bf
,borh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1194 #define FLD(f) abuf->fields.fmt_bandl.f
1195 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1196 int UNUSED written
= 0;
1197 IADDR UNUSED pc
= abuf
->addr
;
1198 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1201 QI opval
= ORQI (SLLQI (FLD (f_u4
), 4), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1202 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1203 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1210 /* beorh: beorh $u4,@$Ri */
1213 SEM_FN_NAME (fr30bf
,beorh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1215 #define FLD(f) abuf->fields.fmt_bandl.f
1216 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1217 int UNUSED written
= 0;
1218 IADDR UNUSED pc
= abuf
->addr
;
1219 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1222 QI opval
= XORQI (SLLQI (FLD (f_u4
), 4), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1223 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1224 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1231 /* btstl: btstl $u4,@$Ri */
1234 SEM_FN_NAME (fr30bf
,btstl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1236 #define FLD(f) abuf->fields.fmt_btstl.f
1237 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1238 int UNUSED written
= 0;
1239 IADDR UNUSED pc
= abuf
->addr
;
1240 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1244 tmp_tmp
= ANDQI (FLD (f_u4
), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1246 BI opval
= EQQI (tmp_tmp
, 0);
1247 CPU (h_zbit
) = opval
;
1248 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1252 CPU (h_nbit
) = opval
;
1253 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1261 /* btsth: btsth $u4,@$Ri */
1264 SEM_FN_NAME (fr30bf
,btsth
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1266 #define FLD(f) abuf->fields.fmt_btstl.f
1267 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1268 int UNUSED written
= 0;
1269 IADDR UNUSED pc
= abuf
->addr
;
1270 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1274 tmp_tmp
= ANDQI (SLLQI (FLD (f_u4
), 4), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1276 BI opval
= EQQI (tmp_tmp
, 0);
1277 CPU (h_zbit
) = opval
;
1278 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1281 BI opval
= LTQI (tmp_tmp
, 0);
1282 CPU (h_nbit
) = opval
;
1283 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1291 /* mul: mul $Rj,$Ri */
1294 SEM_FN_NAME (fr30bf
,mul
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1296 #define FLD(f) abuf->fields.fmt_mul.f
1297 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1298 int UNUSED written
= 0;
1299 IADDR UNUSED pc
= abuf
->addr
;
1300 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1304 tmp_tmp
= MULDI (EXTSIDI (* FLD (i_Rj
)), EXTSIDI (* FLD (i_Ri
)));
1306 SI opval
= TRUNCDISI (tmp_tmp
);
1307 SET_H_DR (((UINT
) 5), opval
);
1308 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1311 SI opval
= TRUNCDISI (SRLDI (tmp_tmp
, 32));
1312 SET_H_DR (((UINT
) 4), opval
);
1313 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1316 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1317 CPU (h_nbit
) = opval
;
1318 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1321 BI opval
= EQDI (tmp_tmp
, MAKEDI (0, 0));
1322 CPU (h_zbit
) = opval
;
1323 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1326 BI opval
= ORIF (GTDI (tmp_tmp
, MAKEDI (0, 2147483647)), LTDI (tmp_tmp
, NEGDI (MAKEDI (0, 0x80000000))));
1327 CPU (h_vbit
) = opval
;
1328 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1336 /* mulu: mulu $Rj,$Ri */
1339 SEM_FN_NAME (fr30bf
,mulu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1341 #define FLD(f) abuf->fields.fmt_mulu.f
1342 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1343 int UNUSED written
= 0;
1344 IADDR UNUSED pc
= abuf
->addr
;
1345 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1349 tmp_tmp
= MULDI (ZEXTSIDI (* FLD (i_Rj
)), ZEXTSIDI (* FLD (i_Ri
)));
1351 SI opval
= TRUNCDISI (tmp_tmp
);
1352 SET_H_DR (((UINT
) 5), opval
);
1353 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1356 SI opval
= TRUNCDISI (SRLDI (tmp_tmp
, 32));
1357 SET_H_DR (((UINT
) 4), opval
);
1358 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1361 BI opval
= LTSI (GET_H_DR (((UINT
) 4)), 0);
1362 CPU (h_nbit
) = opval
;
1363 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1366 BI opval
= EQSI (GET_H_DR (((UINT
) 5)), 0);
1367 CPU (h_zbit
) = opval
;
1368 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1371 BI opval
= NESI (GET_H_DR (((UINT
) 4)), 0);
1372 CPU (h_vbit
) = opval
;
1373 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1381 /* mulh: mulh $Rj,$Ri */
1384 SEM_FN_NAME (fr30bf
,mulh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1386 #define FLD(f) abuf->fields.fmt_mulh.f
1387 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1388 int UNUSED written
= 0;
1389 IADDR UNUSED pc
= abuf
->addr
;
1390 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1394 SI opval
= MULHI (TRUNCSIHI (* FLD (i_Rj
)), TRUNCSIHI (* FLD (i_Ri
)));
1395 SET_H_DR (((UINT
) 5), opval
);
1396 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1399 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1400 CPU (h_nbit
) = opval
;
1401 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1404 BI opval
= GESI (GET_H_DR (((UINT
) 5)), 0);
1405 CPU (h_zbit
) = opval
;
1406 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1414 /* muluh: muluh $Rj,$Ri */
1417 SEM_FN_NAME (fr30bf
,muluh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1419 #define FLD(f) abuf->fields.fmt_mulh.f
1420 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1421 int UNUSED written
= 0;
1422 IADDR UNUSED pc
= abuf
->addr
;
1423 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1427 SI opval
= MULSI (ANDSI (* FLD (i_Rj
), 65535), ANDSI (* FLD (i_Ri
), 65535));
1428 SET_H_DR (((UINT
) 5), opval
);
1429 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1432 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1433 CPU (h_nbit
) = opval
;
1434 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1437 BI opval
= GESI (GET_H_DR (((UINT
) 5)), 0);
1438 CPU (h_zbit
) = opval
;
1439 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1447 /* div0s: div0s $Ri */
1450 SEM_FN_NAME (fr30bf
,div0s
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1452 #define FLD(f) abuf->fields.fmt_div0s.f
1453 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1454 int UNUSED written
= 0;
1455 IADDR UNUSED pc
= abuf
->addr
;
1456 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1460 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1461 CPU (h_d0bit
) = opval
;
1462 TRACE_RESULT (current_cpu
, abuf
, "d0bit", 'x', opval
);
1465 BI opval
= XORBI (CPU (h_d0bit
), LTSI (* FLD (i_Ri
), 0));
1466 CPU (h_d1bit
) = opval
;
1467 TRACE_RESULT (current_cpu
, abuf
, "d1bit", 'x', opval
);
1469 if (NEBI (CPU (h_d0bit
), 0)) {
1471 SI opval
= 0xffffffff;
1472 SET_H_DR (((UINT
) 4), opval
);
1473 written
|= (1 << 5);
1474 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1479 SET_H_DR (((UINT
) 4), opval
);
1480 written
|= (1 << 5);
1481 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1486 abuf
->written
= written
;
1491 /* div0u: div0u $Ri */
1494 SEM_FN_NAME (fr30bf
,div0u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1496 #define FLD(f) abuf->fields.fmt_div0u.f
1497 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1498 int UNUSED written
= 0;
1499 IADDR UNUSED pc
= abuf
->addr
;
1500 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1505 CPU (h_d0bit
) = opval
;
1506 TRACE_RESULT (current_cpu
, abuf
, "d0bit", 'x', opval
);
1510 CPU (h_d1bit
) = opval
;
1511 TRACE_RESULT (current_cpu
, abuf
, "d1bit", 'x', opval
);
1515 SET_H_DR (((UINT
) 4), opval
);
1516 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1524 /* div1: div1 $Ri */
1527 SEM_FN_NAME (fr30bf
,div1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1529 #define FLD(f) abuf->fields.fmt_div1.f
1530 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1531 int UNUSED written
= 0;
1532 IADDR UNUSED pc
= abuf
->addr
;
1533 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1538 SI opval
= SLLSI (GET_H_DR (((UINT
) 4)), 1);
1539 SET_H_DR (((UINT
) 4), opval
);
1540 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1542 if (LTSI (GET_H_DR (((UINT
) 5)), 0)) {
1544 SI opval
= ADDSI (GET_H_DR (((UINT
) 4)), 1);
1545 SET_H_DR (((UINT
) 4), opval
);
1546 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1550 SI opval
= SLLSI (GET_H_DR (((UINT
) 5)), 1);
1551 SET_H_DR (((UINT
) 5), opval
);
1552 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1554 if (EQBI (CPU (h_d1bit
), 1)) {
1556 tmp_tmp
= ADDSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1558 BI opval
= ADDCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1559 CPU (h_cbit
) = opval
;
1560 written
|= (1 << 6);
1561 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1566 tmp_tmp
= SUBSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1568 BI opval
= SUBCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1569 CPU (h_cbit
) = opval
;
1570 written
|= (1 << 6);
1571 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1575 if (NOTBI (XORBI (XORBI (CPU (h_d0bit
), CPU (h_d1bit
)), CPU (h_cbit
)))) {
1579 SET_H_DR (((UINT
) 4), opval
);
1580 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1583 SI opval
= ORSI (GET_H_DR (((UINT
) 5)), 1);
1584 SET_H_DR (((UINT
) 5), opval
);
1585 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1590 BI opval
= EQSI (GET_H_DR (((UINT
) 4)), 0);
1591 CPU (h_zbit
) = opval
;
1592 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1596 abuf
->written
= written
;
1601 /* div2: div2 $Ri */
1604 SEM_FN_NAME (fr30bf
,div2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1606 #define FLD(f) abuf->fields.fmt_div2.f
1607 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1608 int UNUSED written
= 0;
1609 IADDR UNUSED pc
= abuf
->addr
;
1610 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1614 if (EQBI (CPU (h_d1bit
), 1)) {
1616 tmp_tmp
= ADDSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1618 BI opval
= ADDCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1619 CPU (h_cbit
) = opval
;
1620 written
|= (1 << 3);
1621 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1626 tmp_tmp
= SUBSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1628 BI opval
= SUBCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1629 CPU (h_cbit
) = opval
;
1630 written
|= (1 << 3);
1631 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1635 if (EQSI (tmp_tmp
, 0)) {
1639 CPU (h_zbit
) = opval
;
1640 written
|= (1 << 5);
1641 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1645 SET_H_DR (((UINT
) 4), opval
);
1646 written
|= (1 << 4);
1647 TRACE_RESULT (current_cpu
, abuf
, "dr-4", 'x', opval
);
1653 CPU (h_zbit
) = opval
;
1654 written
|= (1 << 5);
1655 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1660 abuf
->written
= written
;
1668 SEM_FN_NAME (fr30bf
,div3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1670 #define FLD(f) abuf->fields.fmt_div3.f
1671 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1672 int UNUSED written
= 0;
1673 IADDR UNUSED pc
= abuf
->addr
;
1674 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1676 if (EQBI (CPU (h_zbit
), 1)) {
1678 SI opval
= ADDSI (GET_H_DR (((UINT
) 5)), 1);
1679 SET_H_DR (((UINT
) 5), opval
);
1680 written
|= (1 << 2);
1681 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1685 abuf
->written
= written
;
1693 SEM_FN_NAME (fr30bf
,div4s
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1695 #define FLD(f) abuf->fields.fmt_div4s.f
1696 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1697 int UNUSED written
= 0;
1698 IADDR UNUSED pc
= abuf
->addr
;
1699 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1701 if (EQBI (CPU (h_d1bit
), 1)) {
1703 SI opval
= NEGSI (GET_H_DR (((UINT
) 5)));
1704 SET_H_DR (((UINT
) 5), opval
);
1705 written
|= (1 << 2);
1706 TRACE_RESULT (current_cpu
, abuf
, "dr-5", 'x', opval
);
1710 abuf
->written
= written
;
1715 /* lsl: lsl $Rj,$Ri */
1718 SEM_FN_NAME (fr30bf
,lsl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1720 #define FLD(f) abuf->fields.fmt_lsl.f
1721 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1722 int UNUSED written
= 0;
1723 IADDR UNUSED pc
= abuf
->addr
;
1724 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1728 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
1729 if (NESI (tmp_shift
, 0)) {
1732 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1733 CPU (h_cbit
) = opval
;
1734 written
|= (1 << 3);
1735 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1738 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1739 * FLD (i_Ri
) = opval
;
1740 written
|= (1 << 2);
1741 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1747 CPU (h_cbit
) = opval
;
1748 written
|= (1 << 3);
1749 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1753 BI opval
= LTSI (* FLD (i_Ri
), 0);
1754 CPU (h_nbit
) = opval
;
1755 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1758 BI opval
= EQSI (* FLD (i_Ri
), 0);
1759 CPU (h_zbit
) = opval
;
1760 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1764 abuf
->written
= written
;
1769 /* lsli: lsl $u4,$Ri */
1772 SEM_FN_NAME (fr30bf
,lsli
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1774 #define FLD(f) abuf->fields.fmt_lsli.f
1775 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1776 int UNUSED written
= 0;
1777 IADDR UNUSED pc
= abuf
->addr
;
1778 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1782 tmp_shift
= FLD (f_u4
);
1783 if (NESI (tmp_shift
, 0)) {
1786 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1787 CPU (h_cbit
) = opval
;
1788 written
|= (1 << 3);
1789 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1792 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1793 * FLD (i_Ri
) = opval
;
1794 written
|= (1 << 2);
1795 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1801 CPU (h_cbit
) = opval
;
1802 written
|= (1 << 3);
1803 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1807 BI opval
= LTSI (* FLD (i_Ri
), 0);
1808 CPU (h_nbit
) = opval
;
1809 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1812 BI opval
= EQSI (* FLD (i_Ri
), 0);
1813 CPU (h_zbit
) = opval
;
1814 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1818 abuf
->written
= written
;
1823 /* lsl2: lsl2 $u4,$Ri */
1826 SEM_FN_NAME (fr30bf
,lsl2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1828 #define FLD(f) abuf->fields.fmt_lsli.f
1829 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1830 int UNUSED written
= 0;
1831 IADDR UNUSED pc
= abuf
->addr
;
1832 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1836 tmp_shift
= ADDSI (FLD (f_u4
), 16);
1837 if (NESI (tmp_shift
, 0)) {
1840 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1841 CPU (h_cbit
) = opval
;
1842 written
|= (1 << 3);
1843 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1846 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1847 * FLD (i_Ri
) = opval
;
1848 written
|= (1 << 2);
1849 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1855 CPU (h_cbit
) = opval
;
1856 written
|= (1 << 3);
1857 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1861 BI opval
= LTSI (* FLD (i_Ri
), 0);
1862 CPU (h_nbit
) = opval
;
1863 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1866 BI opval
= EQSI (* FLD (i_Ri
), 0);
1867 CPU (h_zbit
) = opval
;
1868 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1872 abuf
->written
= written
;
1877 /* lsr: lsr $Rj,$Ri */
1880 SEM_FN_NAME (fr30bf
,lsr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1882 #define FLD(f) abuf->fields.fmt_lsl.f
1883 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1884 int UNUSED written
= 0;
1885 IADDR UNUSED pc
= abuf
->addr
;
1886 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1890 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
1891 if (NESI (tmp_shift
, 0)) {
1894 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
1895 CPU (h_cbit
) = opval
;
1896 written
|= (1 << 3);
1897 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1900 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
1901 * FLD (i_Ri
) = opval
;
1902 written
|= (1 << 2);
1903 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1909 CPU (h_cbit
) = opval
;
1910 written
|= (1 << 3);
1911 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1915 BI opval
= LTSI (* FLD (i_Ri
), 0);
1916 CPU (h_nbit
) = opval
;
1917 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1920 BI opval
= EQSI (* FLD (i_Ri
), 0);
1921 CPU (h_zbit
) = opval
;
1922 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1926 abuf
->written
= written
;
1931 /* lsri: lsr $u4,$Ri */
1934 SEM_FN_NAME (fr30bf
,lsri
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1936 #define FLD(f) abuf->fields.fmt_lsli.f
1937 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1938 int UNUSED written
= 0;
1939 IADDR UNUSED pc
= abuf
->addr
;
1940 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1944 tmp_shift
= FLD (f_u4
);
1945 if (NESI (tmp_shift
, 0)) {
1948 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
1949 CPU (h_cbit
) = opval
;
1950 written
|= (1 << 3);
1951 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1954 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
1955 * FLD (i_Ri
) = opval
;
1956 written
|= (1 << 2);
1957 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
1963 CPU (h_cbit
) = opval
;
1964 written
|= (1 << 3);
1965 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1969 BI opval
= LTSI (* FLD (i_Ri
), 0);
1970 CPU (h_nbit
) = opval
;
1971 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1974 BI opval
= EQSI (* FLD (i_Ri
), 0);
1975 CPU (h_zbit
) = opval
;
1976 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1980 abuf
->written
= written
;
1985 /* lsr2: lsr2 $u4,$Ri */
1988 SEM_FN_NAME (fr30bf
,lsr2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1990 #define FLD(f) abuf->fields.fmt_lsli.f
1991 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1992 int UNUSED written
= 0;
1993 IADDR UNUSED pc
= abuf
->addr
;
1994 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1998 tmp_shift
= ADDSI (FLD (f_u4
), 16);
1999 if (NESI (tmp_shift
, 0)) {
2002 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2003 CPU (h_cbit
) = opval
;
2004 written
|= (1 << 3);
2005 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2008 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
2009 * FLD (i_Ri
) = opval
;
2010 written
|= (1 << 2);
2011 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2017 CPU (h_cbit
) = opval
;
2018 written
|= (1 << 3);
2019 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2023 BI opval
= LTSI (* FLD (i_Ri
), 0);
2024 CPU (h_nbit
) = opval
;
2025 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2028 BI opval
= EQSI (* FLD (i_Ri
), 0);
2029 CPU (h_zbit
) = opval
;
2030 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2034 abuf
->written
= written
;
2039 /* asr: asr $Rj,$Ri */
2042 SEM_FN_NAME (fr30bf
,asr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2044 #define FLD(f) abuf->fields.fmt_lsl.f
2045 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2046 int UNUSED written
= 0;
2047 IADDR UNUSED pc
= abuf
->addr
;
2048 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2052 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
2053 if (NESI (tmp_shift
, 0)) {
2056 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2057 CPU (h_cbit
) = opval
;
2058 written
|= (1 << 3);
2059 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2062 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2063 * FLD (i_Ri
) = opval
;
2064 written
|= (1 << 2);
2065 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2071 CPU (h_cbit
) = opval
;
2072 written
|= (1 << 3);
2073 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2077 BI opval
= LTSI (* FLD (i_Ri
), 0);
2078 CPU (h_nbit
) = opval
;
2079 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2082 BI opval
= EQSI (* FLD (i_Ri
), 0);
2083 CPU (h_zbit
) = opval
;
2084 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2088 abuf
->written
= written
;
2093 /* asri: asr $u4,$Ri */
2096 SEM_FN_NAME (fr30bf
,asri
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2098 #define FLD(f) abuf->fields.fmt_lsli.f
2099 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2100 int UNUSED written
= 0;
2101 IADDR UNUSED pc
= abuf
->addr
;
2102 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2106 tmp_shift
= FLD (f_u4
);
2107 if (NESI (tmp_shift
, 0)) {
2110 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2111 CPU (h_cbit
) = opval
;
2112 written
|= (1 << 3);
2113 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2116 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2117 * FLD (i_Ri
) = opval
;
2118 written
|= (1 << 2);
2119 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2125 CPU (h_cbit
) = opval
;
2126 written
|= (1 << 3);
2127 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2131 BI opval
= LTSI (* FLD (i_Ri
), 0);
2132 CPU (h_nbit
) = opval
;
2133 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2136 BI opval
= EQSI (* FLD (i_Ri
), 0);
2137 CPU (h_zbit
) = opval
;
2138 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2142 abuf
->written
= written
;
2147 /* asr2: asr2 $u4,$Ri */
2150 SEM_FN_NAME (fr30bf
,asr2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2152 #define FLD(f) abuf->fields.fmt_lsli.f
2153 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2154 int UNUSED written
= 0;
2155 IADDR UNUSED pc
= abuf
->addr
;
2156 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2160 tmp_shift
= ADDSI (FLD (f_u4
), 16);
2161 if (NESI (tmp_shift
, 0)) {
2164 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2165 CPU (h_cbit
) = opval
;
2166 written
|= (1 << 3);
2167 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2170 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2171 * FLD (i_Ri
) = opval
;
2172 written
|= (1 << 2);
2173 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2179 CPU (h_cbit
) = opval
;
2180 written
|= (1 << 3);
2181 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2185 BI opval
= LTSI (* FLD (i_Ri
), 0);
2186 CPU (h_nbit
) = opval
;
2187 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2190 BI opval
= EQSI (* FLD (i_Ri
), 0);
2191 CPU (h_zbit
) = opval
;
2192 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2196 abuf
->written
= written
;
2201 /* ldi8: ldi:8 $i8,$Ri */
2204 SEM_FN_NAME (fr30bf
,ldi8
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2206 #define FLD(f) abuf->fields.fmt_ldi8.f
2207 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2208 int UNUSED written
= 0;
2209 IADDR UNUSED pc
= abuf
->addr
;
2210 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2213 SI opval
= FLD (f_i8
);
2214 * FLD (i_Ri
) = opval
;
2215 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2222 /* ldi20: ldi:20 $i20,$Ri */
2225 SEM_FN_NAME (fr30bf
,ldi20
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2227 #define FLD(f) abuf->fields.fmt_ldi20.f
2228 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2229 int UNUSED written
= 0;
2230 IADDR UNUSED pc
= abuf
->addr
;
2231 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2234 SI opval
= FLD (f_i20
);
2235 * FLD (i_Ri
) = opval
;
2236 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2243 /* ldi32: ldi:32 $i32,$Ri */
2246 SEM_FN_NAME (fr30bf
,ldi32
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2248 #define FLD(f) abuf->fields.fmt_ldi32.f
2249 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2250 int UNUSED written
= 0;
2251 IADDR UNUSED pc
= abuf
->addr
;
2252 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 6);
2255 SI opval
= FLD (f_i32
);
2256 * FLD (i_Ri
) = opval
;
2257 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2264 /* ld: ld @$Rj,$Ri */
2267 SEM_FN_NAME (fr30bf
,ld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2269 #define FLD(f) abuf->fields.fmt_ld.f
2270 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2271 int UNUSED written
= 0;
2272 IADDR UNUSED pc
= abuf
->addr
;
2273 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2276 SI opval
= GETMEMSI (current_cpu
, pc
, * FLD (i_Rj
));
2277 * FLD (i_Ri
) = opval
;
2278 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2285 /* lduh: lduh @$Rj,$Ri */
2288 SEM_FN_NAME (fr30bf
,lduh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2290 #define FLD(f) abuf->fields.fmt_lduh.f
2291 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2292 int UNUSED written
= 0;
2293 IADDR UNUSED pc
= abuf
->addr
;
2294 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2297 SI opval
= GETMEMUHI (current_cpu
, pc
, * FLD (i_Rj
));
2298 * FLD (i_Ri
) = opval
;
2299 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2306 /* ldub: ldub @$Rj,$Ri */
2309 SEM_FN_NAME (fr30bf
,ldub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2311 #define FLD(f) abuf->fields.fmt_ldub.f
2312 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2313 int UNUSED written
= 0;
2314 IADDR UNUSED pc
= abuf
->addr
;
2315 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2318 SI opval
= GETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
));
2319 * FLD (i_Ri
) = opval
;
2320 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2327 /* ldr13: ld @($R13,$Rj),$Ri */
2330 SEM_FN_NAME (fr30bf
,ldr13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2332 #define FLD(f) abuf->fields.fmt_ldr13.f
2333 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2334 int UNUSED written
= 0;
2335 IADDR UNUSED pc
= abuf
->addr
;
2336 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2339 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2340 * FLD (i_Ri
) = opval
;
2341 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2348 /* ldr13uh: lduh @($R13,$Rj),$Ri */
2351 SEM_FN_NAME (fr30bf
,ldr13uh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2353 #define FLD(f) abuf->fields.fmt_ldr13uh.f
2354 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2355 int UNUSED written
= 0;
2356 IADDR UNUSED pc
= abuf
->addr
;
2357 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2360 SI opval
= GETMEMUHI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2361 * FLD (i_Ri
) = opval
;
2362 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2369 /* ldr13ub: ldub @($R13,$Rj),$Ri */
2372 SEM_FN_NAME (fr30bf
,ldr13ub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2374 #define FLD(f) abuf->fields.fmt_ldr13ub.f
2375 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2376 int UNUSED written
= 0;
2377 IADDR UNUSED pc
= abuf
->addr
;
2378 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2381 SI opval
= GETMEMUQI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2382 * FLD (i_Ri
) = opval
;
2383 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2390 /* ldr14: ld @($R14,$disp10),$Ri */
2393 SEM_FN_NAME (fr30bf
,ldr14
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2395 #define FLD(f) abuf->fields.fmt_ldr14.f
2396 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2397 int UNUSED written
= 0;
2398 IADDR UNUSED pc
= abuf
->addr
;
2399 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2402 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_disp10
), CPU (h_gr
[((UINT
) 14)])));
2403 * FLD (i_Ri
) = opval
;
2404 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2411 /* ldr14uh: lduh @($R14,$disp9),$Ri */
2414 SEM_FN_NAME (fr30bf
,ldr14uh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2416 #define FLD(f) abuf->fields.fmt_ldr14uh.f
2417 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2418 int UNUSED written
= 0;
2419 IADDR UNUSED pc
= abuf
->addr
;
2420 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2423 SI opval
= GETMEMUHI (current_cpu
, pc
, ADDSI (FLD (f_disp9
), CPU (h_gr
[((UINT
) 14)])));
2424 * FLD (i_Ri
) = opval
;
2425 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2432 /* ldr14ub: ldub @($R14,$disp8),$Ri */
2435 SEM_FN_NAME (fr30bf
,ldr14ub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2437 #define FLD(f) abuf->fields.fmt_ldr14ub.f
2438 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2439 int UNUSED written
= 0;
2440 IADDR UNUSED pc
= abuf
->addr
;
2441 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2444 SI opval
= GETMEMUQI (current_cpu
, pc
, ADDSI (FLD (f_disp8
), CPU (h_gr
[((UINT
) 14)])));
2445 * FLD (i_Ri
) = opval
;
2446 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2453 /* ldr15: ld @($R15,$udisp6),$Ri */
2456 SEM_FN_NAME (fr30bf
,ldr15
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2458 #define FLD(f) abuf->fields.fmt_ldr15.f
2459 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2460 int UNUSED written
= 0;
2461 IADDR UNUSED pc
= abuf
->addr
;
2462 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2465 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_udisp6
), CPU (h_gr
[((UINT
) 15)])));
2466 * FLD (i_Ri
) = opval
;
2467 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2474 /* ldr15gr: ld @$R15+,$Ri */
2477 SEM_FN_NAME (fr30bf
,ldr15gr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2479 #define FLD(f) abuf->fields.fmt_ldr15gr.f
2480 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2481 int UNUSED written
= 0;
2482 IADDR UNUSED pc
= abuf
->addr
;
2483 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2487 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2488 * FLD (i_Ri
) = opval
;
2489 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2491 if (NESI (FLD (f_Ri
), 15)) {
2493 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2494 CPU (h_gr
[((UINT
) 15)]) = opval
;
2495 written
|= (1 << 4);
2496 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2501 abuf
->written
= written
;
2506 /* ldr15dr: ld @$R15+,$Rs2 */
2509 SEM_FN_NAME (fr30bf
,ldr15dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2511 #define FLD(f) abuf->fields.fmt_ldr15dr.f
2512 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2513 int UNUSED written
= 0;
2514 IADDR UNUSED pc
= abuf
->addr
;
2515 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2519 tmp_tmp
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2521 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2522 CPU (h_gr
[((UINT
) 15)]) = opval
;
2523 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2527 SET_H_DR (FLD (f_Rs2
), opval
);
2528 TRACE_RESULT (current_cpu
, abuf
, "Rs2", 'x', opval
);
2536 /* ldr15ps: ld @$R15+,$ps */
2539 SEM_FN_NAME (fr30bf
,ldr15ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2541 #define FLD(f) abuf->fields.fmt_ldr15ps.f
2542 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2543 int UNUSED written
= 0;
2544 IADDR UNUSED pc
= abuf
->addr
;
2545 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2549 USI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2551 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
2554 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2555 CPU (h_gr
[((UINT
) 15)]) = opval
;
2556 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2564 /* st: st $Ri,@$Rj */
2567 SEM_FN_NAME (fr30bf
,st
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2569 #define FLD(f) abuf->fields.fmt_st.f
2570 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2571 int UNUSED written
= 0;
2572 IADDR UNUSED pc
= abuf
->addr
;
2573 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2576 SI opval
= * FLD (i_Ri
);
2577 SETMEMSI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2578 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2585 /* sth: sth $Ri,@$Rj */
2588 SEM_FN_NAME (fr30bf
,sth
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2590 #define FLD(f) abuf->fields.fmt_sth.f
2591 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2592 int UNUSED written
= 0;
2593 IADDR UNUSED pc
= abuf
->addr
;
2594 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2597 HI opval
= * FLD (i_Ri
);
2598 SETMEMHI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2599 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2606 /* stb: stb $Ri,@$Rj */
2609 SEM_FN_NAME (fr30bf
,stb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2611 #define FLD(f) abuf->fields.fmt_stb.f
2612 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2613 int UNUSED written
= 0;
2614 IADDR UNUSED pc
= abuf
->addr
;
2615 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2618 QI opval
= * FLD (i_Ri
);
2619 SETMEMQI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2620 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2627 /* str13: st $Ri,@($R13,$Rj) */
2630 SEM_FN_NAME (fr30bf
,str13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2632 #define FLD(f) abuf->fields.fmt_str13.f
2633 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2634 int UNUSED written
= 0;
2635 IADDR UNUSED pc
= abuf
->addr
;
2636 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2639 SI opval
= * FLD (i_Ri
);
2640 SETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2641 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2648 /* str13h: sth $Ri,@($R13,$Rj) */
2651 SEM_FN_NAME (fr30bf
,str13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2653 #define FLD(f) abuf->fields.fmt_str13h.f
2654 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2655 int UNUSED written
= 0;
2656 IADDR UNUSED pc
= abuf
->addr
;
2657 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2660 HI opval
= * FLD (i_Ri
);
2661 SETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2662 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2669 /* str13b: stb $Ri,@($R13,$Rj) */
2672 SEM_FN_NAME (fr30bf
,str13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2674 #define FLD(f) abuf->fields.fmt_str13b.f
2675 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2676 int UNUSED written
= 0;
2677 IADDR UNUSED pc
= abuf
->addr
;
2678 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2681 QI opval
= * FLD (i_Ri
);
2682 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2683 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2690 /* str14: st $Ri,@($R14,$disp10) */
2693 SEM_FN_NAME (fr30bf
,str14
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2695 #define FLD(f) abuf->fields.fmt_str14.f
2696 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2697 int UNUSED written
= 0;
2698 IADDR UNUSED pc
= abuf
->addr
;
2699 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2702 SI opval
= * FLD (i_Ri
);
2703 SETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_disp10
), CPU (h_gr
[((UINT
) 14)])), opval
);
2704 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2711 /* str14h: sth $Ri,@($R14,$disp9) */
2714 SEM_FN_NAME (fr30bf
,str14h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2716 #define FLD(f) abuf->fields.fmt_str14h.f
2717 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2718 int UNUSED written
= 0;
2719 IADDR UNUSED pc
= abuf
->addr
;
2720 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2723 HI opval
= * FLD (i_Ri
);
2724 SETMEMHI (current_cpu
, pc
, ADDSI (FLD (f_disp9
), CPU (h_gr
[((UINT
) 14)])), opval
);
2725 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2732 /* str14b: stb $Ri,@($R14,$disp8) */
2735 SEM_FN_NAME (fr30bf
,str14b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2737 #define FLD(f) abuf->fields.fmt_str14b.f
2738 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2739 int UNUSED written
= 0;
2740 IADDR UNUSED pc
= abuf
->addr
;
2741 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2744 QI opval
= * FLD (i_Ri
);
2745 SETMEMQI (current_cpu
, pc
, ADDSI (FLD (f_disp8
), CPU (h_gr
[((UINT
) 14)])), opval
);
2746 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2753 /* str15: st $Ri,@($R15,$udisp6) */
2756 SEM_FN_NAME (fr30bf
,str15
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2758 #define FLD(f) abuf->fields.fmt_str15.f
2759 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2760 int UNUSED written
= 0;
2761 IADDR UNUSED pc
= abuf
->addr
;
2762 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2765 SI opval
= * FLD (i_Ri
);
2766 SETMEMSI (current_cpu
, pc
, ADDSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_udisp6
)), opval
);
2767 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2774 /* str15gr: st $Ri,@-$R15 */
2777 SEM_FN_NAME (fr30bf
,str15gr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2779 #define FLD(f) abuf->fields.fmt_str15gr.f
2780 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2781 int UNUSED written
= 0;
2782 IADDR UNUSED pc
= abuf
->addr
;
2783 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2787 tmp_tmp
= * FLD (i_Ri
);
2789 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2790 CPU (h_gr
[((UINT
) 15)]) = opval
;
2791 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2795 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2796 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2804 /* str15dr: st $Rs2,@-$R15 */
2807 SEM_FN_NAME (fr30bf
,str15dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2809 #define FLD(f) abuf->fields.fmt_str15dr.f
2810 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2811 int UNUSED written
= 0;
2812 IADDR UNUSED pc
= abuf
->addr
;
2813 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2817 tmp_tmp
= GET_H_DR (FLD (f_Rs2
));
2819 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2820 CPU (h_gr
[((UINT
) 15)]) = opval
;
2821 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2825 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2826 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2834 /* str15ps: st $ps,@-$R15 */
2837 SEM_FN_NAME (fr30bf
,str15ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2839 #define FLD(f) abuf->fields.fmt_str15ps.f
2840 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2841 int UNUSED written
= 0;
2842 IADDR UNUSED pc
= abuf
->addr
;
2843 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2847 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2848 CPU (h_gr
[((UINT
) 15)]) = opval
;
2849 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
2852 SI opval
= GET_H_PS ();
2853 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2854 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2862 /* mov: mov $Rj,$Ri */
2865 SEM_FN_NAME (fr30bf
,mov
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2867 #define FLD(f) abuf->fields.fmt_mov.f
2868 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2869 int UNUSED written
= 0;
2870 IADDR UNUSED pc
= abuf
->addr
;
2871 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2874 SI opval
= * FLD (i_Rj
);
2875 * FLD (i_Ri
) = opval
;
2876 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2883 /* movdr: mov $Rs1,$Ri */
2886 SEM_FN_NAME (fr30bf
,movdr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2888 #define FLD(f) abuf->fields.fmt_movdr.f
2889 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2890 int UNUSED written
= 0;
2891 IADDR UNUSED pc
= abuf
->addr
;
2892 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2895 SI opval
= GET_H_DR (FLD (f_Rs1
));
2896 * FLD (i_Ri
) = opval
;
2897 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2904 /* movps: mov $ps,$Ri */
2907 SEM_FN_NAME (fr30bf
,movps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2909 #define FLD(f) abuf->fields.fmt_movps.f
2910 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2911 int UNUSED written
= 0;
2912 IADDR UNUSED pc
= abuf
->addr
;
2913 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2916 SI opval
= GET_H_PS ();
2917 * FLD (i_Ri
) = opval
;
2918 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
2925 /* mov2dr: mov $Ri,$Rs1 */
2928 SEM_FN_NAME (fr30bf
,mov2dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2930 #define FLD(f) abuf->fields.fmt_mov2dr.f
2931 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2932 int UNUSED written
= 0;
2933 IADDR UNUSED pc
= abuf
->addr
;
2934 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2937 SI opval
= * FLD (i_Ri
);
2938 SET_H_DR (FLD (f_Rs1
), opval
);
2939 TRACE_RESULT (current_cpu
, abuf
, "Rs1", 'x', opval
);
2946 /* mov2ps: mov $Ri,$ps */
2949 SEM_FN_NAME (fr30bf
,mov2ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2951 #define FLD(f) abuf->fields.fmt_mov2ps.f
2952 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2953 int UNUSED written
= 0;
2954 IADDR UNUSED pc
= abuf
->addr
;
2955 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2958 USI opval
= * FLD (i_Ri
);
2960 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
2970 SEM_FN_NAME (fr30bf
,jmp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2972 #define FLD(f) abuf->fields.cti.fields.fmt_jmp.f
2973 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2974 int UNUSED written
= 0;
2975 IADDR UNUSED pc
= abuf
->addr
;
2977 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2980 USI opval
= * FLD (i_Ri
);
2981 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
2982 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
2985 SEM_BRANCH_FINI (vpc
);
2990 /* jmpd: jmp:d @$Ri */
2993 SEM_FN_NAME (fr30bf
,jmpd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2995 #define FLD(f) abuf->fields.cti.fields.fmt_jmp.f
2996 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2997 int UNUSED written
= 0;
2998 IADDR UNUSED pc
= abuf
->addr
;
3000 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3004 USI opval
= * FLD (i_Ri
);
3005 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3006 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3010 SEM_BRANCH_FINI (vpc
);
3015 /* callr: call @$Ri */
3018 SEM_FN_NAME (fr30bf
,callr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3020 #define FLD(f) abuf->fields.cti.fields.fmt_callr.f
3021 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3022 int UNUSED written
= 0;
3023 IADDR UNUSED pc
= abuf
->addr
;
3025 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3029 SI opval
= ADDSI (pc
, 2);
3030 SET_H_DR (((UINT
) 1), opval
);
3031 TRACE_RESULT (current_cpu
, abuf
, "dr-1", 'x', opval
);
3034 USI opval
= * FLD (i_Ri
);
3035 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3036 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3040 SEM_BRANCH_FINI (vpc
);
3045 /* callrd: call:d @$Ri */
3048 SEM_FN_NAME (fr30bf
,callrd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3050 #define FLD(f) abuf->fields.cti.fields.fmt_callr.f
3051 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3052 int UNUSED written
= 0;
3053 IADDR UNUSED pc
= abuf
->addr
;
3055 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3060 SI opval
= ADDSI (pc
, 4);
3061 SET_H_DR (((UINT
) 1), opval
);
3062 TRACE_RESULT (current_cpu
, abuf
, "dr-1", 'x', opval
);
3065 USI opval
= * FLD (i_Ri
);
3066 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3067 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3072 SEM_BRANCH_FINI (vpc
);
3077 /* call: call $label12 */
3080 SEM_FN_NAME (fr30bf
,call
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3082 #define FLD(f) abuf->fields.cti.fields.fmt_call.f
3083 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3084 int UNUSED written
= 0;
3085 IADDR UNUSED pc
= abuf
->addr
;
3087 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3091 SI opval
= ADDSI (pc
, 2);
3092 SET_H_DR (((UINT
) 1), opval
);
3093 TRACE_RESULT (current_cpu
, abuf
, "dr-1", 'x', opval
);
3096 USI opval
= FLD (i_label12
);
3097 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3098 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3102 SEM_BRANCH_FINI (vpc
);
3107 /* calld: call:d $label12 */
3110 SEM_FN_NAME (fr30bf
,calld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3112 #define FLD(f) abuf->fields.cti.fields.fmt_call.f
3113 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3114 int UNUSED written
= 0;
3115 IADDR UNUSED pc
= abuf
->addr
;
3117 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3122 SI opval
= ADDSI (pc
, 4);
3123 SET_H_DR (((UINT
) 1), opval
);
3124 TRACE_RESULT (current_cpu
, abuf
, "dr-1", 'x', opval
);
3127 USI opval
= FLD (i_label12
);
3128 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3129 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3134 SEM_BRANCH_FINI (vpc
);
3142 SEM_FN_NAME (fr30bf
,ret
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3144 #define FLD(f) abuf->fields.cti.fields.fmt_ret.f
3145 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3146 int UNUSED written
= 0;
3147 IADDR UNUSED pc
= abuf
->addr
;
3149 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3152 USI opval
= GET_H_DR (((UINT
) 1));
3153 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3154 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3157 SEM_BRANCH_FINI (vpc
);
3165 SEM_FN_NAME (fr30bf
,ret_d
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3167 #define FLD(f) abuf->fields.cti.fields.fmt_ret.f
3168 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3169 int UNUSED written
= 0;
3170 IADDR UNUSED pc
= abuf
->addr
;
3172 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3176 USI opval
= GET_H_DR (((UINT
) 1));
3177 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3178 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3182 SEM_BRANCH_FINI (vpc
);
3190 SEM_FN_NAME (fr30bf
,int) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3192 #define FLD(f) abuf->fields.cti.fields.fmt_int.f
3193 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3194 int UNUSED written
= 0;
3195 IADDR UNUSED pc
= abuf
->addr
;
3197 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3204 SI opval
= fr30_int (current_cpu
, pc
, FLD (f_u8
));
3205 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3206 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3210 SEM_BRANCH_FINI (vpc
);
3218 SEM_FN_NAME (fr30bf
,inte
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3220 #define FLD(f) abuf->fields.cti.fields.fmt_inte.f
3221 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3222 int UNUSED written
= 0;
3223 IADDR UNUSED pc
= abuf
->addr
;
3225 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3232 SI opval
= fr30_inte (current_cpu
, pc
);
3233 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3234 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3238 SEM_BRANCH_FINI (vpc
);
3246 SEM_FN_NAME (fr30bf
,reti
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3248 #define FLD(f) abuf->fields.cti.fields.fmt_reti.f
3249 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3250 int UNUSED written
= 0;
3251 IADDR UNUSED pc
= abuf
->addr
;
3253 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3255 if (EQBI (GET_H_SBIT (), 0)) {
3258 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 2)));
3259 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3260 written
|= (1 << 7);
3261 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3264 SI opval
= ADDSI (GET_H_DR (((UINT
) 2)), 4);
3265 SET_H_DR (((UINT
) 2), opval
);
3266 written
|= (1 << 5);
3267 TRACE_RESULT (current_cpu
, abuf
, "dr-2", 'x', opval
);
3270 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 2)));
3272 written
|= (1 << 8);
3273 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
3276 SI opval
= ADDSI (GET_H_DR (((UINT
) 2)), 4);
3277 SET_H_DR (((UINT
) 2), opval
);
3278 written
|= (1 << 5);
3279 TRACE_RESULT (current_cpu
, abuf
, "dr-2", 'x', opval
);
3285 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 3)));
3286 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3287 written
|= (1 << 7);
3288 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3291 SI opval
= ADDSI (GET_H_DR (((UINT
) 3)), 4);
3292 SET_H_DR (((UINT
) 3), opval
);
3293 written
|= (1 << 6);
3294 TRACE_RESULT (current_cpu
, abuf
, "dr-3", 'x', opval
);
3297 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 3)));
3299 written
|= (1 << 8);
3300 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
3303 SI opval
= ADDSI (GET_H_DR (((UINT
) 3)), 4);
3304 SET_H_DR (((UINT
) 3), opval
);
3305 written
|= (1 << 6);
3306 TRACE_RESULT (current_cpu
, abuf
, "dr-3", 'x', opval
);
3311 abuf
->written
= written
;
3312 SEM_BRANCH_FINI (vpc
);
3317 /* brad: bra:d $label9 */
3320 SEM_FN_NAME (fr30bf
,brad
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3322 #define FLD(f) abuf->fields.cti.fields.fmt_brad.f
3323 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3324 int UNUSED written
= 0;
3325 IADDR UNUSED pc
= abuf
->addr
;
3327 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3331 USI opval
= FLD (i_label9
);
3332 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3333 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3337 SEM_BRANCH_FINI (vpc
);
3342 /* bra: bra $label9 */
3345 SEM_FN_NAME (fr30bf
,bra
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3347 #define FLD(f) abuf->fields.cti.fields.fmt_brad.f
3348 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3349 int UNUSED written
= 0;
3350 IADDR UNUSED pc
= abuf
->addr
;
3352 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3355 USI opval
= FLD (i_label9
);
3356 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3357 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3360 SEM_BRANCH_FINI (vpc
);
3365 /* bnod: bno:d $label9 */
3368 SEM_FN_NAME (fr30bf
,bnod
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3370 #define FLD(f) abuf->fields.fmt_bnod.f
3371 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3372 int UNUSED written
= 0;
3373 IADDR UNUSED pc
= abuf
->addr
;
3374 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3377 do { } while (0); /*nop*/
3384 /* bno: bno $label9 */
3387 SEM_FN_NAME (fr30bf
,bno
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3389 #define FLD(f) abuf->fields.fmt_bnod.f
3390 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3391 int UNUSED written
= 0;
3392 IADDR UNUSED pc
= abuf
->addr
;
3393 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3395 do { } while (0); /*nop*/
3401 /* beqd: beq:d $label9 */
3404 SEM_FN_NAME (fr30bf
,beqd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3406 #define FLD(f) abuf->fields.cti.fields.fmt_beqd.f
3407 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3408 int UNUSED written
= 0;
3409 IADDR UNUSED pc
= abuf
->addr
;
3411 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3416 USI opval
= FLD (i_label9
);
3417 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3418 written
|= (1 << 2);
3419 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3424 abuf
->written
= written
;
3425 SEM_BRANCH_FINI (vpc
);
3430 /* beq: beq $label9 */
3433 SEM_FN_NAME (fr30bf
,beq
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3435 #define FLD(f) abuf->fields.cti.fields.fmt_beqd.f
3436 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3437 int UNUSED written
= 0;
3438 IADDR UNUSED pc
= abuf
->addr
;
3440 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3444 USI opval
= FLD (i_label9
);
3445 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3446 written
|= (1 << 2);
3447 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3451 abuf
->written
= written
;
3452 SEM_BRANCH_FINI (vpc
);
3457 /* bned: bne:d $label9 */
3460 SEM_FN_NAME (fr30bf
,bned
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3462 #define FLD(f) abuf->fields.cti.fields.fmt_beqd.f
3463 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3464 int UNUSED written
= 0;
3465 IADDR UNUSED pc
= abuf
->addr
;
3467 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3470 if (NOTBI (CPU (h_zbit
))) {
3472 USI opval
= FLD (i_label9
);
3473 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3474 written
|= (1 << 2);
3475 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3480 abuf
->written
= written
;
3481 SEM_BRANCH_FINI (vpc
);
3486 /* bne: bne $label9 */
3489 SEM_FN_NAME (fr30bf
,bne
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3491 #define FLD(f) abuf->fields.cti.fields.fmt_beqd.f
3492 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3493 int UNUSED written
= 0;
3494 IADDR UNUSED pc
= abuf
->addr
;
3496 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3498 if (NOTBI (CPU (h_zbit
))) {
3500 USI opval
= FLD (i_label9
);
3501 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3502 written
|= (1 << 2);
3503 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3507 abuf
->written
= written
;
3508 SEM_BRANCH_FINI (vpc
);
3513 /* bcd: bc:d $label9 */
3516 SEM_FN_NAME (fr30bf
,bcd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3518 #define FLD(f) abuf->fields.cti.fields.fmt_bcd.f
3519 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3520 int UNUSED written
= 0;
3521 IADDR UNUSED pc
= abuf
->addr
;
3523 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3528 USI opval
= FLD (i_label9
);
3529 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3530 written
|= (1 << 2);
3531 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3536 abuf
->written
= written
;
3537 SEM_BRANCH_FINI (vpc
);
3542 /* bc: bc $label9 */
3545 SEM_FN_NAME (fr30bf
,bc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3547 #define FLD(f) abuf->fields.cti.fields.fmt_bcd.f
3548 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3549 int UNUSED written
= 0;
3550 IADDR UNUSED pc
= abuf
->addr
;
3552 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3556 USI opval
= FLD (i_label9
);
3557 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3558 written
|= (1 << 2);
3559 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3563 abuf
->written
= written
;
3564 SEM_BRANCH_FINI (vpc
);
3569 /* bncd: bnc:d $label9 */
3572 SEM_FN_NAME (fr30bf
,bncd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3574 #define FLD(f) abuf->fields.cti.fields.fmt_bcd.f
3575 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3576 int UNUSED written
= 0;
3577 IADDR UNUSED pc
= abuf
->addr
;
3579 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3582 if (NOTBI (CPU (h_cbit
))) {
3584 USI opval
= FLD (i_label9
);
3585 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3586 written
|= (1 << 2);
3587 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3592 abuf
->written
= written
;
3593 SEM_BRANCH_FINI (vpc
);
3598 /* bnc: bnc $label9 */
3601 SEM_FN_NAME (fr30bf
,bnc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3603 #define FLD(f) abuf->fields.cti.fields.fmt_bcd.f
3604 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3605 int UNUSED written
= 0;
3606 IADDR UNUSED pc
= abuf
->addr
;
3608 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3610 if (NOTBI (CPU (h_cbit
))) {
3612 USI opval
= FLD (i_label9
);
3613 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3614 written
|= (1 << 2);
3615 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3619 abuf
->written
= written
;
3620 SEM_BRANCH_FINI (vpc
);
3625 /* bnd: bn:d $label9 */
3628 SEM_FN_NAME (fr30bf
,bnd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3630 #define FLD(f) abuf->fields.cti.fields.fmt_bnd.f
3631 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3632 int UNUSED written
= 0;
3633 IADDR UNUSED pc
= abuf
->addr
;
3635 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3640 USI opval
= FLD (i_label9
);
3641 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3642 written
|= (1 << 2);
3643 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3648 abuf
->written
= written
;
3649 SEM_BRANCH_FINI (vpc
);
3654 /* bn: bn $label9 */
3657 SEM_FN_NAME (fr30bf
,bn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3659 #define FLD(f) abuf->fields.cti.fields.fmt_bnd.f
3660 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3661 int UNUSED written
= 0;
3662 IADDR UNUSED pc
= abuf
->addr
;
3664 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3668 USI opval
= FLD (i_label9
);
3669 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3670 written
|= (1 << 2);
3671 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3675 abuf
->written
= written
;
3676 SEM_BRANCH_FINI (vpc
);
3681 /* bpd: bp:d $label9 */
3684 SEM_FN_NAME (fr30bf
,bpd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3686 #define FLD(f) abuf->fields.cti.fields.fmt_bnd.f
3687 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3688 int UNUSED written
= 0;
3689 IADDR UNUSED pc
= abuf
->addr
;
3691 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3694 if (NOTBI (CPU (h_nbit
))) {
3696 USI opval
= FLD (i_label9
);
3697 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3698 written
|= (1 << 2);
3699 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3704 abuf
->written
= written
;
3705 SEM_BRANCH_FINI (vpc
);
3710 /* bp: bp $label9 */
3713 SEM_FN_NAME (fr30bf
,bp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3715 #define FLD(f) abuf->fields.cti.fields.fmt_bnd.f
3716 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3717 int UNUSED written
= 0;
3718 IADDR UNUSED pc
= abuf
->addr
;
3720 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3722 if (NOTBI (CPU (h_nbit
))) {
3724 USI opval
= FLD (i_label9
);
3725 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3726 written
|= (1 << 2);
3727 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3731 abuf
->written
= written
;
3732 SEM_BRANCH_FINI (vpc
);
3737 /* bvd: bv:d $label9 */
3740 SEM_FN_NAME (fr30bf
,bvd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3742 #define FLD(f) abuf->fields.cti.fields.fmt_bvd.f
3743 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3744 int UNUSED written
= 0;
3745 IADDR UNUSED pc
= abuf
->addr
;
3747 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3752 USI opval
= FLD (i_label9
);
3753 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3754 written
|= (1 << 2);
3755 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3760 abuf
->written
= written
;
3761 SEM_BRANCH_FINI (vpc
);
3766 /* bv: bv $label9 */
3769 SEM_FN_NAME (fr30bf
,bv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3771 #define FLD(f) abuf->fields.cti.fields.fmt_bvd.f
3772 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3773 int UNUSED written
= 0;
3774 IADDR UNUSED pc
= abuf
->addr
;
3776 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3780 USI opval
= FLD (i_label9
);
3781 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3782 written
|= (1 << 2);
3783 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3787 abuf
->written
= written
;
3788 SEM_BRANCH_FINI (vpc
);
3793 /* bnvd: bnv:d $label9 */
3796 SEM_FN_NAME (fr30bf
,bnvd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3798 #define FLD(f) abuf->fields.cti.fields.fmt_bvd.f
3799 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3800 int UNUSED written
= 0;
3801 IADDR UNUSED pc
= abuf
->addr
;
3803 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3806 if (NOTBI (CPU (h_vbit
))) {
3808 USI opval
= FLD (i_label9
);
3809 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3810 written
|= (1 << 2);
3811 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3816 abuf
->written
= written
;
3817 SEM_BRANCH_FINI (vpc
);
3822 /* bnv: bnv $label9 */
3825 SEM_FN_NAME (fr30bf
,bnv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3827 #define FLD(f) abuf->fields.cti.fields.fmt_bvd.f
3828 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3829 int UNUSED written
= 0;
3830 IADDR UNUSED pc
= abuf
->addr
;
3832 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3834 if (NOTBI (CPU (h_vbit
))) {
3836 USI opval
= FLD (i_label9
);
3837 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3838 written
|= (1 << 2);
3839 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3843 abuf
->written
= written
;
3844 SEM_BRANCH_FINI (vpc
);
3849 /* bltd: blt:d $label9 */
3852 SEM_FN_NAME (fr30bf
,bltd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3854 #define FLD(f) abuf->fields.cti.fields.fmt_bltd.f
3855 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3856 int UNUSED written
= 0;
3857 IADDR UNUSED pc
= abuf
->addr
;
3859 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3862 if (XORBI (CPU (h_vbit
), CPU (h_nbit
))) {
3864 USI opval
= FLD (i_label9
);
3865 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3866 written
|= (1 << 3);
3867 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3872 abuf
->written
= written
;
3873 SEM_BRANCH_FINI (vpc
);
3878 /* blt: blt $label9 */
3881 SEM_FN_NAME (fr30bf
,blt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3883 #define FLD(f) abuf->fields.cti.fields.fmt_bltd.f
3884 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3885 int UNUSED written
= 0;
3886 IADDR UNUSED pc
= abuf
->addr
;
3888 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3890 if (XORBI (CPU (h_vbit
), CPU (h_nbit
))) {
3892 USI opval
= FLD (i_label9
);
3893 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3894 written
|= (1 << 3);
3895 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3899 abuf
->written
= written
;
3900 SEM_BRANCH_FINI (vpc
);
3905 /* bged: bge:d $label9 */
3908 SEM_FN_NAME (fr30bf
,bged
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3910 #define FLD(f) abuf->fields.cti.fields.fmt_bltd.f
3911 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3912 int UNUSED written
= 0;
3913 IADDR UNUSED pc
= abuf
->addr
;
3915 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3918 if (NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)))) {
3920 USI opval
= FLD (i_label9
);
3921 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3922 written
|= (1 << 3);
3923 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3928 abuf
->written
= written
;
3929 SEM_BRANCH_FINI (vpc
);
3934 /* bge: bge $label9 */
3937 SEM_FN_NAME (fr30bf
,bge
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3939 #define FLD(f) abuf->fields.cti.fields.fmt_bltd.f
3940 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3941 int UNUSED written
= 0;
3942 IADDR UNUSED pc
= abuf
->addr
;
3944 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3946 if (NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)))) {
3948 USI opval
= FLD (i_label9
);
3949 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3950 written
|= (1 << 3);
3951 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3955 abuf
->written
= written
;
3956 SEM_BRANCH_FINI (vpc
);
3961 /* bled: ble:d $label9 */
3964 SEM_FN_NAME (fr30bf
,bled
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3966 #define FLD(f) abuf->fields.cti.fields.fmt_bled.f
3967 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3968 int UNUSED written
= 0;
3969 IADDR UNUSED pc
= abuf
->addr
;
3971 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3974 if (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
))) {
3976 USI opval
= FLD (i_label9
);
3977 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
3978 written
|= (1 << 4);
3979 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3984 abuf
->written
= written
;
3985 SEM_BRANCH_FINI (vpc
);
3990 /* ble: ble $label9 */
3993 SEM_FN_NAME (fr30bf
,ble
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3995 #define FLD(f) abuf->fields.cti.fields.fmt_bled.f
3996 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3997 int UNUSED written
= 0;
3998 IADDR UNUSED pc
= abuf
->addr
;
4000 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4002 if (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
))) {
4004 USI opval
= FLD (i_label9
);
4005 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
4006 written
|= (1 << 4);
4007 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4011 abuf
->written
= written
;
4012 SEM_BRANCH_FINI (vpc
);
4017 /* bgtd: bgt:d $label9 */
4020 SEM_FN_NAME (fr30bf
,bgtd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4022 #define FLD(f) abuf->fields.cti.fields.fmt_bled.f
4023 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4024 int UNUSED written
= 0;
4025 IADDR UNUSED pc
= abuf
->addr
;
4027 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4030 if (NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)))) {
4032 USI opval
= FLD (i_label9
);
4033 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
4034 written
|= (1 << 4);
4035 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4040 abuf
->written
= written
;
4041 SEM_BRANCH_FINI (vpc
);
4046 /* bgt: bgt $label9 */
4049 SEM_FN_NAME (fr30bf
,bgt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4051 #define FLD(f) abuf->fields.cti.fields.fmt_bled.f
4052 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4053 int UNUSED written
= 0;
4054 IADDR UNUSED pc
= abuf
->addr
;
4056 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4058 if (NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)))) {
4060 USI opval
= FLD (i_label9
);
4061 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
4062 written
|= (1 << 4);
4063 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4067 abuf
->written
= written
;
4068 SEM_BRANCH_FINI (vpc
);
4073 /* blsd: bls:d $label9 */
4076 SEM_FN_NAME (fr30bf
,blsd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4078 #define FLD(f) abuf->fields.cti.fields.fmt_blsd.f
4079 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4080 int UNUSED written
= 0;
4081 IADDR UNUSED pc
= abuf
->addr
;
4083 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4086 if (ORBI (CPU (h_cbit
), CPU (h_zbit
))) {
4088 USI opval
= FLD (i_label9
);
4089 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
4090 written
|= (1 << 3);
4091 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4096 abuf
->written
= written
;
4097 SEM_BRANCH_FINI (vpc
);
4102 /* bls: bls $label9 */
4105 SEM_FN_NAME (fr30bf
,bls
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4107 #define FLD(f) abuf->fields.cti.fields.fmt_blsd.f
4108 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4109 int UNUSED written
= 0;
4110 IADDR UNUSED pc
= abuf
->addr
;
4112 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4114 if (ORBI (CPU (h_cbit
), CPU (h_zbit
))) {
4116 USI opval
= FLD (i_label9
);
4117 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
4118 written
|= (1 << 3);
4119 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4123 abuf
->written
= written
;
4124 SEM_BRANCH_FINI (vpc
);
4129 /* bhid: bhi:d $label9 */
4132 SEM_FN_NAME (fr30bf
,bhid
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4134 #define FLD(f) abuf->fields.cti.fields.fmt_blsd.f
4135 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4136 int UNUSED written
= 0;
4137 IADDR UNUSED pc
= abuf
->addr
;
4139 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4142 if (NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)))) {
4144 USI opval
= FLD (i_label9
);
4145 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
4146 written
|= (1 << 3);
4147 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4152 abuf
->written
= written
;
4153 SEM_BRANCH_FINI (vpc
);
4158 /* bhi: bhi $label9 */
4161 SEM_FN_NAME (fr30bf
,bhi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4163 #define FLD(f) abuf->fields.cti.fields.fmt_blsd.f
4164 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4165 int UNUSED written
= 0;
4166 IADDR UNUSED pc
= abuf
->addr
;
4168 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4170 if (NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)))) {
4172 USI opval
= FLD (i_label9
);
4173 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
, SEM_BRANCH_ADDR_CACHE (sem_arg
));
4174 written
|= (1 << 3);
4175 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4179 abuf
->written
= written
;
4180 SEM_BRANCH_FINI (vpc
);
4185 /* dmovr13: dmov $R13,@$dir10 */
4188 SEM_FN_NAME (fr30bf
,dmovr13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4190 #define FLD(f) abuf->fields.fmt_dmovr13.f
4191 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4192 int UNUSED written
= 0;
4193 IADDR UNUSED pc
= abuf
->addr
;
4194 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4197 SI opval
= CPU (h_gr
[((UINT
) 13)]);
4198 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4199 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4206 /* dmovr13h: dmovh $R13,@$dir9 */
4209 SEM_FN_NAME (fr30bf
,dmovr13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4211 #define FLD(f) abuf->fields.fmt_dmovr13h.f
4212 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4213 int UNUSED written
= 0;
4214 IADDR UNUSED pc
= abuf
->addr
;
4215 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4218 HI opval
= CPU (h_gr
[((UINT
) 13)]);
4219 SETMEMHI (current_cpu
, pc
, FLD (f_dir9
), opval
);
4220 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4227 /* dmovr13b: dmovb $R13,@$dir8 */
4230 SEM_FN_NAME (fr30bf
,dmovr13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4232 #define FLD(f) abuf->fields.fmt_dmovr13b.f
4233 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4234 int UNUSED written
= 0;
4235 IADDR UNUSED pc
= abuf
->addr
;
4236 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4239 QI opval
= CPU (h_gr
[((UINT
) 13)]);
4240 SETMEMQI (current_cpu
, pc
, FLD (f_dir8
), opval
);
4241 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4248 /* dmovr13pi: dmov @$R13+,@$dir10 */
4251 SEM_FN_NAME (fr30bf
,dmovr13pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4253 #define FLD(f) abuf->fields.fmt_dmovr13pi.f
4254 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4255 int UNUSED written
= 0;
4256 IADDR UNUSED pc
= abuf
->addr
;
4257 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4261 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4262 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4263 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4266 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 4);
4267 CPU (h_gr
[((UINT
) 13)]) = opval
;
4268 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4276 /* dmovr13pih: dmovh @$R13+,@$dir9 */
4279 SEM_FN_NAME (fr30bf
,dmovr13pih
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4281 #define FLD(f) abuf->fields.fmt_dmovr13pih.f
4282 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4283 int UNUSED written
= 0;
4284 IADDR UNUSED pc
= abuf
->addr
;
4285 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4289 HI opval
= GETMEMHI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4290 SETMEMHI (current_cpu
, pc
, FLD (f_dir9
), opval
);
4291 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4294 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 2);
4295 CPU (h_gr
[((UINT
) 13)]) = opval
;
4296 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4304 /* dmovr13pib: dmovb @$R13+,@$dir8 */
4307 SEM_FN_NAME (fr30bf
,dmovr13pib
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4309 #define FLD(f) abuf->fields.fmt_dmovr13pib.f
4310 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4311 int UNUSED written
= 0;
4312 IADDR UNUSED pc
= abuf
->addr
;
4313 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4317 QI opval
= GETMEMQI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4318 SETMEMQI (current_cpu
, pc
, FLD (f_dir8
), opval
);
4319 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4322 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 1);
4323 CPU (h_gr
[((UINT
) 13)]) = opval
;
4324 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4332 /* dmovr15pi: dmov @$R15+,@$dir10 */
4335 SEM_FN_NAME (fr30bf
,dmovr15pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4337 #define FLD(f) abuf->fields.fmt_dmovr15pi.f
4338 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4339 int UNUSED written
= 0;
4340 IADDR UNUSED pc
= abuf
->addr
;
4341 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4345 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4346 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4347 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4350 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4351 CPU (h_gr
[((UINT
) 15)]) = opval
;
4352 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4360 /* dmov2r13: dmov @$dir10,$R13 */
4363 SEM_FN_NAME (fr30bf
,dmov2r13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4365 #define FLD(f) abuf->fields.fmt_dmov2r13.f
4366 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4367 int UNUSED written
= 0;
4368 IADDR UNUSED pc
= abuf
->addr
;
4369 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4372 SI opval
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4373 CPU (h_gr
[((UINT
) 13)]) = opval
;
4374 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4381 /* dmov2r13h: dmovh @$dir9,$R13 */
4384 SEM_FN_NAME (fr30bf
,dmov2r13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4386 #define FLD(f) abuf->fields.fmt_dmov2r13h.f
4387 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4388 int UNUSED written
= 0;
4389 IADDR UNUSED pc
= abuf
->addr
;
4390 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4393 SI opval
= GETMEMHI (current_cpu
, pc
, FLD (f_dir9
));
4394 CPU (h_gr
[((UINT
) 13)]) = opval
;
4395 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4402 /* dmov2r13b: dmovb @$dir8,$R13 */
4405 SEM_FN_NAME (fr30bf
,dmov2r13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4407 #define FLD(f) abuf->fields.fmt_dmov2r13b.f
4408 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4409 int UNUSED written
= 0;
4410 IADDR UNUSED pc
= abuf
->addr
;
4411 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4414 SI opval
= GETMEMQI (current_cpu
, pc
, FLD (f_dir8
));
4415 CPU (h_gr
[((UINT
) 13)]) = opval
;
4416 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4423 /* dmov2r13pi: dmov @$dir10,@$R13+ */
4426 SEM_FN_NAME (fr30bf
,dmov2r13pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4428 #define FLD(f) abuf->fields.fmt_dmov2r13pi.f
4429 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4430 int UNUSED written
= 0;
4431 IADDR UNUSED pc
= abuf
->addr
;
4432 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4436 SI opval
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4437 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4438 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4441 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 4);
4442 CPU (h_gr
[((UINT
) 13)]) = opval
;
4443 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4451 /* dmov2r13pih: dmovh @$dir9,@$R13+ */
4454 SEM_FN_NAME (fr30bf
,dmov2r13pih
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4456 #define FLD(f) abuf->fields.fmt_dmov2r13pih.f
4457 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4458 int UNUSED written
= 0;
4459 IADDR UNUSED pc
= abuf
->addr
;
4460 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4464 HI opval
= GETMEMHI (current_cpu
, pc
, FLD (f_dir9
));
4465 SETMEMHI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4466 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4469 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 2);
4470 CPU (h_gr
[((UINT
) 13)]) = opval
;
4471 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4479 /* dmov2r13pib: dmovb @$dir8,@$R13+ */
4482 SEM_FN_NAME (fr30bf
,dmov2r13pib
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4484 #define FLD(f) abuf->fields.fmt_dmov2r13pib.f
4485 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4486 int UNUSED written
= 0;
4487 IADDR UNUSED pc
= abuf
->addr
;
4488 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4492 QI opval
= GETMEMQI (current_cpu
, pc
, FLD (f_dir8
));
4493 SETMEMQI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4494 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4497 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 1);
4498 CPU (h_gr
[((UINT
) 13)]) = opval
;
4499 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
4507 /* dmov2r15pd: dmov @$dir10,@-$R15 */
4510 SEM_FN_NAME (fr30bf
,dmov2r15pd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4512 #define FLD(f) abuf->fields.fmt_dmov2r15pd.f
4513 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4514 int UNUSED written
= 0;
4515 IADDR UNUSED pc
= abuf
->addr
;
4516 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4520 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
4521 CPU (h_gr
[((UINT
) 15)]) = opval
;
4522 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4525 SI opval
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4526 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
4527 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4535 /* ldres: ldres @$Ri+,$u4 */
4538 SEM_FN_NAME (fr30bf
,ldres
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4540 #define FLD(f) abuf->fields.fmt_ldres.f
4541 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4542 int UNUSED written
= 0;
4543 IADDR UNUSED pc
= abuf
->addr
;
4544 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4547 SI opval
= ADDSI (* FLD (i_Ri
), 4);
4548 * FLD (i_Ri
) = opval
;
4549 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4556 /* stres: stres $u4,@$Ri+ */
4559 SEM_FN_NAME (fr30bf
,stres
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4561 #define FLD(f) abuf->fields.fmt_ldres.f
4562 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4563 int UNUSED written
= 0;
4564 IADDR UNUSED pc
= abuf
->addr
;
4565 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4568 SI opval
= ADDSI (* FLD (i_Ri
), 4);
4569 * FLD (i_Ri
) = opval
;
4570 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4577 /* copop: copop $u4c,$ccc,$CRj,$CRi */
4580 SEM_FN_NAME (fr30bf
,copop
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4582 #define FLD(f) abuf->fields.fmt_copop.f
4583 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4584 int UNUSED written
= 0;
4585 IADDR UNUSED pc
= abuf
->addr
;
4586 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4588 do { } while (0); /*nop*/
4594 /* copld: copld $u4c,$ccc,$Rjc,$CRi */
4597 SEM_FN_NAME (fr30bf
,copld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4599 #define FLD(f) abuf->fields.fmt_copld.f
4600 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4601 int UNUSED written
= 0;
4602 IADDR UNUSED pc
= abuf
->addr
;
4603 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4605 do { } while (0); /*nop*/
4611 /* copst: copst $u4c,$ccc,$CRj,$Ric */
4614 SEM_FN_NAME (fr30bf
,copst
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4616 #define FLD(f) abuf->fields.fmt_copst.f
4617 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4618 int UNUSED written
= 0;
4619 IADDR UNUSED pc
= abuf
->addr
;
4620 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4622 do { } while (0); /*nop*/
4628 /* copsv: copsv $u4c,$ccc,$CRj,$Ric */
4631 SEM_FN_NAME (fr30bf
,copsv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4633 #define FLD(f) abuf->fields.fmt_copst.f
4634 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4635 int UNUSED written
= 0;
4636 IADDR UNUSED pc
= abuf
->addr
;
4637 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4639 do { } while (0); /*nop*/
4648 SEM_FN_NAME (fr30bf
,nop
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4650 #define FLD(f) abuf->fields.fmt_nop.f
4651 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4652 int UNUSED written
= 0;
4653 IADDR UNUSED pc
= abuf
->addr
;
4654 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4656 do { } while (0); /*nop*/
4662 /* andccr: andccr $u8 */
4665 SEM_FN_NAME (fr30bf
,andccr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4667 #define FLD(f) abuf->fields.fmt_andccr.f
4668 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4669 int UNUSED written
= 0;
4670 IADDR UNUSED pc
= abuf
->addr
;
4671 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4674 UQI opval
= ANDQI (GET_H_CCR (), FLD (f_u8
));
4676 TRACE_RESULT (current_cpu
, abuf
, "ccr", 'x', opval
);
4683 /* orccr: orccr $u8 */
4686 SEM_FN_NAME (fr30bf
,orccr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4688 #define FLD(f) abuf->fields.fmt_andccr.f
4689 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4690 int UNUSED written
= 0;
4691 IADDR UNUSED pc
= abuf
->addr
;
4692 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4695 UQI opval
= ORQI (GET_H_CCR (), FLD (f_u8
));
4697 TRACE_RESULT (current_cpu
, abuf
, "ccr", 'x', opval
);
4704 /* stilm: stilm $u8 */
4707 SEM_FN_NAME (fr30bf
,stilm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4709 #define FLD(f) abuf->fields.fmt_stilm.f
4710 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4711 int UNUSED written
= 0;
4712 IADDR UNUSED pc
= abuf
->addr
;
4713 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4716 UQI opval
= ANDSI (FLD (f_u8
), 31);
4718 TRACE_RESULT (current_cpu
, abuf
, "ilm", 'x', opval
);
4725 /* addsp: addsp $s10 */
4728 SEM_FN_NAME (fr30bf
,addsp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4730 #define FLD(f) abuf->fields.fmt_addsp.f
4731 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4732 int UNUSED written
= 0;
4733 IADDR UNUSED pc
= abuf
->addr
;
4734 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4737 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_s10
));
4738 CPU (h_gr
[((UINT
) 15)]) = opval
;
4739 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4746 /* extsb: extsb $Ri */
4749 SEM_FN_NAME (fr30bf
,extsb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4751 #define FLD(f) abuf->fields.fmt_extsb.f
4752 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4753 int UNUSED written
= 0;
4754 IADDR UNUSED pc
= abuf
->addr
;
4755 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4758 SI opval
= EXTQISI (ANDQI (* FLD (i_Ri
), 255));
4759 * FLD (i_Ri
) = opval
;
4760 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4767 /* extub: extub $Ri */
4770 SEM_FN_NAME (fr30bf
,extub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4772 #define FLD(f) abuf->fields.fmt_extub.f
4773 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4774 int UNUSED written
= 0;
4775 IADDR UNUSED pc
= abuf
->addr
;
4776 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4779 SI opval
= ZEXTQISI (ANDQI (* FLD (i_Ri
), 255));
4780 * FLD (i_Ri
) = opval
;
4781 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4788 /* extsh: extsh $Ri */
4791 SEM_FN_NAME (fr30bf
,extsh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4793 #define FLD(f) abuf->fields.fmt_extsh.f
4794 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4795 int UNUSED written
= 0;
4796 IADDR UNUSED pc
= abuf
->addr
;
4797 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4800 SI opval
= EXTHISI (ANDHI (* FLD (i_Ri
), 65535));
4801 * FLD (i_Ri
) = opval
;
4802 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4809 /* extuh: extuh $Ri */
4812 SEM_FN_NAME (fr30bf
,extuh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4814 #define FLD(f) abuf->fields.fmt_extuh.f
4815 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4816 int UNUSED written
= 0;
4817 IADDR UNUSED pc
= abuf
->addr
;
4818 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4821 SI opval
= ZEXTHISI (ANDHI (* FLD (i_Ri
), 65535));
4822 * FLD (i_Ri
) = opval
;
4823 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
4830 /* ldm0: ldm0 ($reglist_low_ld) */
4833 SEM_FN_NAME (fr30bf
,ldm0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4835 #define FLD(f) abuf->fields.fmt_ldm0.f
4836 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4837 int UNUSED written
= 0;
4838 IADDR UNUSED pc
= abuf
->addr
;
4839 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4842 if (ANDSI (FLD (f_reglist_low_ld
), 1)) {
4845 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4846 CPU (h_gr
[((UINT
) 0)]) = opval
;
4847 written
|= (1 << 3);
4848 TRACE_RESULT (current_cpu
, abuf
, "gr-0", 'x', opval
);
4851 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4852 CPU (h_gr
[((UINT
) 15)]) = opval
;
4853 written
|= (1 << 5);
4854 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4858 if (ANDSI (FLD (f_reglist_low_ld
), 2)) {
4861 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4862 CPU (h_gr
[((UINT
) 1)]) = opval
;
4863 written
|= (1 << 4);
4864 TRACE_RESULT (current_cpu
, abuf
, "gr-1", 'x', opval
);
4867 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4868 CPU (h_gr
[((UINT
) 15)]) = opval
;
4869 written
|= (1 << 5);
4870 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4874 if (ANDSI (FLD (f_reglist_low_ld
), 4)) {
4877 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4878 CPU (h_gr
[((UINT
) 2)]) = opval
;
4879 written
|= (1 << 6);
4880 TRACE_RESULT (current_cpu
, abuf
, "gr-2", 'x', opval
);
4883 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4884 CPU (h_gr
[((UINT
) 15)]) = opval
;
4885 written
|= (1 << 5);
4886 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4890 if (ANDSI (FLD (f_reglist_low_ld
), 8)) {
4893 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4894 CPU (h_gr
[((UINT
) 3)]) = opval
;
4895 written
|= (1 << 7);
4896 TRACE_RESULT (current_cpu
, abuf
, "gr-3", 'x', opval
);
4899 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4900 CPU (h_gr
[((UINT
) 15)]) = opval
;
4901 written
|= (1 << 5);
4902 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4906 if (ANDSI (FLD (f_reglist_low_ld
), 16)) {
4909 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4910 CPU (h_gr
[((UINT
) 4)]) = opval
;
4911 written
|= (1 << 8);
4912 TRACE_RESULT (current_cpu
, abuf
, "gr-4", 'x', opval
);
4915 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4916 CPU (h_gr
[((UINT
) 15)]) = opval
;
4917 written
|= (1 << 5);
4918 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4922 if (ANDSI (FLD (f_reglist_low_ld
), 32)) {
4925 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4926 CPU (h_gr
[((UINT
) 5)]) = opval
;
4927 written
|= (1 << 9);
4928 TRACE_RESULT (current_cpu
, abuf
, "gr-5", 'x', opval
);
4931 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4932 CPU (h_gr
[((UINT
) 15)]) = opval
;
4933 written
|= (1 << 5);
4934 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4938 if (ANDSI (FLD (f_reglist_low_ld
), 64)) {
4941 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4942 CPU (h_gr
[((UINT
) 6)]) = opval
;
4943 written
|= (1 << 10);
4944 TRACE_RESULT (current_cpu
, abuf
, "gr-6", 'x', opval
);
4947 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4948 CPU (h_gr
[((UINT
) 15)]) = opval
;
4949 written
|= (1 << 5);
4950 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4954 if (ANDSI (FLD (f_reglist_low_ld
), 128)) {
4957 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4958 CPU (h_gr
[((UINT
) 7)]) = opval
;
4959 written
|= (1 << 11);
4960 TRACE_RESULT (current_cpu
, abuf
, "gr-7", 'x', opval
);
4963 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4964 CPU (h_gr
[((UINT
) 15)]) = opval
;
4965 written
|= (1 << 5);
4966 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
4972 abuf
->written
= written
;
4977 /* ldm1: ldm1 ($reglist_hi_ld) */
4980 SEM_FN_NAME (fr30bf
,ldm1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4982 #define FLD(f) abuf->fields.fmt_ldm1.f
4983 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4984 int UNUSED written
= 0;
4985 IADDR UNUSED pc
= abuf
->addr
;
4986 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4989 if (ANDSI (FLD (f_reglist_hi_ld
), 1)) {
4992 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4993 CPU (h_gr
[((UINT
) 8)]) = opval
;
4994 written
|= (1 << 9);
4995 TRACE_RESULT (current_cpu
, abuf
, "gr-8", 'x', opval
);
4998 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4999 CPU (h_gr
[((UINT
) 15)]) = opval
;
5000 written
|= (1 << 8);
5001 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5005 if (ANDSI (FLD (f_reglist_hi_ld
), 2)) {
5008 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5009 CPU (h_gr
[((UINT
) 9)]) = opval
;
5010 written
|= (1 << 10);
5011 TRACE_RESULT (current_cpu
, abuf
, "gr-9", 'x', opval
);
5014 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5015 CPU (h_gr
[((UINT
) 15)]) = opval
;
5016 written
|= (1 << 8);
5017 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5021 if (ANDSI (FLD (f_reglist_hi_ld
), 4)) {
5024 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5025 CPU (h_gr
[((UINT
) 10)]) = opval
;
5026 written
|= (1 << 3);
5027 TRACE_RESULT (current_cpu
, abuf
, "gr-10", 'x', opval
);
5030 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5031 CPU (h_gr
[((UINT
) 15)]) = opval
;
5032 written
|= (1 << 8);
5033 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5037 if (ANDSI (FLD (f_reglist_hi_ld
), 8)) {
5040 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5041 CPU (h_gr
[((UINT
) 11)]) = opval
;
5042 written
|= (1 << 4);
5043 TRACE_RESULT (current_cpu
, abuf
, "gr-11", 'x', opval
);
5046 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5047 CPU (h_gr
[((UINT
) 15)]) = opval
;
5048 written
|= (1 << 8);
5049 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5053 if (ANDSI (FLD (f_reglist_hi_ld
), 16)) {
5056 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5057 CPU (h_gr
[((UINT
) 12)]) = opval
;
5058 written
|= (1 << 5);
5059 TRACE_RESULT (current_cpu
, abuf
, "gr-12", 'x', opval
);
5062 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5063 CPU (h_gr
[((UINT
) 15)]) = opval
;
5064 written
|= (1 << 8);
5065 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5069 if (ANDSI (FLD (f_reglist_hi_ld
), 32)) {
5072 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5073 CPU (h_gr
[((UINT
) 13)]) = opval
;
5074 written
|= (1 << 6);
5075 TRACE_RESULT (current_cpu
, abuf
, "gr-13", 'x', opval
);
5078 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5079 CPU (h_gr
[((UINT
) 15)]) = opval
;
5080 written
|= (1 << 8);
5081 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5085 if (ANDSI (FLD (f_reglist_hi_ld
), 64)) {
5088 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5089 CPU (h_gr
[((UINT
) 14)]) = opval
;
5090 written
|= (1 << 7);
5091 TRACE_RESULT (current_cpu
, abuf
, "gr-14", 'x', opval
);
5094 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5095 CPU (h_gr
[((UINT
) 15)]) = opval
;
5096 written
|= (1 << 8);
5097 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5101 if (ANDSI (FLD (f_reglist_hi_ld
), 128)) {
5103 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5104 CPU (h_gr
[((UINT
) 15)]) = opval
;
5105 written
|= (1 << 8);
5106 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5111 abuf
->written
= written
;
5116 /* stm0: stm0 ($reglist_low_st) */
5119 SEM_FN_NAME (fr30bf
,stm0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5121 #define FLD(f) abuf->fields.fmt_stm0.f
5122 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5123 int UNUSED written
= 0;
5124 IADDR UNUSED pc
= abuf
->addr
;
5125 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5128 if (ANDSI (FLD (f_reglist_low_st
), 1)) {
5131 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5132 CPU (h_gr
[((UINT
) 15)]) = opval
;
5133 written
|= (1 << 10);
5134 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5137 SI opval
= CPU (h_gr
[((UINT
) 7)]);
5138 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5139 written
|= (1 << 11);
5140 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5144 if (ANDSI (FLD (f_reglist_low_st
), 2)) {
5147 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5148 CPU (h_gr
[((UINT
) 15)]) = opval
;
5149 written
|= (1 << 10);
5150 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5153 SI opval
= CPU (h_gr
[((UINT
) 6)]);
5154 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5155 written
|= (1 << 11);
5156 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5160 if (ANDSI (FLD (f_reglist_low_st
), 4)) {
5163 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5164 CPU (h_gr
[((UINT
) 15)]) = opval
;
5165 written
|= (1 << 10);
5166 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5169 SI opval
= CPU (h_gr
[((UINT
) 5)]);
5170 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5171 written
|= (1 << 11);
5172 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5176 if (ANDSI (FLD (f_reglist_low_st
), 8)) {
5179 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5180 CPU (h_gr
[((UINT
) 15)]) = opval
;
5181 written
|= (1 << 10);
5182 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5185 SI opval
= CPU (h_gr
[((UINT
) 4)]);
5186 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5187 written
|= (1 << 11);
5188 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5192 if (ANDSI (FLD (f_reglist_low_st
), 16)) {
5195 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5196 CPU (h_gr
[((UINT
) 15)]) = opval
;
5197 written
|= (1 << 10);
5198 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5201 SI opval
= CPU (h_gr
[((UINT
) 3)]);
5202 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5203 written
|= (1 << 11);
5204 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5208 if (ANDSI (FLD (f_reglist_low_st
), 32)) {
5211 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5212 CPU (h_gr
[((UINT
) 15)]) = opval
;
5213 written
|= (1 << 10);
5214 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5217 SI opval
= CPU (h_gr
[((UINT
) 2)]);
5218 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5219 written
|= (1 << 11);
5220 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5224 if (ANDSI (FLD (f_reglist_low_st
), 64)) {
5227 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5228 CPU (h_gr
[((UINT
) 15)]) = opval
;
5229 written
|= (1 << 10);
5230 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5233 SI opval
= CPU (h_gr
[((UINT
) 1)]);
5234 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5235 written
|= (1 << 11);
5236 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5240 if (ANDSI (FLD (f_reglist_low_st
), 128)) {
5243 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5244 CPU (h_gr
[((UINT
) 15)]) = opval
;
5245 written
|= (1 << 10);
5246 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5249 SI opval
= CPU (h_gr
[((UINT
) 0)]);
5250 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5251 written
|= (1 << 11);
5252 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5258 abuf
->written
= written
;
5263 /* stm1: stm1 ($reglist_hi_st) */
5266 SEM_FN_NAME (fr30bf
,stm1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5268 #define FLD(f) abuf->fields.fmt_stm1.f
5269 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5270 int UNUSED written
= 0;
5271 IADDR UNUSED pc
= abuf
->addr
;
5272 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5275 if (ANDSI (FLD (f_reglist_hi_st
), 1)) {
5278 tmp_save_r15
= CPU (h_gr
[((UINT
) 15)]);
5280 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5281 CPU (h_gr
[((UINT
) 15)]) = opval
;
5282 written
|= (1 << 9);
5283 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5286 SI opval
= tmp_save_r15
;
5287 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5288 written
|= (1 << 10);
5289 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5293 if (ANDSI (FLD (f_reglist_hi_st
), 2)) {
5296 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5297 CPU (h_gr
[((UINT
) 15)]) = opval
;
5298 written
|= (1 << 9);
5299 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5302 SI opval
= CPU (h_gr
[((UINT
) 14)]);
5303 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5304 written
|= (1 << 10);
5305 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5309 if (ANDSI (FLD (f_reglist_hi_st
), 4)) {
5312 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5313 CPU (h_gr
[((UINT
) 15)]) = opval
;
5314 written
|= (1 << 9);
5315 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5318 SI opval
= CPU (h_gr
[((UINT
) 13)]);
5319 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5320 written
|= (1 << 10);
5321 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5325 if (ANDSI (FLD (f_reglist_hi_st
), 8)) {
5328 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5329 CPU (h_gr
[((UINT
) 15)]) = opval
;
5330 written
|= (1 << 9);
5331 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5334 SI opval
= CPU (h_gr
[((UINT
) 12)]);
5335 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5336 written
|= (1 << 10);
5337 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5341 if (ANDSI (FLD (f_reglist_hi_st
), 16)) {
5344 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5345 CPU (h_gr
[((UINT
) 15)]) = opval
;
5346 written
|= (1 << 9);
5347 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5350 SI opval
= CPU (h_gr
[((UINT
) 11)]);
5351 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5352 written
|= (1 << 10);
5353 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5357 if (ANDSI (FLD (f_reglist_hi_st
), 32)) {
5360 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5361 CPU (h_gr
[((UINT
) 15)]) = opval
;
5362 written
|= (1 << 9);
5363 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5366 SI opval
= CPU (h_gr
[((UINT
) 10)]);
5367 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5368 written
|= (1 << 10);
5369 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5373 if (ANDSI (FLD (f_reglist_hi_st
), 64)) {
5376 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5377 CPU (h_gr
[((UINT
) 15)]) = opval
;
5378 written
|= (1 << 9);
5379 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5382 SI opval
= CPU (h_gr
[((UINT
) 9)]);
5383 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5384 written
|= (1 << 10);
5385 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5389 if (ANDSI (FLD (f_reglist_hi_st
), 128)) {
5392 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5393 CPU (h_gr
[((UINT
) 15)]) = opval
;
5394 written
|= (1 << 9);
5395 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5398 SI opval
= CPU (h_gr
[((UINT
) 8)]);
5399 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5400 written
|= (1 << 10);
5401 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5407 abuf
->written
= written
;
5412 /* enter: enter $u10 */
5415 SEM_FN_NAME (fr30bf
,enter
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5417 #define FLD(f) abuf->fields.fmt_enter.f
5418 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5419 int UNUSED written
= 0;
5420 IADDR UNUSED pc
= abuf
->addr
;
5421 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5425 tmp_tmp
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5427 SI opval
= CPU (h_gr
[((UINT
) 14)]);
5428 SETMEMSI (current_cpu
, pc
, tmp_tmp
, opval
);
5429 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5433 CPU (h_gr
[((UINT
) 14)]) = opval
;
5434 TRACE_RESULT (current_cpu
, abuf
, "gr-14", 'x', opval
);
5437 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_u10
));
5438 CPU (h_gr
[((UINT
) 15)]) = opval
;
5439 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5450 SEM_FN_NAME (fr30bf
,leave
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5452 #define FLD(f) abuf->fields.fmt_leave.f
5453 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5454 int UNUSED written
= 0;
5455 IADDR UNUSED pc
= abuf
->addr
;
5456 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5460 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 14)]), 4);
5461 CPU (h_gr
[((UINT
) 15)]) = opval
;
5462 TRACE_RESULT (current_cpu
, abuf
, "gr-15", 'x', opval
);
5465 SI opval
= GETMEMSI (current_cpu
, pc
, SUBSI (CPU (h_gr
[((UINT
) 15)]), 4));
5466 CPU (h_gr
[((UINT
) 14)]) = opval
;
5467 TRACE_RESULT (current_cpu
, abuf
, "gr-14", 'x', opval
);
5475 /* xchb: xchb @$Rj,$Ri */
5478 SEM_FN_NAME (fr30bf
,xchb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5480 #define FLD(f) abuf->fields.fmt_xchb.f
5481 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5482 int UNUSED written
= 0;
5483 IADDR UNUSED pc
= abuf
->addr
;
5484 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5488 tmp_tmp
= * FLD (i_Ri
);
5490 SI opval
= GETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
));
5491 * FLD (i_Ri
) = opval
;
5492 TRACE_RESULT (current_cpu
, abuf
, "Ri", 'x', opval
);
5495 UQI opval
= tmp_tmp
;
5496 SETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
5497 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
This page took 0.208441 seconds and 4 git commands to generate.