1 /* Simulator instruction semantics for fr30bf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996, 1997, 1998, 1999, 2000 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 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
34 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
36 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
39 /* This is used so that we can compile two copies of the semantic code,
40 one with full feature support and one without that runs fast(er).
41 FAST_P, when desired, is defined on the command line, -DFAST_P=1. */
43 #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
45 #define TRACE_RESULT(cpu, abuf, name, type, val)
47 #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
50 /* x-invalid: --invalid-- */
53 SEM_FN_NAME (fr30bf
,x_invalid
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
55 #define FLD(f) abuf->fields.fmt_empty.f
56 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
57 int UNUSED written
= 0;
58 IADDR UNUSED pc
= abuf
->addr
;
59 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
62 /* Update the recorded pc in the cpu state struct.
63 Only necessary for WITH_SCACHE case, but to avoid the
64 conditional compilation .... */
66 /* Virtual insns have zero size. Overwrite vpc with address of next insn
67 using the default-insn-bitsize spec. When executing insns in parallel
68 we may want to queue the fault and continue execution. */
69 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
70 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
77 /* x-after: --after-- */
80 SEM_FN_NAME (fr30bf
,x_after
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
82 #define FLD(f) abuf->fields.fmt_empty.f
83 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
84 int UNUSED written
= 0;
85 IADDR UNUSED pc
= abuf
->addr
;
86 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
89 #if WITH_SCACHE_PBB_FR30BF
90 fr30bf_pbb_after (current_cpu
, sem_arg
);
98 /* x-before: --before-- */
101 SEM_FN_NAME (fr30bf
,x_before
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
103 #define FLD(f) abuf->fields.fmt_empty.f
104 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
105 int UNUSED written
= 0;
106 IADDR UNUSED pc
= abuf
->addr
;
107 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
110 #if WITH_SCACHE_PBB_FR30BF
111 fr30bf_pbb_before (current_cpu
, sem_arg
);
119 /* x-cti-chain: --cti-chain-- */
122 SEM_FN_NAME (fr30bf
,x_cti_chain
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
124 #define FLD(f) abuf->fields.fmt_empty.f
125 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
126 int UNUSED written
= 0;
127 IADDR UNUSED pc
= abuf
->addr
;
128 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
131 #if WITH_SCACHE_PBB_FR30BF
133 vpc
= fr30bf_pbb_cti_chain (current_cpu
, sem_arg
,
134 pbb_br_type
, pbb_br_npc
);
137 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
138 vpc
= fr30bf_pbb_cti_chain (current_cpu
, sem_arg
,
139 CPU_PBB_BR_TYPE (current_cpu
),
140 CPU_PBB_BR_NPC (current_cpu
));
149 /* x-chain: --chain-- */
152 SEM_FN_NAME (fr30bf
,x_chain
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
154 #define FLD(f) abuf->fields.fmt_empty.f
155 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
156 int UNUSED written
= 0;
157 IADDR UNUSED pc
= abuf
->addr
;
158 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
161 #if WITH_SCACHE_PBB_FR30BF
162 vpc
= fr30bf_pbb_chain (current_cpu
, sem_arg
);
173 /* x-begin: --begin-- */
176 SEM_FN_NAME (fr30bf
,x_begin
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
178 #define FLD(f) abuf->fields.fmt_empty.f
179 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
180 int UNUSED written
= 0;
181 IADDR UNUSED pc
= abuf
->addr
;
182 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
185 #if WITH_SCACHE_PBB_FR30BF
186 #if defined DEFINE_SWITCH || defined FAST_P
187 /* In the switch case FAST_P is a constant, allowing several optimizations
188 in any called inline functions. */
189 vpc
= fr30bf_pbb_begin (current_cpu
, FAST_P
);
191 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
192 vpc
= fr30bf_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
194 vpc
= fr30bf_pbb_begin (current_cpu
, 0);
204 /* add: add $Rj,$Ri */
207 SEM_FN_NAME (fr30bf
,add
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
209 #define FLD(f) abuf->fields.sfmt_add.f
210 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
211 int UNUSED written
= 0;
212 IADDR UNUSED pc
= abuf
->addr
;
213 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
217 BI opval
= ADDOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
218 CPU (h_vbit
) = opval
;
219 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
222 BI opval
= ADDCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
223 CPU (h_cbit
) = opval
;
224 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
227 SI opval
= ADDSI (* FLD (i_Ri
), * FLD (i_Rj
));
228 * FLD (i_Ri
) = opval
;
229 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
233 BI opval
= EQSI (* FLD (i_Ri
), 0);
234 CPU (h_zbit
) = opval
;
235 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
238 BI opval
= LTSI (* FLD (i_Ri
), 0);
239 CPU (h_nbit
) = opval
;
240 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
249 /* addi: add $u4,$Ri */
252 SEM_FN_NAME (fr30bf
,addi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
254 #define FLD(f) abuf->fields.sfmt_addi.f
255 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
256 int UNUSED written
= 0;
257 IADDR UNUSED pc
= abuf
->addr
;
258 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
262 BI opval
= ADDOFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
263 CPU (h_vbit
) = opval
;
264 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
267 BI opval
= ADDCFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
268 CPU (h_cbit
) = opval
;
269 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
272 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_u4
));
273 * FLD (i_Ri
) = opval
;
274 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
278 BI opval
= EQSI (* FLD (i_Ri
), 0);
279 CPU (h_zbit
) = opval
;
280 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
283 BI opval
= LTSI (* FLD (i_Ri
), 0);
284 CPU (h_nbit
) = opval
;
285 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
294 /* add2: add2 $m4,$Ri */
297 SEM_FN_NAME (fr30bf
,add2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
299 #define FLD(f) abuf->fields.sfmt_add2.f
300 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
301 int UNUSED written
= 0;
302 IADDR UNUSED pc
= abuf
->addr
;
303 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
307 BI opval
= ADDOFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
308 CPU (h_vbit
) = opval
;
309 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
312 BI opval
= ADDCFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
313 CPU (h_cbit
) = opval
;
314 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
317 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_m4
));
318 * FLD (i_Ri
) = opval
;
319 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
323 BI opval
= EQSI (* FLD (i_Ri
), 0);
324 CPU (h_zbit
) = opval
;
325 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
328 BI opval
= LTSI (* FLD (i_Ri
), 0);
329 CPU (h_nbit
) = opval
;
330 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
339 /* addc: addc $Rj,$Ri */
342 SEM_FN_NAME (fr30bf
,addc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
344 #define FLD(f) abuf->fields.sfmt_add.f
345 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
346 int UNUSED written
= 0;
347 IADDR UNUSED pc
= abuf
->addr
;
348 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
352 tmp_tmp
= ADDCSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
354 BI opval
= ADDOFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
355 CPU (h_vbit
) = opval
;
356 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
359 BI opval
= ADDCFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
360 CPU (h_cbit
) = opval
;
361 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
365 * FLD (i_Ri
) = opval
;
366 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
370 BI opval
= EQSI (* FLD (i_Ri
), 0);
371 CPU (h_zbit
) = opval
;
372 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
375 BI opval
= LTSI (* FLD (i_Ri
), 0);
376 CPU (h_nbit
) = opval
;
377 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
386 /* addn: addn $Rj,$Ri */
389 SEM_FN_NAME (fr30bf
,addn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
391 #define FLD(f) abuf->fields.sfmt_add.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 (i_Rj
));
399 * FLD (i_Ri
) = opval
;
400 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
407 /* addni: addn $u4,$Ri */
410 SEM_FN_NAME (fr30bf
,addni
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
412 #define FLD(f) abuf->fields.sfmt_addi.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_u4
));
420 * FLD (i_Ri
) = opval
;
421 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
428 /* addn2: addn2 $m4,$Ri */
431 SEM_FN_NAME (fr30bf
,addn2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
433 #define FLD(f) abuf->fields.sfmt_add2.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);
440 SI opval
= ADDSI (* FLD (i_Ri
), FLD (f_m4
));
441 * FLD (i_Ri
) = opval
;
442 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
449 /* sub: sub $Rj,$Ri */
452 SEM_FN_NAME (fr30bf
,sub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
454 #define FLD(f) abuf->fields.sfmt_add.f
455 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
456 int UNUSED written
= 0;
457 IADDR UNUSED pc
= abuf
->addr
;
458 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
462 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
463 CPU (h_vbit
) = opval
;
464 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
467 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
468 CPU (h_cbit
) = opval
;
469 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
472 SI opval
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
473 * FLD (i_Ri
) = opval
;
474 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
478 BI opval
= EQSI (* FLD (i_Ri
), 0);
479 CPU (h_zbit
) = opval
;
480 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
483 BI opval
= LTSI (* FLD (i_Ri
), 0);
484 CPU (h_nbit
) = opval
;
485 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
494 /* subc: subc $Rj,$Ri */
497 SEM_FN_NAME (fr30bf
,subc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
499 #define FLD(f) abuf->fields.sfmt_add.f
500 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
501 int UNUSED written
= 0;
502 IADDR UNUSED pc
= abuf
->addr
;
503 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
507 tmp_tmp
= SUBCSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
509 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
510 CPU (h_vbit
) = opval
;
511 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
514 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), CPU (h_cbit
));
515 CPU (h_cbit
) = opval
;
516 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
520 * FLD (i_Ri
) = opval
;
521 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
525 BI opval
= EQSI (* FLD (i_Ri
), 0);
526 CPU (h_zbit
) = opval
;
527 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
530 BI opval
= LTSI (* FLD (i_Ri
), 0);
531 CPU (h_nbit
) = opval
;
532 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
541 /* subn: subn $Rj,$Ri */
544 SEM_FN_NAME (fr30bf
,subn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
546 #define FLD(f) abuf->fields.sfmt_add.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);
553 SI opval
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
554 * FLD (i_Ri
) = opval
;
555 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
562 /* cmp: cmp $Rj,$Ri */
565 SEM_FN_NAME (fr30bf
,cmp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
567 #define FLD(f) abuf->fields.sfmt_str13.f
568 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
569 int UNUSED written
= 0;
570 IADDR UNUSED pc
= abuf
->addr
;
571 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
576 BI opval
= SUBOFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
577 CPU (h_vbit
) = opval
;
578 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
581 BI opval
= SUBCFSI (* FLD (i_Ri
), * FLD (i_Rj
), 0);
582 CPU (h_cbit
) = opval
;
583 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
585 tmp_tmp1
= SUBSI (* FLD (i_Ri
), * FLD (i_Rj
));
588 BI opval
= EQSI (tmp_tmp1
, 0);
589 CPU (h_zbit
) = opval
;
590 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
593 BI opval
= LTSI (tmp_tmp1
, 0);
594 CPU (h_nbit
) = opval
;
595 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
604 /* cmpi: cmp $u4,$Ri */
607 SEM_FN_NAME (fr30bf
,cmpi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
609 #define FLD(f) abuf->fields.sfmt_addi.f
610 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
611 int UNUSED written
= 0;
612 IADDR UNUSED pc
= abuf
->addr
;
613 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
618 BI opval
= SUBOFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
619 CPU (h_vbit
) = opval
;
620 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
623 BI opval
= SUBCFSI (* FLD (i_Ri
), FLD (f_u4
), 0);
624 CPU (h_cbit
) = opval
;
625 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
627 tmp_tmp1
= SUBSI (* FLD (i_Ri
), FLD (f_u4
));
630 BI opval
= EQSI (tmp_tmp1
, 0);
631 CPU (h_zbit
) = opval
;
632 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
635 BI opval
= LTSI (tmp_tmp1
, 0);
636 CPU (h_nbit
) = opval
;
637 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
646 /* cmp2: cmp2 $m4,$Ri */
649 SEM_FN_NAME (fr30bf
,cmp2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
651 #define FLD(f) abuf->fields.sfmt_add2.f
652 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
653 int UNUSED written
= 0;
654 IADDR UNUSED pc
= abuf
->addr
;
655 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
660 BI opval
= SUBOFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
661 CPU (h_vbit
) = opval
;
662 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
665 BI opval
= SUBCFSI (* FLD (i_Ri
), FLD (f_m4
), 0);
666 CPU (h_cbit
) = opval
;
667 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
669 tmp_tmp1
= SUBSI (* FLD (i_Ri
), FLD (f_m4
));
672 BI opval
= EQSI (tmp_tmp1
, 0);
673 CPU (h_zbit
) = opval
;
674 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
677 BI opval
= LTSI (tmp_tmp1
, 0);
678 CPU (h_nbit
) = opval
;
679 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
688 /* and: and $Rj,$Ri */
691 SEM_FN_NAME (fr30bf
,and) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
693 #define FLD(f) abuf->fields.sfmt_add.f
694 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
695 int UNUSED written
= 0;
696 IADDR UNUSED pc
= abuf
->addr
;
697 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
701 SI opval
= ANDSI (* FLD (i_Ri
), * FLD (i_Rj
));
702 * FLD (i_Ri
) = opval
;
703 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
707 BI opval
= EQSI (* FLD (i_Ri
), 0);
708 CPU (h_zbit
) = opval
;
709 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
712 BI opval
= LTSI (* FLD (i_Ri
), 0);
713 CPU (h_nbit
) = opval
;
714 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
726 SEM_FN_NAME (fr30bf
,or) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
728 #define FLD(f) abuf->fields.sfmt_add.f
729 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
730 int UNUSED written
= 0;
731 IADDR UNUSED pc
= abuf
->addr
;
732 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
736 SI opval
= ORSI (* FLD (i_Ri
), * FLD (i_Rj
));
737 * FLD (i_Ri
) = opval
;
738 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
742 BI opval
= EQSI (* FLD (i_Ri
), 0);
743 CPU (h_zbit
) = opval
;
744 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
747 BI opval
= LTSI (* FLD (i_Ri
), 0);
748 CPU (h_nbit
) = opval
;
749 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
758 /* eor: eor $Rj,$Ri */
761 SEM_FN_NAME (fr30bf
,eor
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
763 #define FLD(f) abuf->fields.sfmt_add.f
764 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
765 int UNUSED written
= 0;
766 IADDR UNUSED pc
= abuf
->addr
;
767 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
771 SI opval
= XORSI (* FLD (i_Ri
), * FLD (i_Rj
));
772 * FLD (i_Ri
) = opval
;
773 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
777 BI opval
= EQSI (* FLD (i_Ri
), 0);
778 CPU (h_zbit
) = opval
;
779 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
782 BI opval
= LTSI (* FLD (i_Ri
), 0);
783 CPU (h_nbit
) = opval
;
784 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
793 /* andm: and $Rj,@$Ri */
796 SEM_FN_NAME (fr30bf
,andm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
798 #define FLD(f) abuf->fields.sfmt_str13.f
799 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
800 int UNUSED written
= 0;
801 IADDR UNUSED pc
= abuf
->addr
;
802 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
806 tmp_tmp
= ANDSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
809 BI opval
= EQSI (tmp_tmp
, 0);
810 CPU (h_zbit
) = opval
;
811 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
814 BI opval
= LTSI (tmp_tmp
, 0);
815 CPU (h_nbit
) = opval
;
816 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
821 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
822 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
830 /* andh: andh $Rj,@$Ri */
833 SEM_FN_NAME (fr30bf
,andh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
835 #define FLD(f) abuf->fields.sfmt_str13.f
836 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
837 int UNUSED written
= 0;
838 IADDR UNUSED pc
= abuf
->addr
;
839 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
843 tmp_tmp
= ANDHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
846 BI opval
= EQHI (tmp_tmp
, 0);
847 CPU (h_zbit
) = opval
;
848 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
851 BI opval
= LTHI (tmp_tmp
, 0);
852 CPU (h_nbit
) = opval
;
853 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
858 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
859 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
867 /* andb: andb $Rj,@$Ri */
870 SEM_FN_NAME (fr30bf
,andb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
872 #define FLD(f) abuf->fields.sfmt_str13.f
873 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
874 int UNUSED written
= 0;
875 IADDR UNUSED pc
= abuf
->addr
;
876 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
880 tmp_tmp
= ANDQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
883 BI opval
= EQQI (tmp_tmp
, 0);
884 CPU (h_zbit
) = opval
;
885 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
888 BI opval
= LTQI (tmp_tmp
, 0);
889 CPU (h_nbit
) = opval
;
890 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
895 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
896 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
904 /* orm: or $Rj,@$Ri */
907 SEM_FN_NAME (fr30bf
,orm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
909 #define FLD(f) abuf->fields.sfmt_str13.f
910 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
911 int UNUSED written
= 0;
912 IADDR UNUSED pc
= abuf
->addr
;
913 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
917 tmp_tmp
= ORSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
920 BI opval
= EQSI (tmp_tmp
, 0);
921 CPU (h_zbit
) = opval
;
922 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
925 BI opval
= LTSI (tmp_tmp
, 0);
926 CPU (h_nbit
) = opval
;
927 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
932 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
933 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
941 /* orh: orh $Rj,@$Ri */
944 SEM_FN_NAME (fr30bf
,orh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
946 #define FLD(f) abuf->fields.sfmt_str13.f
947 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
948 int UNUSED written
= 0;
949 IADDR UNUSED pc
= abuf
->addr
;
950 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
954 tmp_tmp
= ORHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
957 BI opval
= EQHI (tmp_tmp
, 0);
958 CPU (h_zbit
) = opval
;
959 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
962 BI opval
= LTHI (tmp_tmp
, 0);
963 CPU (h_nbit
) = opval
;
964 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
969 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
970 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
978 /* orb: orb $Rj,@$Ri */
981 SEM_FN_NAME (fr30bf
,orb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
983 #define FLD(f) abuf->fields.sfmt_str13.f
984 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
985 int UNUSED written
= 0;
986 IADDR UNUSED pc
= abuf
->addr
;
987 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
991 tmp_tmp
= ORQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
994 BI opval
= EQQI (tmp_tmp
, 0);
995 CPU (h_zbit
) = opval
;
996 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
999 BI opval
= LTQI (tmp_tmp
, 0);
1000 CPU (h_nbit
) = opval
;
1001 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1006 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1007 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1015 /* eorm: eor $Rj,@$Ri */
1018 SEM_FN_NAME (fr30bf
,eorm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1020 #define FLD(f) abuf->fields.sfmt_str13.f
1021 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1022 int UNUSED written
= 0;
1023 IADDR UNUSED pc
= abuf
->addr
;
1024 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1028 tmp_tmp
= XORSI (GETMEMSI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1031 BI opval
= EQSI (tmp_tmp
, 0);
1032 CPU (h_zbit
) = opval
;
1033 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1036 BI opval
= LTSI (tmp_tmp
, 0);
1037 CPU (h_nbit
) = opval
;
1038 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1043 SETMEMSI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1044 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1052 /* eorh: eorh $Rj,@$Ri */
1055 SEM_FN_NAME (fr30bf
,eorh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1057 #define FLD(f) abuf->fields.sfmt_str13.f
1058 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1059 int UNUSED written
= 0;
1060 IADDR UNUSED pc
= abuf
->addr
;
1061 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1065 tmp_tmp
= XORHI (GETMEMHI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1068 BI opval
= EQHI (tmp_tmp
, 0);
1069 CPU (h_zbit
) = opval
;
1070 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1073 BI opval
= LTHI (tmp_tmp
, 0);
1074 CPU (h_nbit
) = opval
;
1075 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1080 SETMEMHI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1081 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1089 /* eorb: eorb $Rj,@$Ri */
1092 SEM_FN_NAME (fr30bf
,eorb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1094 #define FLD(f) abuf->fields.sfmt_str13.f
1095 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1096 int UNUSED written
= 0;
1097 IADDR UNUSED pc
= abuf
->addr
;
1098 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1102 tmp_tmp
= XORQI (GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)), * FLD (i_Rj
));
1105 BI opval
= EQQI (tmp_tmp
, 0);
1106 CPU (h_zbit
) = opval
;
1107 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1110 BI opval
= LTQI (tmp_tmp
, 0);
1111 CPU (h_nbit
) = opval
;
1112 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1117 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1118 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1126 /* bandl: bandl $u4,@$Ri */
1129 SEM_FN_NAME (fr30bf
,bandl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1131 #define FLD(f) abuf->fields.sfmt_addi.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
= ANDQI (ORQI (FLD (f_u4
), 240), 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 /* borl: borl $u4,@$Ri */
1150 SEM_FN_NAME (fr30bf
,borl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1152 #define FLD(f) abuf->fields.sfmt_addi.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
= ORQI (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 /* beorl: beorl $u4,@$Ri */
1171 SEM_FN_NAME (fr30bf
,beorl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1173 #define FLD(f) abuf->fields.sfmt_addi.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
= XORQI (FLD (f_u4
), 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 /* bandh: bandh $u4,@$Ri */
1192 SEM_FN_NAME (fr30bf
,bandh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1194 #define FLD(f) abuf->fields.sfmt_addi.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
= ANDQI (ORQI (SLLQI (FLD (f_u4
), 4), 15), 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 /* borh: borh $u4,@$Ri */
1213 SEM_FN_NAME (fr30bf
,borh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1215 #define FLD(f) abuf->fields.sfmt_addi.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
= ORQI (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 /* beorh: beorh $u4,@$Ri */
1234 SEM_FN_NAME (fr30bf
,beorh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1236 #define FLD(f) abuf->fields.sfmt_addi.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);
1243 QI opval
= XORQI (SLLQI (FLD (f_u4
), 4), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1244 SETMEMQI (current_cpu
, pc
, * FLD (i_Ri
), opval
);
1245 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1252 /* btstl: btstl $u4,@$Ri */
1255 SEM_FN_NAME (fr30bf
,btstl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1257 #define FLD(f) abuf->fields.sfmt_addi.f
1258 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1259 int UNUSED written
= 0;
1260 IADDR UNUSED pc
= abuf
->addr
;
1261 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1265 tmp_tmp
= ANDQI (FLD (f_u4
), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1267 BI opval
= EQQI (tmp_tmp
, 0);
1268 CPU (h_zbit
) = opval
;
1269 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1273 CPU (h_nbit
) = opval
;
1274 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1282 /* btsth: btsth $u4,@$Ri */
1285 SEM_FN_NAME (fr30bf
,btsth
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1287 #define FLD(f) abuf->fields.sfmt_addi.f
1288 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1289 int UNUSED written
= 0;
1290 IADDR UNUSED pc
= abuf
->addr
;
1291 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1295 tmp_tmp
= ANDQI (SLLQI (FLD (f_u4
), 4), GETMEMQI (current_cpu
, pc
, * FLD (i_Ri
)));
1297 BI opval
= EQQI (tmp_tmp
, 0);
1298 CPU (h_zbit
) = opval
;
1299 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1302 BI opval
= LTQI (tmp_tmp
, 0);
1303 CPU (h_nbit
) = opval
;
1304 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1312 /* mul: mul $Rj,$Ri */
1315 SEM_FN_NAME (fr30bf
,mul
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1317 #define FLD(f) abuf->fields.sfmt_str13.f
1318 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1319 int UNUSED written
= 0;
1320 IADDR UNUSED pc
= abuf
->addr
;
1321 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1325 tmp_tmp
= MULDI (EXTSIDI (* FLD (i_Rj
)), EXTSIDI (* FLD (i_Ri
)));
1327 SI opval
= TRUNCDISI (tmp_tmp
);
1328 SET_H_DR (((UINT
) 5), opval
);
1329 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1332 SI opval
= TRUNCDISI (SRLDI (tmp_tmp
, 32));
1333 SET_H_DR (((UINT
) 4), opval
);
1334 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1337 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1338 CPU (h_nbit
) = opval
;
1339 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1342 BI opval
= EQDI (tmp_tmp
, MAKEDI (0, 0));
1343 CPU (h_zbit
) = opval
;
1344 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1347 BI opval
= ORIF (GTDI (tmp_tmp
, MAKEDI (0, 2147483647)), LTDI (tmp_tmp
, NEGDI (MAKEDI (0, 0x80000000))));
1348 CPU (h_vbit
) = opval
;
1349 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1357 /* mulu: mulu $Rj,$Ri */
1360 SEM_FN_NAME (fr30bf
,mulu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1362 #define FLD(f) abuf->fields.sfmt_str13.f
1363 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1364 int UNUSED written
= 0;
1365 IADDR UNUSED pc
= abuf
->addr
;
1366 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1370 tmp_tmp
= MULDI (ZEXTSIDI (* FLD (i_Rj
)), ZEXTSIDI (* FLD (i_Ri
)));
1372 SI opval
= TRUNCDISI (tmp_tmp
);
1373 SET_H_DR (((UINT
) 5), opval
);
1374 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1377 SI opval
= TRUNCDISI (SRLDI (tmp_tmp
, 32));
1378 SET_H_DR (((UINT
) 4), opval
);
1379 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1382 BI opval
= LTSI (GET_H_DR (((UINT
) 4)), 0);
1383 CPU (h_nbit
) = opval
;
1384 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1387 BI opval
= EQSI (GET_H_DR (((UINT
) 5)), 0);
1388 CPU (h_zbit
) = opval
;
1389 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1392 BI opval
= NESI (GET_H_DR (((UINT
) 4)), 0);
1393 CPU (h_vbit
) = opval
;
1394 TRACE_RESULT (current_cpu
, abuf
, "vbit", 'x', opval
);
1402 /* mulh: mulh $Rj,$Ri */
1405 SEM_FN_NAME (fr30bf
,mulh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1407 #define FLD(f) abuf->fields.sfmt_str13.f
1408 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1409 int UNUSED written
= 0;
1410 IADDR UNUSED pc
= abuf
->addr
;
1411 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1415 SI opval
= MULHI (TRUNCSIHI (* FLD (i_Rj
)), TRUNCSIHI (* FLD (i_Ri
)));
1416 SET_H_DR (((UINT
) 5), opval
);
1417 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1420 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1421 CPU (h_nbit
) = opval
;
1422 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1425 BI opval
= GESI (GET_H_DR (((UINT
) 5)), 0);
1426 CPU (h_zbit
) = opval
;
1427 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1435 /* muluh: muluh $Rj,$Ri */
1438 SEM_FN_NAME (fr30bf
,muluh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1440 #define FLD(f) abuf->fields.sfmt_str13.f
1441 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1442 int UNUSED written
= 0;
1443 IADDR UNUSED pc
= abuf
->addr
;
1444 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1448 SI opval
= MULSI (ANDSI (* FLD (i_Rj
), 65535), ANDSI (* FLD (i_Ri
), 65535));
1449 SET_H_DR (((UINT
) 5), opval
);
1450 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1453 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1454 CPU (h_nbit
) = opval
;
1455 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1458 BI opval
= GESI (GET_H_DR (((UINT
) 5)), 0);
1459 CPU (h_zbit
) = opval
;
1460 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1468 /* div0s: div0s $Ri */
1471 SEM_FN_NAME (fr30bf
,div0s
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1473 #define FLD(f) abuf->fields.sfmt_mov2dr.f
1474 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1475 int UNUSED written
= 0;
1476 IADDR UNUSED pc
= abuf
->addr
;
1477 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1481 BI opval
= LTSI (GET_H_DR (((UINT
) 5)), 0);
1482 CPU (h_d0bit
) = opval
;
1483 TRACE_RESULT (current_cpu
, abuf
, "d0bit", 'x', opval
);
1486 BI opval
= XORBI (CPU (h_d0bit
), LTSI (* FLD (i_Ri
), 0));
1487 CPU (h_d1bit
) = opval
;
1488 TRACE_RESULT (current_cpu
, abuf
, "d1bit", 'x', opval
);
1490 if (NEBI (CPU (h_d0bit
), 0)) {
1492 SI opval
= 0xffffffff;
1493 SET_H_DR (((UINT
) 4), opval
);
1494 written
|= (1 << 5);
1495 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1500 SET_H_DR (((UINT
) 4), opval
);
1501 written
|= (1 << 5);
1502 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1507 abuf
->written
= written
;
1512 /* div0u: div0u $Ri */
1515 SEM_FN_NAME (fr30bf
,div0u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1517 #define FLD(f) abuf->fields.fmt_empty.f
1518 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1519 int UNUSED written
= 0;
1520 IADDR UNUSED pc
= abuf
->addr
;
1521 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1526 CPU (h_d0bit
) = opval
;
1527 TRACE_RESULT (current_cpu
, abuf
, "d0bit", 'x', opval
);
1531 CPU (h_d1bit
) = opval
;
1532 TRACE_RESULT (current_cpu
, abuf
, "d1bit", 'x', opval
);
1536 SET_H_DR (((UINT
) 4), opval
);
1537 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1545 /* div1: div1 $Ri */
1548 SEM_FN_NAME (fr30bf
,div1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1550 #define FLD(f) abuf->fields.sfmt_mov2dr.f
1551 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1552 int UNUSED written
= 0;
1553 IADDR UNUSED pc
= abuf
->addr
;
1554 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1559 SI opval
= SLLSI (GET_H_DR (((UINT
) 4)), 1);
1560 SET_H_DR (((UINT
) 4), opval
);
1561 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1563 if (LTSI (GET_H_DR (((UINT
) 5)), 0)) {
1565 SI opval
= ADDSI (GET_H_DR (((UINT
) 4)), 1);
1566 SET_H_DR (((UINT
) 4), opval
);
1567 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1571 SI opval
= SLLSI (GET_H_DR (((UINT
) 5)), 1);
1572 SET_H_DR (((UINT
) 5), opval
);
1573 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1575 if (EQBI (CPU (h_d1bit
), 1)) {
1577 tmp_tmp
= ADDSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1579 BI opval
= ADDCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1580 CPU (h_cbit
) = opval
;
1581 written
|= (1 << 6);
1582 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1587 tmp_tmp
= SUBSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1589 BI opval
= SUBCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1590 CPU (h_cbit
) = opval
;
1591 written
|= (1 << 6);
1592 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1596 if (NOTBI (XORBI (XORBI (CPU (h_d0bit
), CPU (h_d1bit
)), CPU (h_cbit
)))) {
1600 SET_H_DR (((UINT
) 4), opval
);
1601 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1604 SI opval
= ORSI (GET_H_DR (((UINT
) 5)), 1);
1605 SET_H_DR (((UINT
) 5), opval
);
1606 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1611 BI opval
= EQSI (GET_H_DR (((UINT
) 4)), 0);
1612 CPU (h_zbit
) = opval
;
1613 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1617 abuf
->written
= written
;
1622 /* div2: div2 $Ri */
1625 SEM_FN_NAME (fr30bf
,div2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1627 #define FLD(f) abuf->fields.sfmt_mov2dr.f
1628 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1629 int UNUSED written
= 0;
1630 IADDR UNUSED pc
= abuf
->addr
;
1631 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1635 if (EQBI (CPU (h_d1bit
), 1)) {
1637 tmp_tmp
= ADDSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1639 BI opval
= ADDCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1640 CPU (h_cbit
) = opval
;
1641 written
|= (1 << 3);
1642 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1647 tmp_tmp
= SUBSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
));
1649 BI opval
= SUBCFSI (GET_H_DR (((UINT
) 4)), * FLD (i_Ri
), 0);
1650 CPU (h_cbit
) = opval
;
1651 written
|= (1 << 3);
1652 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1656 if (EQSI (tmp_tmp
, 0)) {
1660 CPU (h_zbit
) = opval
;
1661 written
|= (1 << 5);
1662 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1666 SET_H_DR (((UINT
) 4), opval
);
1667 written
|= (1 << 4);
1668 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1674 CPU (h_zbit
) = opval
;
1675 written
|= (1 << 5);
1676 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1681 abuf
->written
= written
;
1689 SEM_FN_NAME (fr30bf
,div3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1691 #define FLD(f) abuf->fields.fmt_empty.f
1692 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1693 int UNUSED written
= 0;
1694 IADDR UNUSED pc
= abuf
->addr
;
1695 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1697 if (EQBI (CPU (h_zbit
), 1)) {
1699 SI opval
= ADDSI (GET_H_DR (((UINT
) 5)), 1);
1700 SET_H_DR (((UINT
) 5), opval
);
1701 written
|= (1 << 2);
1702 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1706 abuf
->written
= written
;
1714 SEM_FN_NAME (fr30bf
,div4s
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1716 #define FLD(f) abuf->fields.fmt_empty.f
1717 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1718 int UNUSED written
= 0;
1719 IADDR UNUSED pc
= abuf
->addr
;
1720 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1722 if (EQBI (CPU (h_d1bit
), 1)) {
1724 SI opval
= NEGSI (GET_H_DR (((UINT
) 5)));
1725 SET_H_DR (((UINT
) 5), opval
);
1726 written
|= (1 << 2);
1727 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
1731 abuf
->written
= written
;
1736 /* lsl: lsl $Rj,$Ri */
1739 SEM_FN_NAME (fr30bf
,lsl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1741 #define FLD(f) abuf->fields.sfmt_add.f
1742 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1743 int UNUSED written
= 0;
1744 IADDR UNUSED pc
= abuf
->addr
;
1745 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1749 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
1750 if (NESI (tmp_shift
, 0)) {
1753 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1754 CPU (h_cbit
) = opval
;
1755 written
|= (1 << 3);
1756 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1759 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1760 * FLD (i_Ri
) = opval
;
1761 written
|= (1 << 2);
1762 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1768 CPU (h_cbit
) = opval
;
1769 written
|= (1 << 3);
1770 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1774 BI opval
= LTSI (* FLD (i_Ri
), 0);
1775 CPU (h_nbit
) = opval
;
1776 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1779 BI opval
= EQSI (* FLD (i_Ri
), 0);
1780 CPU (h_zbit
) = opval
;
1781 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1785 abuf
->written
= written
;
1790 /* lsli: lsl $u4,$Ri */
1793 SEM_FN_NAME (fr30bf
,lsli
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1795 #define FLD(f) abuf->fields.sfmt_addi.f
1796 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1797 int UNUSED written
= 0;
1798 IADDR UNUSED pc
= abuf
->addr
;
1799 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1803 tmp_shift
= FLD (f_u4
);
1804 if (NESI (tmp_shift
, 0)) {
1807 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1808 CPU (h_cbit
) = opval
;
1809 written
|= (1 << 3);
1810 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1813 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1814 * FLD (i_Ri
) = opval
;
1815 written
|= (1 << 2);
1816 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1822 CPU (h_cbit
) = opval
;
1823 written
|= (1 << 3);
1824 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1828 BI opval
= LTSI (* FLD (i_Ri
), 0);
1829 CPU (h_nbit
) = opval
;
1830 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1833 BI opval
= EQSI (* FLD (i_Ri
), 0);
1834 CPU (h_zbit
) = opval
;
1835 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1839 abuf
->written
= written
;
1844 /* lsl2: lsl2 $u4,$Ri */
1847 SEM_FN_NAME (fr30bf
,lsl2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1849 #define FLD(f) abuf->fields.sfmt_addi.f
1850 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1851 int UNUSED written
= 0;
1852 IADDR UNUSED pc
= abuf
->addr
;
1853 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1857 tmp_shift
= ADDSI (FLD (f_u4
), 16);
1858 if (NESI (tmp_shift
, 0)) {
1861 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (32, tmp_shift
))), 0);
1862 CPU (h_cbit
) = opval
;
1863 written
|= (1 << 3);
1864 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1867 SI opval
= SLLSI (* FLD (i_Ri
), tmp_shift
);
1868 * FLD (i_Ri
) = opval
;
1869 written
|= (1 << 2);
1870 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1876 CPU (h_cbit
) = opval
;
1877 written
|= (1 << 3);
1878 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1882 BI opval
= LTSI (* FLD (i_Ri
), 0);
1883 CPU (h_nbit
) = opval
;
1884 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1887 BI opval
= EQSI (* FLD (i_Ri
), 0);
1888 CPU (h_zbit
) = opval
;
1889 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1893 abuf
->written
= written
;
1898 /* lsr: lsr $Rj,$Ri */
1901 SEM_FN_NAME (fr30bf
,lsr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1903 #define FLD(f) abuf->fields.sfmt_add.f
1904 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1905 int UNUSED written
= 0;
1906 IADDR UNUSED pc
= abuf
->addr
;
1907 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1911 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
1912 if (NESI (tmp_shift
, 0)) {
1915 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
1916 CPU (h_cbit
) = opval
;
1917 written
|= (1 << 3);
1918 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1921 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
1922 * FLD (i_Ri
) = opval
;
1923 written
|= (1 << 2);
1924 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1930 CPU (h_cbit
) = opval
;
1931 written
|= (1 << 3);
1932 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1936 BI opval
= LTSI (* FLD (i_Ri
), 0);
1937 CPU (h_nbit
) = opval
;
1938 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1941 BI opval
= EQSI (* FLD (i_Ri
), 0);
1942 CPU (h_zbit
) = opval
;
1943 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
1947 abuf
->written
= written
;
1952 /* lsri: lsr $u4,$Ri */
1955 SEM_FN_NAME (fr30bf
,lsri
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1957 #define FLD(f) abuf->fields.sfmt_addi.f
1958 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1959 int UNUSED written
= 0;
1960 IADDR UNUSED pc
= abuf
->addr
;
1961 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
1965 tmp_shift
= FLD (f_u4
);
1966 if (NESI (tmp_shift
, 0)) {
1969 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
1970 CPU (h_cbit
) = opval
;
1971 written
|= (1 << 3);
1972 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1975 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
1976 * FLD (i_Ri
) = opval
;
1977 written
|= (1 << 2);
1978 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1984 CPU (h_cbit
) = opval
;
1985 written
|= (1 << 3);
1986 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
1990 BI opval
= LTSI (* FLD (i_Ri
), 0);
1991 CPU (h_nbit
) = opval
;
1992 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
1995 BI opval
= EQSI (* FLD (i_Ri
), 0);
1996 CPU (h_zbit
) = opval
;
1997 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2001 abuf
->written
= written
;
2006 /* lsr2: lsr2 $u4,$Ri */
2009 SEM_FN_NAME (fr30bf
,lsr2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2011 #define FLD(f) abuf->fields.sfmt_addi.f
2012 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2013 int UNUSED written
= 0;
2014 IADDR UNUSED pc
= abuf
->addr
;
2015 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2019 tmp_shift
= ADDSI (FLD (f_u4
), 16);
2020 if (NESI (tmp_shift
, 0)) {
2023 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2024 CPU (h_cbit
) = opval
;
2025 written
|= (1 << 3);
2026 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2029 SI opval
= SRLSI (* FLD (i_Ri
), tmp_shift
);
2030 * FLD (i_Ri
) = opval
;
2031 written
|= (1 << 2);
2032 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2038 CPU (h_cbit
) = opval
;
2039 written
|= (1 << 3);
2040 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2044 BI opval
= LTSI (* FLD (i_Ri
), 0);
2045 CPU (h_nbit
) = opval
;
2046 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2049 BI opval
= EQSI (* FLD (i_Ri
), 0);
2050 CPU (h_zbit
) = opval
;
2051 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2055 abuf
->written
= written
;
2060 /* asr: asr $Rj,$Ri */
2063 SEM_FN_NAME (fr30bf
,asr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2065 #define FLD(f) abuf->fields.sfmt_add.f
2066 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2067 int UNUSED written
= 0;
2068 IADDR UNUSED pc
= abuf
->addr
;
2069 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2073 tmp_shift
= ANDSI (* FLD (i_Rj
), 31);
2074 if (NESI (tmp_shift
, 0)) {
2077 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2078 CPU (h_cbit
) = opval
;
2079 written
|= (1 << 3);
2080 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2083 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2084 * FLD (i_Ri
) = opval
;
2085 written
|= (1 << 2);
2086 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2092 CPU (h_cbit
) = opval
;
2093 written
|= (1 << 3);
2094 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2098 BI opval
= LTSI (* FLD (i_Ri
), 0);
2099 CPU (h_nbit
) = opval
;
2100 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2103 BI opval
= EQSI (* FLD (i_Ri
), 0);
2104 CPU (h_zbit
) = opval
;
2105 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2109 abuf
->written
= written
;
2114 /* asri: asr $u4,$Ri */
2117 SEM_FN_NAME (fr30bf
,asri
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2119 #define FLD(f) abuf->fields.sfmt_addi.f
2120 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2121 int UNUSED written
= 0;
2122 IADDR UNUSED pc
= abuf
->addr
;
2123 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2127 tmp_shift
= FLD (f_u4
);
2128 if (NESI (tmp_shift
, 0)) {
2131 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2132 CPU (h_cbit
) = opval
;
2133 written
|= (1 << 3);
2134 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2137 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2138 * FLD (i_Ri
) = opval
;
2139 written
|= (1 << 2);
2140 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2146 CPU (h_cbit
) = opval
;
2147 written
|= (1 << 3);
2148 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2152 BI opval
= LTSI (* FLD (i_Ri
), 0);
2153 CPU (h_nbit
) = opval
;
2154 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2157 BI opval
= EQSI (* FLD (i_Ri
), 0);
2158 CPU (h_zbit
) = opval
;
2159 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2163 abuf
->written
= written
;
2168 /* asr2: asr2 $u4,$Ri */
2171 SEM_FN_NAME (fr30bf
,asr2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2173 #define FLD(f) abuf->fields.sfmt_addi.f
2174 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2175 int UNUSED written
= 0;
2176 IADDR UNUSED pc
= abuf
->addr
;
2177 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2181 tmp_shift
= ADDSI (FLD (f_u4
), 16);
2182 if (NESI (tmp_shift
, 0)) {
2185 BI opval
= NESI (ANDSI (* FLD (i_Ri
), SLLSI (1, SUBSI (tmp_shift
, 1))), 0);
2186 CPU (h_cbit
) = opval
;
2187 written
|= (1 << 3);
2188 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2191 SI opval
= SRASI (* FLD (i_Ri
), tmp_shift
);
2192 * FLD (i_Ri
) = opval
;
2193 written
|= (1 << 2);
2194 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2200 CPU (h_cbit
) = opval
;
2201 written
|= (1 << 3);
2202 TRACE_RESULT (current_cpu
, abuf
, "cbit", 'x', opval
);
2206 BI opval
= LTSI (* FLD (i_Ri
), 0);
2207 CPU (h_nbit
) = opval
;
2208 TRACE_RESULT (current_cpu
, abuf
, "nbit", 'x', opval
);
2211 BI opval
= EQSI (* FLD (i_Ri
), 0);
2212 CPU (h_zbit
) = opval
;
2213 TRACE_RESULT (current_cpu
, abuf
, "zbit", 'x', opval
);
2217 abuf
->written
= written
;
2222 /* ldi8: ldi:8 $i8,$Ri */
2225 SEM_FN_NAME (fr30bf
,ldi8
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2227 #define FLD(f) abuf->fields.sfmt_ldi8.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
, 2);
2234 SI opval
= FLD (f_i8
);
2235 * FLD (i_Ri
) = opval
;
2236 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2243 /* ldi20: ldi:20 $i20,$Ri */
2246 SEM_FN_NAME (fr30bf
,ldi20
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2248 #define FLD(f) abuf->fields.sfmt_ldi20.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
, 4);
2255 SI opval
= FLD (f_i20
);
2256 * FLD (i_Ri
) = opval
;
2257 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2264 /* ldi32: ldi:32 $i32,$Ri */
2267 SEM_FN_NAME (fr30bf
,ldi32
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2269 #define FLD(f) abuf->fields.sfmt_ldi32.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
, 6);
2276 SI opval
= FLD (f_i32
);
2277 * FLD (i_Ri
) = opval
;
2278 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2285 /* ld: ld @$Rj,$Ri */
2288 SEM_FN_NAME (fr30bf
,ld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2290 #define FLD(f) abuf->fields.sfmt_ldr13.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
= GETMEMSI (current_cpu
, pc
, * FLD (i_Rj
));
2298 * FLD (i_Ri
) = opval
;
2299 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2306 /* lduh: lduh @$Rj,$Ri */
2309 SEM_FN_NAME (fr30bf
,lduh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2311 #define FLD(f) abuf->fields.sfmt_ldr13.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
= GETMEMUHI (current_cpu
, pc
, * FLD (i_Rj
));
2319 * FLD (i_Ri
) = opval
;
2320 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2327 /* ldub: ldub @$Rj,$Ri */
2330 SEM_FN_NAME (fr30bf
,ldub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2332 #define FLD(f) abuf->fields.sfmt_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
= GETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
));
2340 * FLD (i_Ri
) = opval
;
2341 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2348 /* ldr13: ld @($R13,$Rj),$Ri */
2351 SEM_FN_NAME (fr30bf
,ldr13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2353 #define FLD(f) abuf->fields.sfmt_ldr13.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
= GETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2361 * FLD (i_Ri
) = opval
;
2362 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2369 /* ldr13uh: lduh @($R13,$Rj),$Ri */
2372 SEM_FN_NAME (fr30bf
,ldr13uh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2374 #define FLD(f) abuf->fields.sfmt_ldr13.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
= GETMEMUHI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2382 * FLD (i_Ri
) = opval
;
2383 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2390 /* ldr13ub: ldub @($R13,$Rj),$Ri */
2393 SEM_FN_NAME (fr30bf
,ldr13ub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2395 #define FLD(f) abuf->fields.sfmt_ldr13.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
= GETMEMUQI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])));
2403 * FLD (i_Ri
) = opval
;
2404 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2411 /* ldr14: ld @($R14,$disp10),$Ri */
2414 SEM_FN_NAME (fr30bf
,ldr14
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2416 #define FLD(f) abuf->fields.sfmt_ldr14.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
= GETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_disp10
), CPU (h_gr
[((UINT
) 14)])));
2424 * FLD (i_Ri
) = opval
;
2425 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2432 /* ldr14uh: lduh @($R14,$disp9),$Ri */
2435 SEM_FN_NAME (fr30bf
,ldr14uh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2437 #define FLD(f) abuf->fields.sfmt_ldr14uh.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
= GETMEMUHI (current_cpu
, pc
, ADDSI (FLD (f_disp9
), CPU (h_gr
[((UINT
) 14)])));
2445 * FLD (i_Ri
) = opval
;
2446 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2453 /* ldr14ub: ldub @($R14,$disp8),$Ri */
2456 SEM_FN_NAME (fr30bf
,ldr14ub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2458 #define FLD(f) abuf->fields.sfmt_ldr14ub.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
= GETMEMUQI (current_cpu
, pc
, ADDSI (FLD (f_disp8
), CPU (h_gr
[((UINT
) 14)])));
2466 * FLD (i_Ri
) = opval
;
2467 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2474 /* ldr15: ld @($R15,$udisp6),$Ri */
2477 SEM_FN_NAME (fr30bf
,ldr15
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2479 #define FLD(f) abuf->fields.sfmt_ldr15.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);
2486 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_udisp6
), CPU (h_gr
[((UINT
) 15)])));
2487 * FLD (i_Ri
) = opval
;
2488 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2495 /* ldr15gr: ld @$R15+,$Ri */
2498 SEM_FN_NAME (fr30bf
,ldr15gr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2500 #define FLD(f) abuf->fields.sfmt_ldr15gr.f
2501 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2502 int UNUSED written
= 0;
2503 IADDR UNUSED pc
= abuf
->addr
;
2504 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2508 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2509 * FLD (i_Ri
) = opval
;
2510 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2512 if (NESI (FLD (f_Ri
), 15)) {
2514 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2515 CPU (h_gr
[((UINT
) 15)]) = opval
;
2516 written
|= (1 << 4);
2517 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2522 abuf
->written
= written
;
2527 /* ldr15dr: ld @$R15+,$Rs2 */
2530 SEM_FN_NAME (fr30bf
,ldr15dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2532 #define FLD(f) abuf->fields.sfmt_ldr15dr.f
2533 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2534 int UNUSED written
= 0;
2535 IADDR UNUSED pc
= abuf
->addr
;
2536 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2540 tmp_tmp
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2542 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2543 CPU (h_gr
[((UINT
) 15)]) = opval
;
2544 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2548 SET_H_DR (FLD (f_Rs2
), opval
);
2549 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
2557 /* ldr15ps: ld @$R15+,$ps */
2560 SEM_FN_NAME (fr30bf
,ldr15ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2562 #define FLD(f) abuf->fields.sfmt_addsp.f
2563 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2564 int UNUSED written
= 0;
2565 IADDR UNUSED pc
= abuf
->addr
;
2566 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2570 USI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
2572 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
2575 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
2576 CPU (h_gr
[((UINT
) 15)]) = opval
;
2577 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2585 /* st: st $Ri,@$Rj */
2588 SEM_FN_NAME (fr30bf
,st
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2590 #define FLD(f) abuf->fields.sfmt_str13.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 SI opval
= * FLD (i_Ri
);
2598 SETMEMSI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2599 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2606 /* sth: sth $Ri,@$Rj */
2609 SEM_FN_NAME (fr30bf
,sth
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2611 #define FLD(f) abuf->fields.sfmt_str13.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 HI opval
= * FLD (i_Ri
);
2619 SETMEMHI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2620 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2627 /* stb: stb $Ri,@$Rj */
2630 SEM_FN_NAME (fr30bf
,stb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2632 #define FLD(f) abuf->fields.sfmt_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 QI opval
= * FLD (i_Ri
);
2640 SETMEMQI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
2641 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2648 /* str13: st $Ri,@($R13,$Rj) */
2651 SEM_FN_NAME (fr30bf
,str13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2653 #define FLD(f) abuf->fields.sfmt_str13.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 SI opval
= * FLD (i_Ri
);
2661 SETMEMSI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2662 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2669 /* str13h: sth $Ri,@($R13,$Rj) */
2672 SEM_FN_NAME (fr30bf
,str13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2674 #define FLD(f) abuf->fields.sfmt_str13.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 HI opval
= * FLD (i_Ri
);
2682 SETMEMHI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2683 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2690 /* str13b: stb $Ri,@($R13,$Rj) */
2693 SEM_FN_NAME (fr30bf
,str13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2695 #define FLD(f) abuf->fields.sfmt_str13.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 QI opval
= * FLD (i_Ri
);
2703 SETMEMQI (current_cpu
, pc
, ADDSI (* FLD (i_Rj
), CPU (h_gr
[((UINT
) 13)])), opval
);
2704 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2711 /* str14: st $Ri,@($R14,$disp10) */
2714 SEM_FN_NAME (fr30bf
,str14
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2716 #define FLD(f) abuf->fields.sfmt_str14.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 SI opval
= * FLD (i_Ri
);
2724 SETMEMSI (current_cpu
, pc
, ADDSI (FLD (f_disp10
), CPU (h_gr
[((UINT
) 14)])), opval
);
2725 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2732 /* str14h: sth $Ri,@($R14,$disp9) */
2735 SEM_FN_NAME (fr30bf
,str14h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2737 #define FLD(f) abuf->fields.sfmt_str14h.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 HI opval
= * FLD (i_Ri
);
2745 SETMEMHI (current_cpu
, pc
, ADDSI (FLD (f_disp9
), CPU (h_gr
[((UINT
) 14)])), opval
);
2746 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2753 /* str14b: stb $Ri,@($R14,$disp8) */
2756 SEM_FN_NAME (fr30bf
,str14b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2758 #define FLD(f) abuf->fields.sfmt_str14b.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 QI opval
= * FLD (i_Ri
);
2766 SETMEMQI (current_cpu
, pc
, ADDSI (FLD (f_disp8
), CPU (h_gr
[((UINT
) 14)])), opval
);
2767 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2774 /* str15: st $Ri,@($R15,$udisp6) */
2777 SEM_FN_NAME (fr30bf
,str15
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2779 #define FLD(f) abuf->fields.sfmt_str15.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);
2786 SI opval
= * FLD (i_Ri
);
2787 SETMEMSI (current_cpu
, pc
, ADDSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_udisp6
)), opval
);
2788 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2795 /* str15gr: st $Ri,@-$R15 */
2798 SEM_FN_NAME (fr30bf
,str15gr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2800 #define FLD(f) abuf->fields.sfmt_str15gr.f
2801 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2802 int UNUSED written
= 0;
2803 IADDR UNUSED pc
= abuf
->addr
;
2804 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2808 tmp_tmp
= * FLD (i_Ri
);
2810 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2811 CPU (h_gr
[((UINT
) 15)]) = opval
;
2812 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2816 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2817 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2825 /* str15dr: st $Rs2,@-$R15 */
2828 SEM_FN_NAME (fr30bf
,str15dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2830 #define FLD(f) abuf->fields.sfmt_ldr15dr.f
2831 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2832 int UNUSED written
= 0;
2833 IADDR UNUSED pc
= abuf
->addr
;
2834 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2838 tmp_tmp
= GET_H_DR (FLD (f_Rs2
));
2840 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2841 CPU (h_gr
[((UINT
) 15)]) = opval
;
2842 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2846 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2847 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2855 /* str15ps: st $ps,@-$R15 */
2858 SEM_FN_NAME (fr30bf
,str15ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2860 #define FLD(f) abuf->fields.sfmt_addsp.f
2861 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2862 int UNUSED written
= 0;
2863 IADDR UNUSED pc
= abuf
->addr
;
2864 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2868 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
2869 CPU (h_gr
[((UINT
) 15)]) = opval
;
2870 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2873 SI opval
= GET_H_PS ();
2874 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
2875 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
2883 /* mov: mov $Rj,$Ri */
2886 SEM_FN_NAME (fr30bf
,mov
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2888 #define FLD(f) abuf->fields.sfmt_ldr13.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
= * FLD (i_Rj
);
2896 * FLD (i_Ri
) = opval
;
2897 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2904 /* movdr: mov $Rs1,$Ri */
2907 SEM_FN_NAME (fr30bf
,movdr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2909 #define FLD(f) abuf->fields.sfmt_movdr.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_DR (FLD (f_Rs1
));
2917 * FLD (i_Ri
) = opval
;
2918 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2925 /* movps: mov $ps,$Ri */
2928 SEM_FN_NAME (fr30bf
,movps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2930 #define FLD(f) abuf->fields.sfmt_movdr.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
= GET_H_PS ();
2938 * FLD (i_Ri
) = opval
;
2939 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2946 /* mov2dr: mov $Ri,$Rs1 */
2949 SEM_FN_NAME (fr30bf
,mov2dr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2951 #define FLD(f) abuf->fields.sfmt_mov2dr.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 SI opval
= * FLD (i_Ri
);
2959 SET_H_DR (FLD (f_Rs1
), opval
);
2960 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
2967 /* mov2ps: mov $Ri,$ps */
2970 SEM_FN_NAME (fr30bf
,mov2ps
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2972 #define FLD(f) abuf->fields.sfmt_mov2dr.f
2973 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2974 int UNUSED written
= 0;
2975 IADDR UNUSED pc
= abuf
->addr
;
2976 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
2979 USI opval
= * FLD (i_Ri
);
2981 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
2991 SEM_FN_NAME (fr30bf
,jmp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2993 #define FLD(f) abuf->fields.sfmt_mov2dr.f
2994 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2995 int UNUSED written
= 0;
2996 IADDR UNUSED pc
= abuf
->addr
;
2998 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3001 USI opval
= * FLD (i_Ri
);
3002 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3003 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3006 SEM_BRANCH_FINI (vpc
);
3011 /* jmpd: jmp:d @$Ri */
3014 SEM_FN_NAME (fr30bf
,jmpd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3016 #define FLD(f) abuf->fields.sfmt_mov2dr.f
3017 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3018 int UNUSED written
= 0;
3019 IADDR UNUSED pc
= abuf
->addr
;
3021 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3025 USI opval
= * FLD (i_Ri
);
3026 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3027 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3031 SEM_BRANCH_FINI (vpc
);
3036 /* callr: call @$Ri */
3039 SEM_FN_NAME (fr30bf
,callr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3041 #define FLD(f) abuf->fields.sfmt_mov2dr.f
3042 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3043 int UNUSED written
= 0;
3044 IADDR UNUSED pc
= abuf
->addr
;
3046 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3050 SI opval
= ADDSI (pc
, 2);
3051 SET_H_DR (((UINT
) 1), opval
);
3052 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
3055 USI opval
= * FLD (i_Ri
);
3056 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3057 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3061 SEM_BRANCH_FINI (vpc
);
3066 /* callrd: call:d @$Ri */
3069 SEM_FN_NAME (fr30bf
,callrd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3071 #define FLD(f) abuf->fields.sfmt_mov2dr.f
3072 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3073 int UNUSED written
= 0;
3074 IADDR UNUSED pc
= abuf
->addr
;
3076 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3081 SI opval
= ADDSI (pc
, 4);
3082 SET_H_DR (((UINT
) 1), opval
);
3083 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
3086 USI opval
= * FLD (i_Ri
);
3087 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3088 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3093 SEM_BRANCH_FINI (vpc
);
3098 /* call: call $label12 */
3101 SEM_FN_NAME (fr30bf
,call
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3103 #define FLD(f) abuf->fields.sfmt_call.f
3104 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3105 int UNUSED written
= 0;
3106 IADDR UNUSED pc
= abuf
->addr
;
3108 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3112 SI opval
= ADDSI (pc
, 2);
3113 SET_H_DR (((UINT
) 1), opval
);
3114 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
3117 USI opval
= FLD (i_label12
);
3118 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3119 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3123 SEM_BRANCH_FINI (vpc
);
3128 /* calld: call:d $label12 */
3131 SEM_FN_NAME (fr30bf
,calld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3133 #define FLD(f) abuf->fields.sfmt_call.f
3134 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3135 int UNUSED written
= 0;
3136 IADDR UNUSED pc
= abuf
->addr
;
3138 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3143 SI opval
= ADDSI (pc
, 4);
3144 SET_H_DR (((UINT
) 1), opval
);
3145 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
3148 USI opval
= FLD (i_label12
);
3149 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3150 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3155 SEM_BRANCH_FINI (vpc
);
3163 SEM_FN_NAME (fr30bf
,ret
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3165 #define FLD(f) abuf->fields.fmt_empty.f
3166 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3167 int UNUSED written
= 0;
3168 IADDR UNUSED pc
= abuf
->addr
;
3170 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3173 USI opval
= GET_H_DR (((UINT
) 1));
3174 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3175 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3178 SEM_BRANCH_FINI (vpc
);
3186 SEM_FN_NAME (fr30bf
,ret_d
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3188 #define FLD(f) abuf->fields.fmt_empty.f
3189 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3190 int UNUSED written
= 0;
3191 IADDR UNUSED pc
= abuf
->addr
;
3193 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3197 USI opval
= GET_H_DR (((UINT
) 1));
3198 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3199 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3203 SEM_BRANCH_FINI (vpc
);
3211 SEM_FN_NAME (fr30bf
,int) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3213 #define FLD(f) abuf->fields.sfmt_int.f
3214 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3215 int UNUSED written
= 0;
3216 IADDR UNUSED pc
= abuf
->addr
;
3218 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3225 SI opval
= fr30_int (current_cpu
, pc
, FLD (f_u8
));
3226 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3227 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3231 SEM_BRANCH_FINI (vpc
);
3239 SEM_FN_NAME (fr30bf
,inte
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3241 #define FLD(f) abuf->fields.fmt_empty.f
3242 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3243 int UNUSED written
= 0;
3244 IADDR UNUSED pc
= abuf
->addr
;
3246 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3253 SI opval
= fr30_inte (current_cpu
, pc
);
3254 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3255 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3259 SEM_BRANCH_FINI (vpc
);
3267 SEM_FN_NAME (fr30bf
,reti
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3269 #define FLD(f) abuf->fields.fmt_empty.f
3270 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3271 int UNUSED written
= 0;
3272 IADDR UNUSED pc
= abuf
->addr
;
3274 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3276 if (EQBI (GET_H_SBIT (), 0)) {
3279 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 2)));
3280 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3281 written
|= (1 << 7);
3282 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3285 SI opval
= ADDSI (GET_H_DR (((UINT
) 2)), 4);
3286 SET_H_DR (((UINT
) 2), opval
);
3287 written
|= (1 << 5);
3288 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
3291 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 2)));
3293 written
|= (1 << 8);
3294 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
3297 SI opval
= ADDSI (GET_H_DR (((UINT
) 2)), 4);
3298 SET_H_DR (((UINT
) 2), opval
);
3299 written
|= (1 << 5);
3300 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
3306 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 3)));
3307 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
3308 written
|= (1 << 7);
3309 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3312 SI opval
= ADDSI (GET_H_DR (((UINT
) 3)), 4);
3313 SET_H_DR (((UINT
) 3), opval
);
3314 written
|= (1 << 6);
3315 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
3318 SI opval
= GETMEMSI (current_cpu
, pc
, GET_H_DR (((UINT
) 3)));
3320 written
|= (1 << 8);
3321 TRACE_RESULT (current_cpu
, abuf
, "ps", 'x', opval
);
3324 SI opval
= ADDSI (GET_H_DR (((UINT
) 3)), 4);
3325 SET_H_DR (((UINT
) 3), opval
);
3326 written
|= (1 << 6);
3327 TRACE_RESULT (current_cpu
, abuf
, "dr", 'x', opval
);
3332 abuf
->written
= written
;
3333 SEM_BRANCH_FINI (vpc
);
3338 /* brad: bra:d $label9 */
3341 SEM_FN_NAME (fr30bf
,brad
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3343 #define FLD(f) abuf->fields.sfmt_brad.f
3344 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3345 int UNUSED written
= 0;
3346 IADDR UNUSED pc
= abuf
->addr
;
3348 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3352 USI opval
= FLD (i_label9
);
3353 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3354 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3358 SEM_BRANCH_FINI (vpc
);
3363 /* bra: bra $label9 */
3366 SEM_FN_NAME (fr30bf
,bra
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3368 #define FLD(f) abuf->fields.sfmt_brad.f
3369 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3370 int UNUSED written
= 0;
3371 IADDR UNUSED pc
= abuf
->addr
;
3373 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3376 USI opval
= FLD (i_label9
);
3377 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3378 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3381 SEM_BRANCH_FINI (vpc
);
3386 /* bnod: bno:d $label9 */
3389 SEM_FN_NAME (fr30bf
,bnod
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3391 #define FLD(f) abuf->fields.fmt_empty.f
3392 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3393 int UNUSED written
= 0;
3394 IADDR UNUSED pc
= abuf
->addr
;
3395 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3405 /* bno: bno $label9 */
3408 SEM_FN_NAME (fr30bf
,bno
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3410 #define FLD(f) abuf->fields.fmt_empty.f
3411 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3412 int UNUSED written
= 0;
3413 IADDR UNUSED pc
= abuf
->addr
;
3414 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3422 /* beqd: beq:d $label9 */
3425 SEM_FN_NAME (fr30bf
,beqd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3427 #define FLD(f) abuf->fields.sfmt_brad.f
3428 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3429 int UNUSED written
= 0;
3430 IADDR UNUSED pc
= abuf
->addr
;
3432 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3437 USI opval
= FLD (i_label9
);
3438 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3439 written
|= (1 << 2);
3440 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3445 abuf
->written
= written
;
3446 SEM_BRANCH_FINI (vpc
);
3451 /* beq: beq $label9 */
3454 SEM_FN_NAME (fr30bf
,beq
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3456 #define FLD(f) abuf->fields.sfmt_brad.f
3457 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3458 int UNUSED written
= 0;
3459 IADDR UNUSED pc
= abuf
->addr
;
3461 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3465 USI opval
= FLD (i_label9
);
3466 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3467 written
|= (1 << 2);
3468 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3472 abuf
->written
= written
;
3473 SEM_BRANCH_FINI (vpc
);
3478 /* bned: bne:d $label9 */
3481 SEM_FN_NAME (fr30bf
,bned
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3483 #define FLD(f) abuf->fields.sfmt_brad.f
3484 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3485 int UNUSED written
= 0;
3486 IADDR UNUSED pc
= abuf
->addr
;
3488 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3491 if (NOTBI (CPU (h_zbit
))) {
3493 USI opval
= FLD (i_label9
);
3494 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3495 written
|= (1 << 2);
3496 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3501 abuf
->written
= written
;
3502 SEM_BRANCH_FINI (vpc
);
3507 /* bne: bne $label9 */
3510 SEM_FN_NAME (fr30bf
,bne
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3512 #define FLD(f) abuf->fields.sfmt_brad.f
3513 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3514 int UNUSED written
= 0;
3515 IADDR UNUSED pc
= abuf
->addr
;
3517 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3519 if (NOTBI (CPU (h_zbit
))) {
3521 USI opval
= FLD (i_label9
);
3522 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3523 written
|= (1 << 2);
3524 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3528 abuf
->written
= written
;
3529 SEM_BRANCH_FINI (vpc
);
3534 /* bcd: bc:d $label9 */
3537 SEM_FN_NAME (fr30bf
,bcd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3539 #define FLD(f) abuf->fields.sfmt_brad.f
3540 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3541 int UNUSED written
= 0;
3542 IADDR UNUSED pc
= abuf
->addr
;
3544 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3549 USI opval
= FLD (i_label9
);
3550 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3551 written
|= (1 << 2);
3552 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3557 abuf
->written
= written
;
3558 SEM_BRANCH_FINI (vpc
);
3563 /* bc: bc $label9 */
3566 SEM_FN_NAME (fr30bf
,bc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3568 #define FLD(f) abuf->fields.sfmt_brad.f
3569 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3570 int UNUSED written
= 0;
3571 IADDR UNUSED pc
= abuf
->addr
;
3573 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3577 USI opval
= FLD (i_label9
);
3578 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3579 written
|= (1 << 2);
3580 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3584 abuf
->written
= written
;
3585 SEM_BRANCH_FINI (vpc
);
3590 /* bncd: bnc:d $label9 */
3593 SEM_FN_NAME (fr30bf
,bncd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3595 #define FLD(f) abuf->fields.sfmt_brad.f
3596 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3597 int UNUSED written
= 0;
3598 IADDR UNUSED pc
= abuf
->addr
;
3600 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3603 if (NOTBI (CPU (h_cbit
))) {
3605 USI opval
= FLD (i_label9
);
3606 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3607 written
|= (1 << 2);
3608 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3613 abuf
->written
= written
;
3614 SEM_BRANCH_FINI (vpc
);
3619 /* bnc: bnc $label9 */
3622 SEM_FN_NAME (fr30bf
,bnc
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3624 #define FLD(f) abuf->fields.sfmt_brad.f
3625 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3626 int UNUSED written
= 0;
3627 IADDR UNUSED pc
= abuf
->addr
;
3629 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3631 if (NOTBI (CPU (h_cbit
))) {
3633 USI opval
= FLD (i_label9
);
3634 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3635 written
|= (1 << 2);
3636 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3640 abuf
->written
= written
;
3641 SEM_BRANCH_FINI (vpc
);
3646 /* bnd: bn:d $label9 */
3649 SEM_FN_NAME (fr30bf
,bnd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3651 #define FLD(f) abuf->fields.sfmt_brad.f
3652 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3653 int UNUSED written
= 0;
3654 IADDR UNUSED pc
= abuf
->addr
;
3656 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3661 USI opval
= FLD (i_label9
);
3662 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3663 written
|= (1 << 2);
3664 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3669 abuf
->written
= written
;
3670 SEM_BRANCH_FINI (vpc
);
3675 /* bn: bn $label9 */
3678 SEM_FN_NAME (fr30bf
,bn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3680 #define FLD(f) abuf->fields.sfmt_brad.f
3681 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3682 int UNUSED written
= 0;
3683 IADDR UNUSED pc
= abuf
->addr
;
3685 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3689 USI opval
= FLD (i_label9
);
3690 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3691 written
|= (1 << 2);
3692 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3696 abuf
->written
= written
;
3697 SEM_BRANCH_FINI (vpc
);
3702 /* bpd: bp:d $label9 */
3705 SEM_FN_NAME (fr30bf
,bpd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3707 #define FLD(f) abuf->fields.sfmt_brad.f
3708 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3709 int UNUSED written
= 0;
3710 IADDR UNUSED pc
= abuf
->addr
;
3712 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3715 if (NOTBI (CPU (h_nbit
))) {
3717 USI opval
= FLD (i_label9
);
3718 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3719 written
|= (1 << 2);
3720 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3725 abuf
->written
= written
;
3726 SEM_BRANCH_FINI (vpc
);
3731 /* bp: bp $label9 */
3734 SEM_FN_NAME (fr30bf
,bp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3736 #define FLD(f) abuf->fields.sfmt_brad.f
3737 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3738 int UNUSED written
= 0;
3739 IADDR UNUSED pc
= abuf
->addr
;
3741 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3743 if (NOTBI (CPU (h_nbit
))) {
3745 USI opval
= FLD (i_label9
);
3746 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3747 written
|= (1 << 2);
3748 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3752 abuf
->written
= written
;
3753 SEM_BRANCH_FINI (vpc
);
3758 /* bvd: bv:d $label9 */
3761 SEM_FN_NAME (fr30bf
,bvd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3763 #define FLD(f) abuf->fields.sfmt_brad.f
3764 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3765 int UNUSED written
= 0;
3766 IADDR UNUSED pc
= abuf
->addr
;
3768 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3773 USI opval
= FLD (i_label9
);
3774 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3775 written
|= (1 << 2);
3776 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3781 abuf
->written
= written
;
3782 SEM_BRANCH_FINI (vpc
);
3787 /* bv: bv $label9 */
3790 SEM_FN_NAME (fr30bf
,bv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3792 #define FLD(f) abuf->fields.sfmt_brad.f
3793 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3794 int UNUSED written
= 0;
3795 IADDR UNUSED pc
= abuf
->addr
;
3797 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3801 USI opval
= FLD (i_label9
);
3802 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3803 written
|= (1 << 2);
3804 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3808 abuf
->written
= written
;
3809 SEM_BRANCH_FINI (vpc
);
3814 /* bnvd: bnv:d $label9 */
3817 SEM_FN_NAME (fr30bf
,bnvd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3819 #define FLD(f) abuf->fields.sfmt_brad.f
3820 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3821 int UNUSED written
= 0;
3822 IADDR UNUSED pc
= abuf
->addr
;
3824 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3827 if (NOTBI (CPU (h_vbit
))) {
3829 USI opval
= FLD (i_label9
);
3830 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3831 written
|= (1 << 2);
3832 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3837 abuf
->written
= written
;
3838 SEM_BRANCH_FINI (vpc
);
3843 /* bnv: bnv $label9 */
3846 SEM_FN_NAME (fr30bf
,bnv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3848 #define FLD(f) abuf->fields.sfmt_brad.f
3849 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3850 int UNUSED written
= 0;
3851 IADDR UNUSED pc
= abuf
->addr
;
3853 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3855 if (NOTBI (CPU (h_vbit
))) {
3857 USI opval
= FLD (i_label9
);
3858 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3859 written
|= (1 << 2);
3860 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3864 abuf
->written
= written
;
3865 SEM_BRANCH_FINI (vpc
);
3870 /* bltd: blt:d $label9 */
3873 SEM_FN_NAME (fr30bf
,bltd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3875 #define FLD(f) abuf->fields.sfmt_brad.f
3876 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3877 int UNUSED written
= 0;
3878 IADDR UNUSED pc
= abuf
->addr
;
3880 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3883 if (XORBI (CPU (h_vbit
), CPU (h_nbit
))) {
3885 USI opval
= FLD (i_label9
);
3886 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3887 written
|= (1 << 3);
3888 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3893 abuf
->written
= written
;
3894 SEM_BRANCH_FINI (vpc
);
3899 /* blt: blt $label9 */
3902 SEM_FN_NAME (fr30bf
,blt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3904 #define FLD(f) abuf->fields.sfmt_brad.f
3905 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3906 int UNUSED written
= 0;
3907 IADDR UNUSED pc
= abuf
->addr
;
3909 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3911 if (XORBI (CPU (h_vbit
), CPU (h_nbit
))) {
3913 USI opval
= FLD (i_label9
);
3914 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3915 written
|= (1 << 3);
3916 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3920 abuf
->written
= written
;
3921 SEM_BRANCH_FINI (vpc
);
3926 /* bged: bge:d $label9 */
3929 SEM_FN_NAME (fr30bf
,bged
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3931 #define FLD(f) abuf->fields.sfmt_brad.f
3932 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3933 int UNUSED written
= 0;
3934 IADDR UNUSED pc
= abuf
->addr
;
3936 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3939 if (NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)))) {
3941 USI opval
= FLD (i_label9
);
3942 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3943 written
|= (1 << 3);
3944 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3949 abuf
->written
= written
;
3950 SEM_BRANCH_FINI (vpc
);
3955 /* bge: bge $label9 */
3958 SEM_FN_NAME (fr30bf
,bge
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3960 #define FLD(f) abuf->fields.sfmt_brad.f
3961 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3962 int UNUSED written
= 0;
3963 IADDR UNUSED pc
= abuf
->addr
;
3965 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3967 if (NOTBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)))) {
3969 USI opval
= FLD (i_label9
);
3970 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3971 written
|= (1 << 3);
3972 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3976 abuf
->written
= written
;
3977 SEM_BRANCH_FINI (vpc
);
3982 /* bled: ble:d $label9 */
3985 SEM_FN_NAME (fr30bf
,bled
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3987 #define FLD(f) abuf->fields.sfmt_brad.f
3988 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3989 int UNUSED written
= 0;
3990 IADDR UNUSED pc
= abuf
->addr
;
3992 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
3995 if (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
))) {
3997 USI opval
= FLD (i_label9
);
3998 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3999 written
|= (1 << 4);
4000 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4005 abuf
->written
= written
;
4006 SEM_BRANCH_FINI (vpc
);
4011 /* ble: ble $label9 */
4014 SEM_FN_NAME (fr30bf
,ble
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4016 #define FLD(f) abuf->fields.sfmt_brad.f
4017 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4018 int UNUSED written
= 0;
4019 IADDR UNUSED pc
= abuf
->addr
;
4021 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4023 if (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
))) {
4025 USI opval
= FLD (i_label9
);
4026 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4027 written
|= (1 << 4);
4028 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4032 abuf
->written
= written
;
4033 SEM_BRANCH_FINI (vpc
);
4038 /* bgtd: bgt:d $label9 */
4041 SEM_FN_NAME (fr30bf
,bgtd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4043 #define FLD(f) abuf->fields.sfmt_brad.f
4044 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4045 int UNUSED written
= 0;
4046 IADDR UNUSED pc
= abuf
->addr
;
4048 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4051 if (NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)))) {
4053 USI opval
= FLD (i_label9
);
4054 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4055 written
|= (1 << 4);
4056 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4061 abuf
->written
= written
;
4062 SEM_BRANCH_FINI (vpc
);
4067 /* bgt: bgt $label9 */
4070 SEM_FN_NAME (fr30bf
,bgt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4072 #define FLD(f) abuf->fields.sfmt_brad.f
4073 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4074 int UNUSED written
= 0;
4075 IADDR UNUSED pc
= abuf
->addr
;
4077 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4079 if (NOTBI (ORBI (XORBI (CPU (h_vbit
), CPU (h_nbit
)), CPU (h_zbit
)))) {
4081 USI opval
= FLD (i_label9
);
4082 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4083 written
|= (1 << 4);
4084 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4088 abuf
->written
= written
;
4089 SEM_BRANCH_FINI (vpc
);
4094 /* blsd: bls:d $label9 */
4097 SEM_FN_NAME (fr30bf
,blsd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4099 #define FLD(f) abuf->fields.sfmt_brad.f
4100 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4101 int UNUSED written
= 0;
4102 IADDR UNUSED pc
= abuf
->addr
;
4104 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4107 if (ORBI (CPU (h_cbit
), CPU (h_zbit
))) {
4109 USI opval
= FLD (i_label9
);
4110 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4111 written
|= (1 << 3);
4112 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4117 abuf
->written
= written
;
4118 SEM_BRANCH_FINI (vpc
);
4123 /* bls: bls $label9 */
4126 SEM_FN_NAME (fr30bf
,bls
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4128 #define FLD(f) abuf->fields.sfmt_brad.f
4129 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4130 int UNUSED written
= 0;
4131 IADDR UNUSED pc
= abuf
->addr
;
4133 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4135 if (ORBI (CPU (h_cbit
), CPU (h_zbit
))) {
4137 USI opval
= FLD (i_label9
);
4138 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4139 written
|= (1 << 3);
4140 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4144 abuf
->written
= written
;
4145 SEM_BRANCH_FINI (vpc
);
4150 /* bhid: bhi:d $label9 */
4153 SEM_FN_NAME (fr30bf
,bhid
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4155 #define FLD(f) abuf->fields.sfmt_brad.f
4156 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4157 int UNUSED written
= 0;
4158 IADDR UNUSED pc
= abuf
->addr
;
4160 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4163 if (NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)))) {
4165 USI opval
= FLD (i_label9
);
4166 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4167 written
|= (1 << 3);
4168 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4173 abuf
->written
= written
;
4174 SEM_BRANCH_FINI (vpc
);
4179 /* bhi: bhi $label9 */
4182 SEM_FN_NAME (fr30bf
,bhi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4184 #define FLD(f) abuf->fields.sfmt_brad.f
4185 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4186 int UNUSED written
= 0;
4187 IADDR UNUSED pc
= abuf
->addr
;
4189 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4191 if (NOTBI (ORBI (CPU (h_cbit
), CPU (h_zbit
)))) {
4193 USI opval
= FLD (i_label9
);
4194 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
4195 written
|= (1 << 3);
4196 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
4200 abuf
->written
= written
;
4201 SEM_BRANCH_FINI (vpc
);
4206 /* dmovr13: dmov $R13,@$dir10 */
4209 SEM_FN_NAME (fr30bf
,dmovr13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4211 #define FLD(f) abuf->fields.sfmt_dmovr13pi.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 SI opval
= CPU (h_gr
[((UINT
) 13)]);
4219 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4220 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4227 /* dmovr13h: dmovh $R13,@$dir9 */
4230 SEM_FN_NAME (fr30bf
,dmovr13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4232 #define FLD(f) abuf->fields.sfmt_dmovr13pih.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 HI opval
= CPU (h_gr
[((UINT
) 13)]);
4240 SETMEMHI (current_cpu
, pc
, FLD (f_dir9
), opval
);
4241 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4248 /* dmovr13b: dmovb $R13,@$dir8 */
4251 SEM_FN_NAME (fr30bf
,dmovr13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4253 #define FLD(f) abuf->fields.sfmt_dmovr13pib.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);
4260 QI opval
= CPU (h_gr
[((UINT
) 13)]);
4261 SETMEMQI (current_cpu
, pc
, FLD (f_dir8
), opval
);
4262 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4269 /* dmovr13pi: dmov @$R13+,@$dir10 */
4272 SEM_FN_NAME (fr30bf
,dmovr13pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4274 #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
4275 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4276 int UNUSED written
= 0;
4277 IADDR UNUSED pc
= abuf
->addr
;
4278 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4282 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4283 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4284 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4287 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 4);
4288 CPU (h_gr
[((UINT
) 13)]) = opval
;
4289 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4297 /* dmovr13pih: dmovh @$R13+,@$dir9 */
4300 SEM_FN_NAME (fr30bf
,dmovr13pih
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4302 #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
4303 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4304 int UNUSED written
= 0;
4305 IADDR UNUSED pc
= abuf
->addr
;
4306 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4310 HI opval
= GETMEMHI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4311 SETMEMHI (current_cpu
, pc
, FLD (f_dir9
), opval
);
4312 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4315 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 2);
4316 CPU (h_gr
[((UINT
) 13)]) = opval
;
4317 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4325 /* dmovr13pib: dmovb @$R13+,@$dir8 */
4328 SEM_FN_NAME (fr30bf
,dmovr13pib
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4330 #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
4331 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4332 int UNUSED written
= 0;
4333 IADDR UNUSED pc
= abuf
->addr
;
4334 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4338 QI opval
= GETMEMQI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]));
4339 SETMEMQI (current_cpu
, pc
, FLD (f_dir8
), opval
);
4340 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4343 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 1);
4344 CPU (h_gr
[((UINT
) 13)]) = opval
;
4345 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4353 /* dmovr15pi: dmov @$R15+,@$dir10 */
4356 SEM_FN_NAME (fr30bf
,dmovr15pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4358 #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
4359 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4360 int UNUSED written
= 0;
4361 IADDR UNUSED pc
= abuf
->addr
;
4362 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4366 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4367 SETMEMSI (current_cpu
, pc
, FLD (f_dir10
), opval
);
4368 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4371 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4372 CPU (h_gr
[((UINT
) 15)]) = opval
;
4373 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4381 /* dmov2r13: dmov @$dir10,$R13 */
4384 SEM_FN_NAME (fr30bf
,dmov2r13
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4386 #define FLD(f) abuf->fields.sfmt_dmovr13pi.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
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4394 CPU (h_gr
[((UINT
) 13)]) = opval
;
4395 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4402 /* dmov2r13h: dmovh @$dir9,$R13 */
4405 SEM_FN_NAME (fr30bf
,dmov2r13h
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4407 #define FLD(f) abuf->fields.sfmt_dmovr13pih.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
= GETMEMHI (current_cpu
, pc
, FLD (f_dir9
));
4415 CPU (h_gr
[((UINT
) 13)]) = opval
;
4416 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4423 /* dmov2r13b: dmovb @$dir8,$R13 */
4426 SEM_FN_NAME (fr30bf
,dmov2r13b
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4428 #define FLD(f) abuf->fields.sfmt_dmovr13pib.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);
4435 SI opval
= GETMEMQI (current_cpu
, pc
, FLD (f_dir8
));
4436 CPU (h_gr
[((UINT
) 13)]) = opval
;
4437 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4444 /* dmov2r13pi: dmov @$dir10,@$R13+ */
4447 SEM_FN_NAME (fr30bf
,dmov2r13pi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4449 #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
4450 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4451 int UNUSED written
= 0;
4452 IADDR UNUSED pc
= abuf
->addr
;
4453 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4457 SI opval
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4458 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4459 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4462 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 4);
4463 CPU (h_gr
[((UINT
) 13)]) = opval
;
4464 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4472 /* dmov2r13pih: dmovh @$dir9,@$R13+ */
4475 SEM_FN_NAME (fr30bf
,dmov2r13pih
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4477 #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
4478 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4479 int UNUSED written
= 0;
4480 IADDR UNUSED pc
= abuf
->addr
;
4481 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4485 HI opval
= GETMEMHI (current_cpu
, pc
, FLD (f_dir9
));
4486 SETMEMHI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4487 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4490 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 2);
4491 CPU (h_gr
[((UINT
) 13)]) = opval
;
4492 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4500 /* dmov2r13pib: dmovb @$dir8,@$R13+ */
4503 SEM_FN_NAME (fr30bf
,dmov2r13pib
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4505 #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
4506 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4507 int UNUSED written
= 0;
4508 IADDR UNUSED pc
= abuf
->addr
;
4509 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4513 QI opval
= GETMEMQI (current_cpu
, pc
, FLD (f_dir8
));
4514 SETMEMQI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 13)]), opval
);
4515 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4518 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 13)]), 1);
4519 CPU (h_gr
[((UINT
) 13)]) = opval
;
4520 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4528 /* dmov2r15pd: dmov @$dir10,@-$R15 */
4531 SEM_FN_NAME (fr30bf
,dmov2r15pd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4533 #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
4534 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4535 int UNUSED written
= 0;
4536 IADDR UNUSED pc
= abuf
->addr
;
4537 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4541 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
4542 CPU (h_gr
[((UINT
) 15)]) = opval
;
4543 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4546 SI opval
= GETMEMSI (current_cpu
, pc
, FLD (f_dir10
));
4547 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
4548 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
4556 /* ldres: ldres @$Ri+,$u4 */
4559 SEM_FN_NAME (fr30bf
,ldres
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4561 #define FLD(f) abuf->fields.sfmt_add2.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
, "gr", 'x', opval
);
4577 /* stres: stres $u4,@$Ri+ */
4580 SEM_FN_NAME (fr30bf
,stres
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4582 #define FLD(f) abuf->fields.sfmt_add2.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
, 2);
4589 SI opval
= ADDSI (* FLD (i_Ri
), 4);
4590 * FLD (i_Ri
) = opval
;
4591 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4598 /* copop: copop $u4c,$ccc,$CRj,$CRi */
4601 SEM_FN_NAME (fr30bf
,copop
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4603 #define FLD(f) abuf->fields.fmt_empty.f
4604 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4605 int UNUSED written
= 0;
4606 IADDR UNUSED pc
= abuf
->addr
;
4607 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4615 /* copld: copld $u4c,$ccc,$Rjc,$CRi */
4618 SEM_FN_NAME (fr30bf
,copld
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4620 #define FLD(f) abuf->fields.fmt_empty.f
4621 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4622 int UNUSED written
= 0;
4623 IADDR UNUSED pc
= abuf
->addr
;
4624 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4632 /* copst: copst $u4c,$ccc,$CRj,$Ric */
4635 SEM_FN_NAME (fr30bf
,copst
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4637 #define FLD(f) abuf->fields.fmt_empty.f
4638 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4639 int UNUSED written
= 0;
4640 IADDR UNUSED pc
= abuf
->addr
;
4641 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4649 /* copsv: copsv $u4c,$ccc,$CRj,$Ric */
4652 SEM_FN_NAME (fr30bf
,copsv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4654 #define FLD(f) abuf->fields.fmt_empty.f
4655 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4656 int UNUSED written
= 0;
4657 IADDR UNUSED pc
= abuf
->addr
;
4658 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
4669 SEM_FN_NAME (fr30bf
,nop
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4671 #define FLD(f) abuf->fields.fmt_empty.f
4672 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4673 int UNUSED written
= 0;
4674 IADDR UNUSED pc
= abuf
->addr
;
4675 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4683 /* andccr: andccr $u8 */
4686 SEM_FN_NAME (fr30bf
,andccr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4688 #define FLD(f) abuf->fields.sfmt_int.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
= ANDQI (GET_H_CCR (), FLD (f_u8
));
4697 TRACE_RESULT (current_cpu
, abuf
, "ccr", 'x', opval
);
4704 /* orccr: orccr $u8 */
4707 SEM_FN_NAME (fr30bf
,orccr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4709 #define FLD(f) abuf->fields.sfmt_int.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
= ORQI (GET_H_CCR (), FLD (f_u8
));
4718 TRACE_RESULT (current_cpu
, abuf
, "ccr", 'x', opval
);
4725 /* stilm: stilm $u8 */
4728 SEM_FN_NAME (fr30bf
,stilm
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4730 #define FLD(f) abuf->fields.sfmt_int.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 UQI opval
= ANDSI (FLD (f_u8
), 31);
4739 TRACE_RESULT (current_cpu
, abuf
, "ilm", 'x', opval
);
4746 /* addsp: addsp $s10 */
4749 SEM_FN_NAME (fr30bf
,addsp
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4751 #define FLD(f) abuf->fields.sfmt_addsp.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
= ADDSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_s10
));
4759 CPU (h_gr
[((UINT
) 15)]) = opval
;
4760 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4767 /* extsb: extsb $Ri */
4770 SEM_FN_NAME (fr30bf
,extsb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4772 #define FLD(f) abuf->fields.sfmt_add2.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
= EXTQISI (ANDQI (* FLD (i_Ri
), 255));
4780 * FLD (i_Ri
) = opval
;
4781 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4788 /* extub: extub $Ri */
4791 SEM_FN_NAME (fr30bf
,extub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4793 #define FLD(f) abuf->fields.sfmt_add2.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
= ZEXTQISI (ANDQI (* FLD (i_Ri
), 255));
4801 * FLD (i_Ri
) = opval
;
4802 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4809 /* extsh: extsh $Ri */
4812 SEM_FN_NAME (fr30bf
,extsh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4814 #define FLD(f) abuf->fields.sfmt_add2.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
= EXTHISI (ANDHI (* FLD (i_Ri
), 65535));
4822 * FLD (i_Ri
) = opval
;
4823 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4830 /* extuh: extuh $Ri */
4833 SEM_FN_NAME (fr30bf
,extuh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4835 #define FLD(f) abuf->fields.sfmt_add2.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 SI opval
= ZEXTHISI (ANDHI (* FLD (i_Ri
), 65535));
4843 * FLD (i_Ri
) = opval
;
4844 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4851 /* ldm0: ldm0 ($reglist_low_ld) */
4854 SEM_FN_NAME (fr30bf
,ldm0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
4856 #define FLD(f) abuf->fields.sfmt_ldm0.f
4857 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
4858 int UNUSED written
= 0;
4859 IADDR UNUSED pc
= abuf
->addr
;
4860 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
4863 if (ANDSI (FLD (f_reglist_low_ld
), 1)) {
4866 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4867 CPU (h_gr
[((UINT
) 0)]) = opval
;
4868 written
|= (1 << 3);
4869 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4872 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4873 CPU (h_gr
[((UINT
) 15)]) = opval
;
4874 written
|= (1 << 5);
4875 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4879 if (ANDSI (FLD (f_reglist_low_ld
), 2)) {
4882 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4883 CPU (h_gr
[((UINT
) 1)]) = opval
;
4884 written
|= (1 << 4);
4885 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4888 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4889 CPU (h_gr
[((UINT
) 15)]) = opval
;
4890 written
|= (1 << 5);
4891 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4895 if (ANDSI (FLD (f_reglist_low_ld
), 4)) {
4898 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4899 CPU (h_gr
[((UINT
) 2)]) = opval
;
4900 written
|= (1 << 6);
4901 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4904 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4905 CPU (h_gr
[((UINT
) 15)]) = opval
;
4906 written
|= (1 << 5);
4907 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4911 if (ANDSI (FLD (f_reglist_low_ld
), 8)) {
4914 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4915 CPU (h_gr
[((UINT
) 3)]) = opval
;
4916 written
|= (1 << 7);
4917 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4920 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4921 CPU (h_gr
[((UINT
) 15)]) = opval
;
4922 written
|= (1 << 5);
4923 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4927 if (ANDSI (FLD (f_reglist_low_ld
), 16)) {
4930 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4931 CPU (h_gr
[((UINT
) 4)]) = opval
;
4932 written
|= (1 << 8);
4933 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4936 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4937 CPU (h_gr
[((UINT
) 15)]) = opval
;
4938 written
|= (1 << 5);
4939 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4943 if (ANDSI (FLD (f_reglist_low_ld
), 32)) {
4946 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4947 CPU (h_gr
[((UINT
) 5)]) = opval
;
4948 written
|= (1 << 9);
4949 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4952 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4953 CPU (h_gr
[((UINT
) 15)]) = opval
;
4954 written
|= (1 << 5);
4955 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4959 if (ANDSI (FLD (f_reglist_low_ld
), 64)) {
4962 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4963 CPU (h_gr
[((UINT
) 6)]) = opval
;
4964 written
|= (1 << 10);
4965 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4968 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4969 CPU (h_gr
[((UINT
) 15)]) = opval
;
4970 written
|= (1 << 5);
4971 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4975 if (ANDSI (FLD (f_reglist_low_ld
), 128)) {
4978 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
4979 CPU (h_gr
[((UINT
) 7)]) = opval
;
4980 written
|= (1 << 11);
4981 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4984 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
4985 CPU (h_gr
[((UINT
) 15)]) = opval
;
4986 written
|= (1 << 5);
4987 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
4993 abuf
->written
= written
;
4998 /* ldm1: ldm1 ($reglist_hi_ld) */
5001 SEM_FN_NAME (fr30bf
,ldm1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5003 #define FLD(f) abuf->fields.sfmt_ldm1.f
5004 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5005 int UNUSED written
= 0;
5006 IADDR UNUSED pc
= abuf
->addr
;
5007 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5010 if (ANDSI (FLD (f_reglist_hi_ld
), 1)) {
5013 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5014 CPU (h_gr
[((UINT
) 8)]) = opval
;
5015 written
|= (1 << 9);
5016 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5019 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5020 CPU (h_gr
[((UINT
) 15)]) = opval
;
5021 written
|= (1 << 8);
5022 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5026 if (ANDSI (FLD (f_reglist_hi_ld
), 2)) {
5029 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5030 CPU (h_gr
[((UINT
) 9)]) = opval
;
5031 written
|= (1 << 10);
5032 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5035 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5036 CPU (h_gr
[((UINT
) 15)]) = opval
;
5037 written
|= (1 << 8);
5038 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5042 if (ANDSI (FLD (f_reglist_hi_ld
), 4)) {
5045 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5046 CPU (h_gr
[((UINT
) 10)]) = opval
;
5047 written
|= (1 << 3);
5048 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5051 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5052 CPU (h_gr
[((UINT
) 15)]) = opval
;
5053 written
|= (1 << 8);
5054 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5058 if (ANDSI (FLD (f_reglist_hi_ld
), 8)) {
5061 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5062 CPU (h_gr
[((UINT
) 11)]) = opval
;
5063 written
|= (1 << 4);
5064 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5067 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5068 CPU (h_gr
[((UINT
) 15)]) = opval
;
5069 written
|= (1 << 8);
5070 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5074 if (ANDSI (FLD (f_reglist_hi_ld
), 16)) {
5077 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5078 CPU (h_gr
[((UINT
) 12)]) = opval
;
5079 written
|= (1 << 5);
5080 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5083 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5084 CPU (h_gr
[((UINT
) 15)]) = opval
;
5085 written
|= (1 << 8);
5086 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5090 if (ANDSI (FLD (f_reglist_hi_ld
), 32)) {
5093 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5094 CPU (h_gr
[((UINT
) 13)]) = opval
;
5095 written
|= (1 << 6);
5096 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5099 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5100 CPU (h_gr
[((UINT
) 15)]) = opval
;
5101 written
|= (1 << 8);
5102 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5106 if (ANDSI (FLD (f_reglist_hi_ld
), 64)) {
5109 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5110 CPU (h_gr
[((UINT
) 14)]) = opval
;
5111 written
|= (1 << 7);
5112 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5115 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 15)]), 4);
5116 CPU (h_gr
[((UINT
) 15)]) = opval
;
5117 written
|= (1 << 8);
5118 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5122 if (ANDSI (FLD (f_reglist_hi_ld
), 128)) {
5124 SI opval
= GETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]));
5125 CPU (h_gr
[((UINT
) 15)]) = opval
;
5126 written
|= (1 << 8);
5127 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5132 abuf
->written
= written
;
5137 /* stm0: stm0 ($reglist_low_st) */
5140 SEM_FN_NAME (fr30bf
,stm0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5142 #define FLD(f) abuf->fields.sfmt_stm0.f
5143 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5144 int UNUSED written
= 0;
5145 IADDR UNUSED pc
= abuf
->addr
;
5146 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5149 if (ANDSI (FLD (f_reglist_low_st
), 1)) {
5152 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5153 CPU (h_gr
[((UINT
) 15)]) = opval
;
5154 written
|= (1 << 10);
5155 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5158 SI opval
= CPU (h_gr
[((UINT
) 7)]);
5159 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5160 written
|= (1 << 11);
5161 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5165 if (ANDSI (FLD (f_reglist_low_st
), 2)) {
5168 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5169 CPU (h_gr
[((UINT
) 15)]) = opval
;
5170 written
|= (1 << 10);
5171 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5174 SI opval
= CPU (h_gr
[((UINT
) 6)]);
5175 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5176 written
|= (1 << 11);
5177 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5181 if (ANDSI (FLD (f_reglist_low_st
), 4)) {
5184 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5185 CPU (h_gr
[((UINT
) 15)]) = opval
;
5186 written
|= (1 << 10);
5187 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5190 SI opval
= CPU (h_gr
[((UINT
) 5)]);
5191 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5192 written
|= (1 << 11);
5193 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5197 if (ANDSI (FLD (f_reglist_low_st
), 8)) {
5200 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5201 CPU (h_gr
[((UINT
) 15)]) = opval
;
5202 written
|= (1 << 10);
5203 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5206 SI opval
= CPU (h_gr
[((UINT
) 4)]);
5207 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5208 written
|= (1 << 11);
5209 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5213 if (ANDSI (FLD (f_reglist_low_st
), 16)) {
5216 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5217 CPU (h_gr
[((UINT
) 15)]) = opval
;
5218 written
|= (1 << 10);
5219 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5222 SI opval
= CPU (h_gr
[((UINT
) 3)]);
5223 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5224 written
|= (1 << 11);
5225 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5229 if (ANDSI (FLD (f_reglist_low_st
), 32)) {
5232 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5233 CPU (h_gr
[((UINT
) 15)]) = opval
;
5234 written
|= (1 << 10);
5235 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5238 SI opval
= CPU (h_gr
[((UINT
) 2)]);
5239 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5240 written
|= (1 << 11);
5241 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5245 if (ANDSI (FLD (f_reglist_low_st
), 64)) {
5248 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5249 CPU (h_gr
[((UINT
) 15)]) = opval
;
5250 written
|= (1 << 10);
5251 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5254 SI opval
= CPU (h_gr
[((UINT
) 1)]);
5255 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5256 written
|= (1 << 11);
5257 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5261 if (ANDSI (FLD (f_reglist_low_st
), 128)) {
5264 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5265 CPU (h_gr
[((UINT
) 15)]) = opval
;
5266 written
|= (1 << 10);
5267 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5270 SI opval
= CPU (h_gr
[((UINT
) 0)]);
5271 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5272 written
|= (1 << 11);
5273 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5279 abuf
->written
= written
;
5284 /* stm1: stm1 ($reglist_hi_st) */
5287 SEM_FN_NAME (fr30bf
,stm1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5289 #define FLD(f) abuf->fields.sfmt_stm1.f
5290 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5291 int UNUSED written
= 0;
5292 IADDR UNUSED pc
= abuf
->addr
;
5293 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5296 if (ANDSI (FLD (f_reglist_hi_st
), 1)) {
5299 tmp_save_r15
= CPU (h_gr
[((UINT
) 15)]);
5301 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5302 CPU (h_gr
[((UINT
) 15)]) = opval
;
5303 written
|= (1 << 9);
5304 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5307 SI opval
= tmp_save_r15
;
5308 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5309 written
|= (1 << 10);
5310 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5314 if (ANDSI (FLD (f_reglist_hi_st
), 2)) {
5317 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5318 CPU (h_gr
[((UINT
) 15)]) = opval
;
5319 written
|= (1 << 9);
5320 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5323 SI opval
= CPU (h_gr
[((UINT
) 14)]);
5324 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5325 written
|= (1 << 10);
5326 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5330 if (ANDSI (FLD (f_reglist_hi_st
), 4)) {
5333 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5334 CPU (h_gr
[((UINT
) 15)]) = opval
;
5335 written
|= (1 << 9);
5336 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5339 SI opval
= CPU (h_gr
[((UINT
) 13)]);
5340 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5341 written
|= (1 << 10);
5342 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5346 if (ANDSI (FLD (f_reglist_hi_st
), 8)) {
5349 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5350 CPU (h_gr
[((UINT
) 15)]) = opval
;
5351 written
|= (1 << 9);
5352 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5355 SI opval
= CPU (h_gr
[((UINT
) 12)]);
5356 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5357 written
|= (1 << 10);
5358 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5362 if (ANDSI (FLD (f_reglist_hi_st
), 16)) {
5365 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5366 CPU (h_gr
[((UINT
) 15)]) = opval
;
5367 written
|= (1 << 9);
5368 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5371 SI opval
= CPU (h_gr
[((UINT
) 11)]);
5372 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5373 written
|= (1 << 10);
5374 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5378 if (ANDSI (FLD (f_reglist_hi_st
), 32)) {
5381 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5382 CPU (h_gr
[((UINT
) 15)]) = opval
;
5383 written
|= (1 << 9);
5384 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5387 SI opval
= CPU (h_gr
[((UINT
) 10)]);
5388 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5389 written
|= (1 << 10);
5390 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5394 if (ANDSI (FLD (f_reglist_hi_st
), 64)) {
5397 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5398 CPU (h_gr
[((UINT
) 15)]) = opval
;
5399 written
|= (1 << 9);
5400 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5403 SI opval
= CPU (h_gr
[((UINT
) 9)]);
5404 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5405 written
|= (1 << 10);
5406 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5410 if (ANDSI (FLD (f_reglist_hi_st
), 128)) {
5413 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5414 CPU (h_gr
[((UINT
) 15)]) = opval
;
5415 written
|= (1 << 9);
5416 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5419 SI opval
= CPU (h_gr
[((UINT
) 8)]);
5420 SETMEMSI (current_cpu
, pc
, CPU (h_gr
[((UINT
) 15)]), opval
);
5421 written
|= (1 << 10);
5422 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5428 abuf
->written
= written
;
5433 /* enter: enter $u10 */
5436 SEM_FN_NAME (fr30bf
,enter
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5438 #define FLD(f) abuf->fields.sfmt_enter.f
5439 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5440 int UNUSED written
= 0;
5441 IADDR UNUSED pc
= abuf
->addr
;
5442 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5446 tmp_tmp
= SUBSI (CPU (h_gr
[((UINT
) 15)]), 4);
5448 SI opval
= CPU (h_gr
[((UINT
) 14)]);
5449 SETMEMSI (current_cpu
, pc
, tmp_tmp
, opval
);
5450 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5454 CPU (h_gr
[((UINT
) 14)]) = opval
;
5455 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5458 SI opval
= SUBSI (CPU (h_gr
[((UINT
) 15)]), FLD (f_u10
));
5459 CPU (h_gr
[((UINT
) 15)]) = opval
;
5460 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5471 SEM_FN_NAME (fr30bf
,leave
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5473 #define FLD(f) abuf->fields.sfmt_enter.f
5474 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5475 int UNUSED written
= 0;
5476 IADDR UNUSED pc
= abuf
->addr
;
5477 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5481 SI opval
= ADDSI (CPU (h_gr
[((UINT
) 14)]), 4);
5482 CPU (h_gr
[((UINT
) 15)]) = opval
;
5483 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5486 SI opval
= GETMEMSI (current_cpu
, pc
, SUBSI (CPU (h_gr
[((UINT
) 15)]), 4));
5487 CPU (h_gr
[((UINT
) 14)]) = opval
;
5488 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5496 /* xchb: xchb @$Rj,$Ri */
5499 SEM_FN_NAME (fr30bf
,xchb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
5501 #define FLD(f) abuf->fields.sfmt_add.f
5502 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
5503 int UNUSED written
= 0;
5504 IADDR UNUSED pc
= abuf
->addr
;
5505 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 2);
5509 tmp_tmp
= * FLD (i_Ri
);
5511 SI opval
= GETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
));
5512 * FLD (i_Ri
) = opval
;
5513 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
5516 UQI opval
= tmp_tmp
;
5517 SETMEMUQI (current_cpu
, pc
, * FLD (i_Rj
), opval
);
5518 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
5526 /* Table of all semantic fns. */
5528 static const struct sem_fn_desc sem_fns
[] = {
5529 { FR30BF_INSN_X_INVALID
, SEM_FN_NAME (fr30bf
,x_invalid
) },
5530 { FR30BF_INSN_X_AFTER
, SEM_FN_NAME (fr30bf
,x_after
) },
5531 { FR30BF_INSN_X_BEFORE
, SEM_FN_NAME (fr30bf
,x_before
) },
5532 { FR30BF_INSN_X_CTI_CHAIN
, SEM_FN_NAME (fr30bf
,x_cti_chain
) },
5533 { FR30BF_INSN_X_CHAIN
, SEM_FN_NAME (fr30bf
,x_chain
) },
5534 { FR30BF_INSN_X_BEGIN
, SEM_FN_NAME (fr30bf
,x_begin
) },
5535 { FR30BF_INSN_ADD
, SEM_FN_NAME (fr30bf
,add
) },
5536 { FR30BF_INSN_ADDI
, SEM_FN_NAME (fr30bf
,addi
) },
5537 { FR30BF_INSN_ADD2
, SEM_FN_NAME (fr30bf
,add2
) },
5538 { FR30BF_INSN_ADDC
, SEM_FN_NAME (fr30bf
,addc
) },
5539 { FR30BF_INSN_ADDN
, SEM_FN_NAME (fr30bf
,addn
) },
5540 { FR30BF_INSN_ADDNI
, SEM_FN_NAME (fr30bf
,addni
) },
5541 { FR30BF_INSN_ADDN2
, SEM_FN_NAME (fr30bf
,addn2
) },
5542 { FR30BF_INSN_SUB
, SEM_FN_NAME (fr30bf
,sub
) },
5543 { FR30BF_INSN_SUBC
, SEM_FN_NAME (fr30bf
,subc
) },
5544 { FR30BF_INSN_SUBN
, SEM_FN_NAME (fr30bf
,subn
) },
5545 { FR30BF_INSN_CMP
, SEM_FN_NAME (fr30bf
,cmp
) },
5546 { FR30BF_INSN_CMPI
, SEM_FN_NAME (fr30bf
,cmpi
) },
5547 { FR30BF_INSN_CMP2
, SEM_FN_NAME (fr30bf
,cmp2
) },
5548 { FR30BF_INSN_AND
, SEM_FN_NAME (fr30bf
,and) },
5549 { FR30BF_INSN_OR
, SEM_FN_NAME (fr30bf
,or) },
5550 { FR30BF_INSN_EOR
, SEM_FN_NAME (fr30bf
,eor
) },
5551 { FR30BF_INSN_ANDM
, SEM_FN_NAME (fr30bf
,andm
) },
5552 { FR30BF_INSN_ANDH
, SEM_FN_NAME (fr30bf
,andh
) },
5553 { FR30BF_INSN_ANDB
, SEM_FN_NAME (fr30bf
,andb
) },
5554 { FR30BF_INSN_ORM
, SEM_FN_NAME (fr30bf
,orm
) },
5555 { FR30BF_INSN_ORH
, SEM_FN_NAME (fr30bf
,orh
) },
5556 { FR30BF_INSN_ORB
, SEM_FN_NAME (fr30bf
,orb
) },
5557 { FR30BF_INSN_EORM
, SEM_FN_NAME (fr30bf
,eorm
) },
5558 { FR30BF_INSN_EORH
, SEM_FN_NAME (fr30bf
,eorh
) },
5559 { FR30BF_INSN_EORB
, SEM_FN_NAME (fr30bf
,eorb
) },
5560 { FR30BF_INSN_BANDL
, SEM_FN_NAME (fr30bf
,bandl
) },
5561 { FR30BF_INSN_BORL
, SEM_FN_NAME (fr30bf
,borl
) },
5562 { FR30BF_INSN_BEORL
, SEM_FN_NAME (fr30bf
,beorl
) },
5563 { FR30BF_INSN_BANDH
, SEM_FN_NAME (fr30bf
,bandh
) },
5564 { FR30BF_INSN_BORH
, SEM_FN_NAME (fr30bf
,borh
) },
5565 { FR30BF_INSN_BEORH
, SEM_FN_NAME (fr30bf
,beorh
) },
5566 { FR30BF_INSN_BTSTL
, SEM_FN_NAME (fr30bf
,btstl
) },
5567 { FR30BF_INSN_BTSTH
, SEM_FN_NAME (fr30bf
,btsth
) },
5568 { FR30BF_INSN_MUL
, SEM_FN_NAME (fr30bf
,mul
) },
5569 { FR30BF_INSN_MULU
, SEM_FN_NAME (fr30bf
,mulu
) },
5570 { FR30BF_INSN_MULH
, SEM_FN_NAME (fr30bf
,mulh
) },
5571 { FR30BF_INSN_MULUH
, SEM_FN_NAME (fr30bf
,muluh
) },
5572 { FR30BF_INSN_DIV0S
, SEM_FN_NAME (fr30bf
,div0s
) },
5573 { FR30BF_INSN_DIV0U
, SEM_FN_NAME (fr30bf
,div0u
) },
5574 { FR30BF_INSN_DIV1
, SEM_FN_NAME (fr30bf
,div1
) },
5575 { FR30BF_INSN_DIV2
, SEM_FN_NAME (fr30bf
,div2
) },
5576 { FR30BF_INSN_DIV3
, SEM_FN_NAME (fr30bf
,div3
) },
5577 { FR30BF_INSN_DIV4S
, SEM_FN_NAME (fr30bf
,div4s
) },
5578 { FR30BF_INSN_LSL
, SEM_FN_NAME (fr30bf
,lsl
) },
5579 { FR30BF_INSN_LSLI
, SEM_FN_NAME (fr30bf
,lsli
) },
5580 { FR30BF_INSN_LSL2
, SEM_FN_NAME (fr30bf
,lsl2
) },
5581 { FR30BF_INSN_LSR
, SEM_FN_NAME (fr30bf
,lsr
) },
5582 { FR30BF_INSN_LSRI
, SEM_FN_NAME (fr30bf
,lsri
) },
5583 { FR30BF_INSN_LSR2
, SEM_FN_NAME (fr30bf
,lsr2
) },
5584 { FR30BF_INSN_ASR
, SEM_FN_NAME (fr30bf
,asr
) },
5585 { FR30BF_INSN_ASRI
, SEM_FN_NAME (fr30bf
,asri
) },
5586 { FR30BF_INSN_ASR2
, SEM_FN_NAME (fr30bf
,asr2
) },
5587 { FR30BF_INSN_LDI8
, SEM_FN_NAME (fr30bf
,ldi8
) },
5588 { FR30BF_INSN_LDI20
, SEM_FN_NAME (fr30bf
,ldi20
) },
5589 { FR30BF_INSN_LDI32
, SEM_FN_NAME (fr30bf
,ldi32
) },
5590 { FR30BF_INSN_LD
, SEM_FN_NAME (fr30bf
,ld
) },
5591 { FR30BF_INSN_LDUH
, SEM_FN_NAME (fr30bf
,lduh
) },
5592 { FR30BF_INSN_LDUB
, SEM_FN_NAME (fr30bf
,ldub
) },
5593 { FR30BF_INSN_LDR13
, SEM_FN_NAME (fr30bf
,ldr13
) },
5594 { FR30BF_INSN_LDR13UH
, SEM_FN_NAME (fr30bf
,ldr13uh
) },
5595 { FR30BF_INSN_LDR13UB
, SEM_FN_NAME (fr30bf
,ldr13ub
) },
5596 { FR30BF_INSN_LDR14
, SEM_FN_NAME (fr30bf
,ldr14
) },
5597 { FR30BF_INSN_LDR14UH
, SEM_FN_NAME (fr30bf
,ldr14uh
) },
5598 { FR30BF_INSN_LDR14UB
, SEM_FN_NAME (fr30bf
,ldr14ub
) },
5599 { FR30BF_INSN_LDR15
, SEM_FN_NAME (fr30bf
,ldr15
) },
5600 { FR30BF_INSN_LDR15GR
, SEM_FN_NAME (fr30bf
,ldr15gr
) },
5601 { FR30BF_INSN_LDR15DR
, SEM_FN_NAME (fr30bf
,ldr15dr
) },
5602 { FR30BF_INSN_LDR15PS
, SEM_FN_NAME (fr30bf
,ldr15ps
) },
5603 { FR30BF_INSN_ST
, SEM_FN_NAME (fr30bf
,st
) },
5604 { FR30BF_INSN_STH
, SEM_FN_NAME (fr30bf
,sth
) },
5605 { FR30BF_INSN_STB
, SEM_FN_NAME (fr30bf
,stb
) },
5606 { FR30BF_INSN_STR13
, SEM_FN_NAME (fr30bf
,str13
) },
5607 { FR30BF_INSN_STR13H
, SEM_FN_NAME (fr30bf
,str13h
) },
5608 { FR30BF_INSN_STR13B
, SEM_FN_NAME (fr30bf
,str13b
) },
5609 { FR30BF_INSN_STR14
, SEM_FN_NAME (fr30bf
,str14
) },
5610 { FR30BF_INSN_STR14H
, SEM_FN_NAME (fr30bf
,str14h
) },
5611 { FR30BF_INSN_STR14B
, SEM_FN_NAME (fr30bf
,str14b
) },
5612 { FR30BF_INSN_STR15
, SEM_FN_NAME (fr30bf
,str15
) },
5613 { FR30BF_INSN_STR15GR
, SEM_FN_NAME (fr30bf
,str15gr
) },
5614 { FR30BF_INSN_STR15DR
, SEM_FN_NAME (fr30bf
,str15dr
) },
5615 { FR30BF_INSN_STR15PS
, SEM_FN_NAME (fr30bf
,str15ps
) },
5616 { FR30BF_INSN_MOV
, SEM_FN_NAME (fr30bf
,mov
) },
5617 { FR30BF_INSN_MOVDR
, SEM_FN_NAME (fr30bf
,movdr
) },
5618 { FR30BF_INSN_MOVPS
, SEM_FN_NAME (fr30bf
,movps
) },
5619 { FR30BF_INSN_MOV2DR
, SEM_FN_NAME (fr30bf
,mov2dr
) },
5620 { FR30BF_INSN_MOV2PS
, SEM_FN_NAME (fr30bf
,mov2ps
) },
5621 { FR30BF_INSN_JMP
, SEM_FN_NAME (fr30bf
,jmp
) },
5622 { FR30BF_INSN_JMPD
, SEM_FN_NAME (fr30bf
,jmpd
) },
5623 { FR30BF_INSN_CALLR
, SEM_FN_NAME (fr30bf
,callr
) },
5624 { FR30BF_INSN_CALLRD
, SEM_FN_NAME (fr30bf
,callrd
) },
5625 { FR30BF_INSN_CALL
, SEM_FN_NAME (fr30bf
,call
) },
5626 { FR30BF_INSN_CALLD
, SEM_FN_NAME (fr30bf
,calld
) },
5627 { FR30BF_INSN_RET
, SEM_FN_NAME (fr30bf
,ret
) },
5628 { FR30BF_INSN_RET_D
, SEM_FN_NAME (fr30bf
,ret_d
) },
5629 { FR30BF_INSN_INT
, SEM_FN_NAME (fr30bf
,int) },
5630 { FR30BF_INSN_INTE
, SEM_FN_NAME (fr30bf
,inte
) },
5631 { FR30BF_INSN_RETI
, SEM_FN_NAME (fr30bf
,reti
) },
5632 { FR30BF_INSN_BRAD
, SEM_FN_NAME (fr30bf
,brad
) },
5633 { FR30BF_INSN_BRA
, SEM_FN_NAME (fr30bf
,bra
) },
5634 { FR30BF_INSN_BNOD
, SEM_FN_NAME (fr30bf
,bnod
) },
5635 { FR30BF_INSN_BNO
, SEM_FN_NAME (fr30bf
,bno
) },
5636 { FR30BF_INSN_BEQD
, SEM_FN_NAME (fr30bf
,beqd
) },
5637 { FR30BF_INSN_BEQ
, SEM_FN_NAME (fr30bf
,beq
) },
5638 { FR30BF_INSN_BNED
, SEM_FN_NAME (fr30bf
,bned
) },
5639 { FR30BF_INSN_BNE
, SEM_FN_NAME (fr30bf
,bne
) },
5640 { FR30BF_INSN_BCD
, SEM_FN_NAME (fr30bf
,bcd
) },
5641 { FR30BF_INSN_BC
, SEM_FN_NAME (fr30bf
,bc
) },
5642 { FR30BF_INSN_BNCD
, SEM_FN_NAME (fr30bf
,bncd
) },
5643 { FR30BF_INSN_BNC
, SEM_FN_NAME (fr30bf
,bnc
) },
5644 { FR30BF_INSN_BND
, SEM_FN_NAME (fr30bf
,bnd
) },
5645 { FR30BF_INSN_BN
, SEM_FN_NAME (fr30bf
,bn
) },
5646 { FR30BF_INSN_BPD
, SEM_FN_NAME (fr30bf
,bpd
) },
5647 { FR30BF_INSN_BP
, SEM_FN_NAME (fr30bf
,bp
) },
5648 { FR30BF_INSN_BVD
, SEM_FN_NAME (fr30bf
,bvd
) },
5649 { FR30BF_INSN_BV
, SEM_FN_NAME (fr30bf
,bv
) },
5650 { FR30BF_INSN_BNVD
, SEM_FN_NAME (fr30bf
,bnvd
) },
5651 { FR30BF_INSN_BNV
, SEM_FN_NAME (fr30bf
,bnv
) },
5652 { FR30BF_INSN_BLTD
, SEM_FN_NAME (fr30bf
,bltd
) },
5653 { FR30BF_INSN_BLT
, SEM_FN_NAME (fr30bf
,blt
) },
5654 { FR30BF_INSN_BGED
, SEM_FN_NAME (fr30bf
,bged
) },
5655 { FR30BF_INSN_BGE
, SEM_FN_NAME (fr30bf
,bge
) },
5656 { FR30BF_INSN_BLED
, SEM_FN_NAME (fr30bf
,bled
) },
5657 { FR30BF_INSN_BLE
, SEM_FN_NAME (fr30bf
,ble
) },
5658 { FR30BF_INSN_BGTD
, SEM_FN_NAME (fr30bf
,bgtd
) },
5659 { FR30BF_INSN_BGT
, SEM_FN_NAME (fr30bf
,bgt
) },
5660 { FR30BF_INSN_BLSD
, SEM_FN_NAME (fr30bf
,blsd
) },
5661 { FR30BF_INSN_BLS
, SEM_FN_NAME (fr30bf
,bls
) },
5662 { FR30BF_INSN_BHID
, SEM_FN_NAME (fr30bf
,bhid
) },
5663 { FR30BF_INSN_BHI
, SEM_FN_NAME (fr30bf
,bhi
) },
5664 { FR30BF_INSN_DMOVR13
, SEM_FN_NAME (fr30bf
,dmovr13
) },
5665 { FR30BF_INSN_DMOVR13H
, SEM_FN_NAME (fr30bf
,dmovr13h
) },
5666 { FR30BF_INSN_DMOVR13B
, SEM_FN_NAME (fr30bf
,dmovr13b
) },
5667 { FR30BF_INSN_DMOVR13PI
, SEM_FN_NAME (fr30bf
,dmovr13pi
) },
5668 { FR30BF_INSN_DMOVR13PIH
, SEM_FN_NAME (fr30bf
,dmovr13pih
) },
5669 { FR30BF_INSN_DMOVR13PIB
, SEM_FN_NAME (fr30bf
,dmovr13pib
) },
5670 { FR30BF_INSN_DMOVR15PI
, SEM_FN_NAME (fr30bf
,dmovr15pi
) },
5671 { FR30BF_INSN_DMOV2R13
, SEM_FN_NAME (fr30bf
,dmov2r13
) },
5672 { FR30BF_INSN_DMOV2R13H
, SEM_FN_NAME (fr30bf
,dmov2r13h
) },
5673 { FR30BF_INSN_DMOV2R13B
, SEM_FN_NAME (fr30bf
,dmov2r13b
) },
5674 { FR30BF_INSN_DMOV2R13PI
, SEM_FN_NAME (fr30bf
,dmov2r13pi
) },
5675 { FR30BF_INSN_DMOV2R13PIH
, SEM_FN_NAME (fr30bf
,dmov2r13pih
) },
5676 { FR30BF_INSN_DMOV2R13PIB
, SEM_FN_NAME (fr30bf
,dmov2r13pib
) },
5677 { FR30BF_INSN_DMOV2R15PD
, SEM_FN_NAME (fr30bf
,dmov2r15pd
) },
5678 { FR30BF_INSN_LDRES
, SEM_FN_NAME (fr30bf
,ldres
) },
5679 { FR30BF_INSN_STRES
, SEM_FN_NAME (fr30bf
,stres
) },
5680 { FR30BF_INSN_COPOP
, SEM_FN_NAME (fr30bf
,copop
) },
5681 { FR30BF_INSN_COPLD
, SEM_FN_NAME (fr30bf
,copld
) },
5682 { FR30BF_INSN_COPST
, SEM_FN_NAME (fr30bf
,copst
) },
5683 { FR30BF_INSN_COPSV
, SEM_FN_NAME (fr30bf
,copsv
) },
5684 { FR30BF_INSN_NOP
, SEM_FN_NAME (fr30bf
,nop
) },
5685 { FR30BF_INSN_ANDCCR
, SEM_FN_NAME (fr30bf
,andccr
) },
5686 { FR30BF_INSN_ORCCR
, SEM_FN_NAME (fr30bf
,orccr
) },
5687 { FR30BF_INSN_STILM
, SEM_FN_NAME (fr30bf
,stilm
) },
5688 { FR30BF_INSN_ADDSP
, SEM_FN_NAME (fr30bf
,addsp
) },
5689 { FR30BF_INSN_EXTSB
, SEM_FN_NAME (fr30bf
,extsb
) },
5690 { FR30BF_INSN_EXTUB
, SEM_FN_NAME (fr30bf
,extub
) },
5691 { FR30BF_INSN_EXTSH
, SEM_FN_NAME (fr30bf
,extsh
) },
5692 { FR30BF_INSN_EXTUH
, SEM_FN_NAME (fr30bf
,extuh
) },
5693 { FR30BF_INSN_LDM0
, SEM_FN_NAME (fr30bf
,ldm0
) },
5694 { FR30BF_INSN_LDM1
, SEM_FN_NAME (fr30bf
,ldm1
) },
5695 { FR30BF_INSN_STM0
, SEM_FN_NAME (fr30bf
,stm0
) },
5696 { FR30BF_INSN_STM1
, SEM_FN_NAME (fr30bf
,stm1
) },
5697 { FR30BF_INSN_ENTER
, SEM_FN_NAME (fr30bf
,enter
) },
5698 { FR30BF_INSN_LEAVE
, SEM_FN_NAME (fr30bf
,leave
) },
5699 { FR30BF_INSN_XCHB
, SEM_FN_NAME (fr30bf
,xchb
) },
5703 /* Add the semantic fns to IDESC_TABLE. */
5706 SEM_FN_NAME (fr30bf
,init_idesc_table
) (SIM_CPU
*current_cpu
)
5708 IDESC
*idesc_table
= CPU_IDESC (current_cpu
);
5709 const struct sem_fn_desc
*sf
;
5710 int mach_num
= MACH_NUM (CPU_MACH (current_cpu
));
5712 for (sf
= &sem_fns
[0]; sf
->fn
!= 0; ++sf
)
5714 const CGEN_INSN
*insn
= idesc_table
[sf
->index
].idata
;
5715 int valid_p
= (CGEN_INSN_VIRTUAL_P (insn
)
5716 || CGEN_INSN_MACH_HAS_P (insn
, mach_num
));
5719 idesc_table
[sf
->index
].sem_fast
= sf
->fn
;
5721 idesc_table
[sf
->index
].sem_fast
= SEM_FN_NAME (fr30bf
,x_invalid
);
5724 idesc_table
[sf
->index
].sem_full
= sf
->fn
;
5726 idesc_table
[sf
->index
].sem_full
= SEM_FN_NAME (fr30bf
,x_invalid
);
This page took 0.143928 seconds and 4 git commands to generate.