1 /* Simulator instruction semantics for iq2000bf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 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 3 of the License, or
12 (at your option) any later version.
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
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #define WANT_CPU iq2000bf
25 #define WANT_CPU_IQ2000BF
32 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
33 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
35 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
38 /* This is used so that we can compile two copies of the semantic code,
39 one with full feature support and one without that runs fast(er).
40 FAST_P, when desired, is defined on the command line, -DFAST_P=1. */
42 #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
44 #define TRACE_RESULT(cpu, abuf, name, type, val)
46 #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
49 /* x-invalid: --invalid-- */
52 SEM_FN_NAME (iq2000bf
,x_invalid
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
54 #define FLD(f) abuf->fields.fmt_empty.f
55 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
56 int UNUSED written
= 0;
57 IADDR UNUSED pc
= abuf
->addr
;
58 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
61 /* Update the recorded pc in the cpu state struct.
62 Only necessary for WITH_SCACHE case, but to avoid the
63 conditional compilation .... */
65 /* Virtual insns have zero size. Overwrite vpc with address of next insn
66 using the default-insn-bitsize spec. When executing insns in parallel
67 we may want to queue the fault and continue execution. */
68 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
69 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
76 /* x-after: --after-- */
79 SEM_FN_NAME (iq2000bf
,x_after
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
81 #define FLD(f) abuf->fields.fmt_empty.f
82 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
83 int UNUSED written
= 0;
84 IADDR UNUSED pc
= abuf
->addr
;
85 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
88 #if WITH_SCACHE_PBB_IQ2000BF
89 iq2000bf_pbb_after (current_cpu
, sem_arg
);
97 /* x-before: --before-- */
100 SEM_FN_NAME (iq2000bf
,x_before
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
102 #define FLD(f) abuf->fields.fmt_empty.f
103 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
104 int UNUSED written
= 0;
105 IADDR UNUSED pc
= abuf
->addr
;
106 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
109 #if WITH_SCACHE_PBB_IQ2000BF
110 iq2000bf_pbb_before (current_cpu
, sem_arg
);
118 /* x-cti-chain: --cti-chain-- */
121 SEM_FN_NAME (iq2000bf
,x_cti_chain
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
123 #define FLD(f) abuf->fields.fmt_empty.f
124 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
125 int UNUSED written
= 0;
126 IADDR UNUSED pc
= abuf
->addr
;
127 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
130 #if WITH_SCACHE_PBB_IQ2000BF
132 vpc
= iq2000bf_pbb_cti_chain (current_cpu
, sem_arg
,
133 pbb_br_type
, pbb_br_npc
);
136 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
137 vpc
= iq2000bf_pbb_cti_chain (current_cpu
, sem_arg
,
138 CPU_PBB_BR_TYPE (current_cpu
),
139 CPU_PBB_BR_NPC (current_cpu
));
148 /* x-chain: --chain-- */
151 SEM_FN_NAME (iq2000bf
,x_chain
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
153 #define FLD(f) abuf->fields.fmt_empty.f
154 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
155 int UNUSED written
= 0;
156 IADDR UNUSED pc
= abuf
->addr
;
157 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
160 #if WITH_SCACHE_PBB_IQ2000BF
161 vpc
= iq2000bf_pbb_chain (current_cpu
, sem_arg
);
172 /* x-begin: --begin-- */
175 SEM_FN_NAME (iq2000bf
,x_begin
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
177 #define FLD(f) abuf->fields.fmt_empty.f
178 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
179 int UNUSED written
= 0;
180 IADDR UNUSED pc
= abuf
->addr
;
181 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
184 #if WITH_SCACHE_PBB_IQ2000BF
185 #if defined DEFINE_SWITCH || defined FAST_P
186 /* In the switch case FAST_P is a constant, allowing several optimizations
187 in any called inline functions. */
188 vpc
= iq2000bf_pbb_begin (current_cpu
, FAST_P
);
190 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
191 vpc
= iq2000bf_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
193 vpc
= iq2000bf_pbb_begin (current_cpu
, 0);
203 /* add: add $rd,$rs,$rt */
206 SEM_FN_NAME (iq2000bf
,add
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
208 #define FLD(f) abuf->fields.sfmt_mrgb.f
209 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
210 int UNUSED written
= 0;
211 IADDR UNUSED pc
= abuf
->addr
;
212 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
215 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
216 SET_H_GR (FLD (f_rd
), opval
);
217 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
224 /* addi: addi $rt,$rs,$lo16 */
227 SEM_FN_NAME (iq2000bf
,addi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
229 #define FLD(f) abuf->fields.sfmt_addi.f
230 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
231 int UNUSED written
= 0;
232 IADDR UNUSED pc
= abuf
->addr
;
233 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
236 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))));
237 SET_H_GR (FLD (f_rt
), opval
);
238 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
245 /* addiu: addiu $rt,$rs,$lo16 */
248 SEM_FN_NAME (iq2000bf
,addiu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
250 #define FLD(f) abuf->fields.sfmt_addi.f
251 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
252 int UNUSED written
= 0;
253 IADDR UNUSED pc
= abuf
->addr
;
254 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
257 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))));
258 SET_H_GR (FLD (f_rt
), opval
);
259 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
266 /* addu: addu $rd,$rs,$rt */
269 SEM_FN_NAME (iq2000bf
,addu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
271 #define FLD(f) abuf->fields.sfmt_mrgb.f
272 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
273 int UNUSED written
= 0;
274 IADDR UNUSED pc
= abuf
->addr
;
275 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
278 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
279 SET_H_GR (FLD (f_rd
), opval
);
280 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
287 /* ado16: ado16 $rd,$rs,$rt */
290 SEM_FN_NAME (iq2000bf
,ado16
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
292 #define FLD(f) abuf->fields.sfmt_mrgb.f
293 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
294 int UNUSED written
= 0;
295 IADDR UNUSED pc
= abuf
->addr
;
296 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
301 tmp_low
= ADDHI (ANDHI (GET_H_GR (FLD (f_rs
)), 65535), ANDHI (GET_H_GR (FLD (f_rt
)), 65535));
302 tmp_high
= ADDHI (SRLSI (GET_H_GR (FLD (f_rs
)), 16), SRLSI (GET_H_GR (FLD (f_rt
)), 16));
304 SI opval
= ORSI (SLLSI (tmp_high
, 16), tmp_low
);
305 SET_H_GR (FLD (f_rd
), opval
);
306 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
314 /* and: and $rd,$rs,$rt */
317 SEM_FN_NAME (iq2000bf
,and) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
319 #define FLD(f) abuf->fields.sfmt_mrgb.f
320 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
321 int UNUSED written
= 0;
322 IADDR UNUSED pc
= abuf
->addr
;
323 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
326 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
327 SET_H_GR (FLD (f_rd
), opval
);
328 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
335 /* andi: andi $rt,$rs,$lo16 */
338 SEM_FN_NAME (iq2000bf
,andi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
340 #define FLD(f) abuf->fields.sfmt_addi.f
341 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
342 int UNUSED written
= 0;
343 IADDR UNUSED pc
= abuf
->addr
;
344 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
347 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
348 SET_H_GR (FLD (f_rt
), opval
);
349 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
356 /* andoi: andoi $rt,$rs,$lo16 */
359 SEM_FN_NAME (iq2000bf
,andoi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
361 #define FLD(f) abuf->fields.sfmt_addi.f
362 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
363 int UNUSED written
= 0;
364 IADDR UNUSED pc
= abuf
->addr
;
365 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
368 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ORSI (0xffff0000, EXTHISI (TRUNCSIHI (FLD (f_imm
)))));
369 SET_H_GR (FLD (f_rt
), opval
);
370 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
377 /* nor: nor $rd,$rs,$rt */
380 SEM_FN_NAME (iq2000bf
,nor
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
382 #define FLD(f) abuf->fields.sfmt_mrgb.f
383 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
384 int UNUSED written
= 0;
385 IADDR UNUSED pc
= abuf
->addr
;
386 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
389 SI opval
= INVSI (ORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
))));
390 SET_H_GR (FLD (f_rd
), opval
);
391 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
398 /* or: or $rd,$rs,$rt */
401 SEM_FN_NAME (iq2000bf
,or) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
403 #define FLD(f) abuf->fields.sfmt_mrgb.f
404 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
405 int UNUSED written
= 0;
406 IADDR UNUSED pc
= abuf
->addr
;
407 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
410 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
411 SET_H_GR (FLD (f_rd
), opval
);
412 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
419 /* ori: ori $rt,$rs,$lo16 */
422 SEM_FN_NAME (iq2000bf
,ori
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
424 #define FLD(f) abuf->fields.sfmt_addi.f
425 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
426 int UNUSED written
= 0;
427 IADDR UNUSED pc
= abuf
->addr
;
428 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
431 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
432 SET_H_GR (FLD (f_rt
), opval
);
433 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
440 /* ram: ram $rd,$rt,$shamt,$maskl,$maskr */
443 SEM_FN_NAME (iq2000bf
,ram
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
445 #define FLD(f) abuf->fields.sfmt_ram.f
446 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
447 int UNUSED written
= 0;
448 IADDR UNUSED pc
= abuf
->addr
;
449 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
453 SI opval
= RORSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
454 SET_H_GR (FLD (f_rd
), opval
);
455 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
458 SI opval
= ANDSI (GET_H_GR (FLD (f_rd
)), SRLSI (0xffffffff, FLD (f_maskl
)));
459 SET_H_GR (FLD (f_rd
), opval
);
460 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
463 SI opval
= ANDSI (GET_H_GR (FLD (f_rd
)), SLLSI (0xffffffff, FLD (f_rs
)));
464 SET_H_GR (FLD (f_rd
), opval
);
465 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
473 /* sll: sll $rd,$rt,$shamt */
476 SEM_FN_NAME (iq2000bf
,sll
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
478 #define FLD(f) abuf->fields.sfmt_ram.f
479 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
480 int UNUSED written
= 0;
481 IADDR UNUSED pc
= abuf
->addr
;
482 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
485 SI opval
= SLLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
486 SET_H_GR (FLD (f_rd
), opval
);
487 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
494 /* sllv: sllv $rd,$rt,$rs */
497 SEM_FN_NAME (iq2000bf
,sllv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
499 #define FLD(f) abuf->fields.sfmt_mrgb.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
, 4);
506 SI opval
= SLLSI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
507 SET_H_GR (FLD (f_rd
), opval
);
508 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
515 /* slmv: slmv $rd,$rt,$rs,$shamt */
518 SEM_FN_NAME (iq2000bf
,slmv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
520 #define FLD(f) abuf->fields.sfmt_ram.f
521 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
522 int UNUSED written
= 0;
523 IADDR UNUSED pc
= abuf
->addr
;
524 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
527 SI opval
= ANDSI (SLLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
)), SRLSI (0xffffffff, GET_H_GR (FLD (f_rs
))));
528 SET_H_GR (FLD (f_rd
), opval
);
529 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
536 /* slt: slt $rd,$rs,$rt */
539 SEM_FN_NAME (iq2000bf
,slt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
541 #define FLD(f) abuf->fields.sfmt_mrgb.f
542 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
543 int UNUSED written
= 0;
544 IADDR UNUSED pc
= abuf
->addr
;
545 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
547 if (LTSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
550 SET_H_GR (FLD (f_rd
), opval
);
552 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
557 SET_H_GR (FLD (f_rd
), opval
);
559 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
563 abuf
->written
= written
;
568 /* slti: slti $rt,$rs,$imm */
571 SEM_FN_NAME (iq2000bf
,slti
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
573 #define FLD(f) abuf->fields.sfmt_addi.f
574 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
575 int UNUSED written
= 0;
576 IADDR UNUSED pc
= abuf
->addr
;
577 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
579 if (LTSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))) {
582 SET_H_GR (FLD (f_rt
), opval
);
584 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
589 SET_H_GR (FLD (f_rt
), opval
);
591 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
595 abuf
->written
= written
;
600 /* sltiu: sltiu $rt,$rs,$imm */
603 SEM_FN_NAME (iq2000bf
,sltiu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
605 #define FLD(f) abuf->fields.sfmt_addi.f
606 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
607 int UNUSED written
= 0;
608 IADDR UNUSED pc
= abuf
->addr
;
609 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
611 if (LTUSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))) {
614 SET_H_GR (FLD (f_rt
), opval
);
616 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
621 SET_H_GR (FLD (f_rt
), opval
);
623 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
627 abuf
->written
= written
;
632 /* sltu: sltu $rd,$rs,$rt */
635 SEM_FN_NAME (iq2000bf
,sltu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
637 #define FLD(f) abuf->fields.sfmt_mrgb.f
638 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
639 int UNUSED written
= 0;
640 IADDR UNUSED pc
= abuf
->addr
;
641 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
643 if (LTUSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
646 SET_H_GR (FLD (f_rd
), opval
);
648 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
653 SET_H_GR (FLD (f_rd
), opval
);
655 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
659 abuf
->written
= written
;
664 /* sra: sra $rd,$rt,$shamt */
667 SEM_FN_NAME (iq2000bf
,sra
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
669 #define FLD(f) abuf->fields.sfmt_ram.f
670 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
671 int UNUSED written
= 0;
672 IADDR UNUSED pc
= abuf
->addr
;
673 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
676 SI opval
= SRASI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
677 SET_H_GR (FLD (f_rd
), opval
);
678 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
685 /* srav: srav $rd,$rt,$rs */
688 SEM_FN_NAME (iq2000bf
,srav
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
690 #define FLD(f) abuf->fields.sfmt_mrgb.f
691 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
692 int UNUSED written
= 0;
693 IADDR UNUSED pc
= abuf
->addr
;
694 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
697 SI opval
= SRASI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
698 SET_H_GR (FLD (f_rd
), opval
);
699 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
706 /* srl: srl $rd,$rt,$shamt */
709 SEM_FN_NAME (iq2000bf
,srl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
711 #define FLD(f) abuf->fields.sfmt_ram.f
712 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
713 int UNUSED written
= 0;
714 IADDR UNUSED pc
= abuf
->addr
;
715 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
718 SI opval
= SRLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
719 SET_H_GR (FLD (f_rd
), opval
);
720 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
727 /* srlv: srlv $rd,$rt,$rs */
730 SEM_FN_NAME (iq2000bf
,srlv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
732 #define FLD(f) abuf->fields.sfmt_mrgb.f
733 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
734 int UNUSED written
= 0;
735 IADDR UNUSED pc
= abuf
->addr
;
736 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
739 SI opval
= SRLSI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
740 SET_H_GR (FLD (f_rd
), opval
);
741 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
748 /* srmv: srmv $rd,$rt,$rs,$shamt */
751 SEM_FN_NAME (iq2000bf
,srmv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
753 #define FLD(f) abuf->fields.sfmt_ram.f
754 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
755 int UNUSED written
= 0;
756 IADDR UNUSED pc
= abuf
->addr
;
757 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
760 SI opval
= ANDSI (SRLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
)), SLLSI (0xffffffff, GET_H_GR (FLD (f_rs
))));
761 SET_H_GR (FLD (f_rd
), opval
);
762 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
769 /* sub: sub $rd,$rs,$rt */
772 SEM_FN_NAME (iq2000bf
,sub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
774 #define FLD(f) abuf->fields.sfmt_mrgb.f
775 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
776 int UNUSED written
= 0;
777 IADDR UNUSED pc
= abuf
->addr
;
778 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
781 SI opval
= SUBSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
782 SET_H_GR (FLD (f_rd
), opval
);
783 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
790 /* subu: subu $rd,$rs,$rt */
793 SEM_FN_NAME (iq2000bf
,subu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
795 #define FLD(f) abuf->fields.sfmt_mrgb.f
796 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
797 int UNUSED written
= 0;
798 IADDR UNUSED pc
= abuf
->addr
;
799 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
802 SI opval
= SUBSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
803 SET_H_GR (FLD (f_rd
), opval
);
804 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
811 /* xor: xor $rd,$rs,$rt */
814 SEM_FN_NAME (iq2000bf
,xor) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
816 #define FLD(f) abuf->fields.sfmt_mrgb.f
817 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
818 int UNUSED written
= 0;
819 IADDR UNUSED pc
= abuf
->addr
;
820 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
823 SI opval
= XORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
824 SET_H_GR (FLD (f_rd
), opval
);
825 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
832 /* xori: xori $rt,$rs,$lo16 */
835 SEM_FN_NAME (iq2000bf
,xori
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
837 #define FLD(f) abuf->fields.sfmt_addi.f
838 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
839 int UNUSED written
= 0;
840 IADDR UNUSED pc
= abuf
->addr
;
841 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
844 SI opval
= XORSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
845 SET_H_GR (FLD (f_rt
), opval
);
846 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
853 /* bbi: bbi $rs($bitnum),$offset */
856 SEM_FN_NAME (iq2000bf
,bbi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
858 #define FLD(f) abuf->fields.sfmt_bbi.f
859 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
860 int UNUSED written
= 0;
861 IADDR UNUSED pc
= abuf
->addr
;
863 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
865 if (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, FLD (f_rt
)))) {
868 USI opval
= FLD (i_offset
);
869 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
871 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
876 abuf
->written
= written
;
877 SEM_BRANCH_FINI (vpc
);
882 /* bbin: bbin $rs($bitnum),$offset */
885 SEM_FN_NAME (iq2000bf
,bbin
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
887 #define FLD(f) abuf->fields.sfmt_bbi.f
888 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
889 int UNUSED written
= 0;
890 IADDR UNUSED pc
= abuf
->addr
;
892 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
894 if (NOTSI (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, FLD (f_rt
))))) {
897 USI opval
= FLD (i_offset
);
898 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
900 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
905 abuf
->written
= written
;
906 SEM_BRANCH_FINI (vpc
);
911 /* bbv: bbv $rs,$rt,$offset */
914 SEM_FN_NAME (iq2000bf
,bbv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
916 #define FLD(f) abuf->fields.sfmt_bbi.f
917 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
918 int UNUSED written
= 0;
919 IADDR UNUSED pc
= abuf
->addr
;
921 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
923 if (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, ANDSI (GET_H_GR (FLD (f_rt
)), 31)))) {
926 USI opval
= FLD (i_offset
);
927 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
929 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
934 abuf
->written
= written
;
935 SEM_BRANCH_FINI (vpc
);
940 /* bbvn: bbvn $rs,$rt,$offset */
943 SEM_FN_NAME (iq2000bf
,bbvn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
945 #define FLD(f) abuf->fields.sfmt_bbi.f
946 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
947 int UNUSED written
= 0;
948 IADDR UNUSED pc
= abuf
->addr
;
950 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
952 if (NOTSI (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, ANDSI (GET_H_GR (FLD (f_rt
)), 31))))) {
955 USI opval
= FLD (i_offset
);
956 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
958 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
963 abuf
->written
= written
;
964 SEM_BRANCH_FINI (vpc
);
969 /* beq: beq $rs,$rt,$offset */
972 SEM_FN_NAME (iq2000bf
,beq
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
974 #define FLD(f) abuf->fields.sfmt_bbi.f
975 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
976 int UNUSED written
= 0;
977 IADDR UNUSED pc
= abuf
->addr
;
979 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
981 if (EQSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
984 USI opval
= FLD (i_offset
);
985 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
987 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
992 abuf
->written
= written
;
993 SEM_BRANCH_FINI (vpc
);
998 /* beql: beql $rs,$rt,$offset */
1001 SEM_FN_NAME (iq2000bf
,beql
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1003 #define FLD(f) abuf->fields.sfmt_bbi.f
1004 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1005 int UNUSED written
= 0;
1006 IADDR UNUSED pc
= abuf
->addr
;
1008 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1010 if (EQSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1013 USI opval
= FLD (i_offset
);
1014 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1015 written
|= (1 << 3);
1016 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1021 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1024 abuf
->written
= written
;
1025 SEM_BRANCH_FINI (vpc
);
1030 /* bgez: bgez $rs,$offset */
1033 SEM_FN_NAME (iq2000bf
,bgez
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1035 #define FLD(f) abuf->fields.sfmt_bbi.f
1036 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1037 int UNUSED written
= 0;
1038 IADDR UNUSED pc
= abuf
->addr
;
1040 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1042 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1045 USI opval
= FLD (i_offset
);
1046 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1047 written
|= (1 << 2);
1048 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1053 abuf
->written
= written
;
1054 SEM_BRANCH_FINI (vpc
);
1059 /* bgezal: bgezal $rs,$offset */
1062 SEM_FN_NAME (iq2000bf
,bgezal
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1064 #define FLD(f) abuf->fields.sfmt_bbi.f
1065 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1066 int UNUSED written
= 0;
1067 IADDR UNUSED pc
= abuf
->addr
;
1069 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1071 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1074 SI opval
= ADDSI (pc
, 8);
1075 SET_H_GR (((UINT
) 31), opval
);
1076 written
|= (1 << 3);
1077 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1081 USI opval
= FLD (i_offset
);
1082 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1083 written
|= (1 << 4);
1084 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1090 abuf
->written
= written
;
1091 SEM_BRANCH_FINI (vpc
);
1096 /* bgezall: bgezall $rs,$offset */
1099 SEM_FN_NAME (iq2000bf
,bgezall
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1101 #define FLD(f) abuf->fields.sfmt_bbi.f
1102 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1103 int UNUSED written
= 0;
1104 IADDR UNUSED pc
= abuf
->addr
;
1106 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1108 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1111 SI opval
= ADDSI (pc
, 8);
1112 SET_H_GR (((UINT
) 31), opval
);
1113 written
|= (1 << 3);
1114 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1118 USI opval
= FLD (i_offset
);
1119 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1120 written
|= (1 << 4);
1121 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1127 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1130 abuf
->written
= written
;
1131 SEM_BRANCH_FINI (vpc
);
1136 /* bgezl: bgezl $rs,$offset */
1139 SEM_FN_NAME (iq2000bf
,bgezl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1141 #define FLD(f) abuf->fields.sfmt_bbi.f
1142 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1143 int UNUSED written
= 0;
1144 IADDR UNUSED pc
= abuf
->addr
;
1146 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1148 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1151 USI opval
= FLD (i_offset
);
1152 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1153 written
|= (1 << 2);
1154 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1159 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1162 abuf
->written
= written
;
1163 SEM_BRANCH_FINI (vpc
);
1168 /* bltz: bltz $rs,$offset */
1171 SEM_FN_NAME (iq2000bf
,bltz
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1173 #define FLD(f) abuf->fields.sfmt_bbi.f
1174 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1175 int UNUSED written
= 0;
1176 IADDR UNUSED pc
= abuf
->addr
;
1178 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1180 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1183 USI opval
= FLD (i_offset
);
1184 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1185 written
|= (1 << 2);
1186 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1191 abuf
->written
= written
;
1192 SEM_BRANCH_FINI (vpc
);
1197 /* bltzl: bltzl $rs,$offset */
1200 SEM_FN_NAME (iq2000bf
,bltzl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1202 #define FLD(f) abuf->fields.sfmt_bbi.f
1203 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1204 int UNUSED written
= 0;
1205 IADDR UNUSED pc
= abuf
->addr
;
1207 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1209 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1212 USI opval
= FLD (i_offset
);
1213 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1214 written
|= (1 << 2);
1215 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1220 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1223 abuf
->written
= written
;
1224 SEM_BRANCH_FINI (vpc
);
1229 /* bltzal: bltzal $rs,$offset */
1232 SEM_FN_NAME (iq2000bf
,bltzal
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1234 #define FLD(f) abuf->fields.sfmt_bbi.f
1235 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1236 int UNUSED written
= 0;
1237 IADDR UNUSED pc
= abuf
->addr
;
1239 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1241 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1244 SI opval
= ADDSI (pc
, 8);
1245 SET_H_GR (((UINT
) 31), opval
);
1246 written
|= (1 << 3);
1247 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1251 USI opval
= FLD (i_offset
);
1252 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1253 written
|= (1 << 4);
1254 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1260 abuf
->written
= written
;
1261 SEM_BRANCH_FINI (vpc
);
1266 /* bltzall: bltzall $rs,$offset */
1269 SEM_FN_NAME (iq2000bf
,bltzall
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1271 #define FLD(f) abuf->fields.sfmt_bbi.f
1272 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1273 int UNUSED written
= 0;
1274 IADDR UNUSED pc
= abuf
->addr
;
1276 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1278 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1281 SI opval
= ADDSI (pc
, 8);
1282 SET_H_GR (((UINT
) 31), opval
);
1283 written
|= (1 << 3);
1284 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1288 USI opval
= FLD (i_offset
);
1289 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1290 written
|= (1 << 4);
1291 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1297 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1300 abuf
->written
= written
;
1301 SEM_BRANCH_FINI (vpc
);
1306 /* bmb0: bmb0 $rs,$rt,$offset */
1309 SEM_FN_NAME (iq2000bf
,bmb0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1311 #define FLD(f) abuf->fields.sfmt_bbi.f
1312 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1313 int UNUSED written
= 0;
1314 IADDR UNUSED pc
= abuf
->addr
;
1316 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1318 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 255), ANDSI (GET_H_GR (FLD (f_rt
)), 255))) {
1321 USI opval
= FLD (i_offset
);
1322 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1323 written
|= (1 << 3);
1324 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1329 abuf
->written
= written
;
1330 SEM_BRANCH_FINI (vpc
);
1335 /* bmb1: bmb1 $rs,$rt,$offset */
1338 SEM_FN_NAME (iq2000bf
,bmb1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1340 #define FLD(f) abuf->fields.sfmt_bbi.f
1341 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1342 int UNUSED written
= 0;
1343 IADDR UNUSED pc
= abuf
->addr
;
1345 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1347 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 65280), ANDSI (GET_H_GR (FLD (f_rt
)), 65280))) {
1350 USI opval
= FLD (i_offset
);
1351 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1352 written
|= (1 << 3);
1353 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1358 abuf
->written
= written
;
1359 SEM_BRANCH_FINI (vpc
);
1364 /* bmb2: bmb2 $rs,$rt,$offset */
1367 SEM_FN_NAME (iq2000bf
,bmb2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1369 #define FLD(f) abuf->fields.sfmt_bbi.f
1370 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1371 int UNUSED written
= 0;
1372 IADDR UNUSED pc
= abuf
->addr
;
1374 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1376 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 16711680), ANDSI (GET_H_GR (FLD (f_rt
)), 16711680))) {
1379 USI opval
= FLD (i_offset
);
1380 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1381 written
|= (1 << 3);
1382 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1387 abuf
->written
= written
;
1388 SEM_BRANCH_FINI (vpc
);
1393 /* bmb3: bmb3 $rs,$rt,$offset */
1396 SEM_FN_NAME (iq2000bf
,bmb3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1398 #define FLD(f) abuf->fields.sfmt_bbi.f
1399 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1400 int UNUSED written
= 0;
1401 IADDR UNUSED pc
= abuf
->addr
;
1403 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1405 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000), ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000))) {
1408 USI opval
= FLD (i_offset
);
1409 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1410 written
|= (1 << 3);
1411 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1416 abuf
->written
= written
;
1417 SEM_BRANCH_FINI (vpc
);
1422 /* bne: bne $rs,$rt,$offset */
1425 SEM_FN_NAME (iq2000bf
,bne
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1427 #define FLD(f) abuf->fields.sfmt_bbi.f
1428 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1429 int UNUSED written
= 0;
1430 IADDR UNUSED pc
= abuf
->addr
;
1432 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1434 if (NESI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1437 USI opval
= FLD (i_offset
);
1438 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1439 written
|= (1 << 3);
1440 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1445 abuf
->written
= written
;
1446 SEM_BRANCH_FINI (vpc
);
1451 /* bnel: bnel $rs,$rt,$offset */
1454 SEM_FN_NAME (iq2000bf
,bnel
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1456 #define FLD(f) abuf->fields.sfmt_bbi.f
1457 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1458 int UNUSED written
= 0;
1459 IADDR UNUSED pc
= abuf
->addr
;
1461 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1463 if (NESI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1466 USI opval
= FLD (i_offset
);
1467 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1468 written
|= (1 << 3);
1469 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1474 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1477 abuf
->written
= written
;
1478 SEM_BRANCH_FINI (vpc
);
1483 /* jalr: jalr $rd,$rs */
1486 SEM_FN_NAME (iq2000bf
,jalr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1488 #define FLD(f) abuf->fields.sfmt_mrgb.f
1489 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1490 int UNUSED written
= 0;
1491 IADDR UNUSED pc
= abuf
->addr
;
1493 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1498 SI opval
= ADDSI (pc
, 8);
1499 SET_H_GR (FLD (f_rd
), opval
);
1500 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1503 USI opval
= GET_H_GR (FLD (f_rs
));
1504 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1505 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1510 SEM_BRANCH_FINI (vpc
);
1518 SEM_FN_NAME (iq2000bf
,jr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1520 #define FLD(f) abuf->fields.sfmt_bbi.f
1521 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1522 int UNUSED written
= 0;
1523 IADDR UNUSED pc
= abuf
->addr
;
1525 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1529 USI opval
= GET_H_GR (FLD (f_rs
));
1530 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1531 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1535 SEM_BRANCH_FINI (vpc
);
1540 /* lb: lb $rt,$lo16($base) */
1543 SEM_FN_NAME (iq2000bf
,lb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1545 #define FLD(f) abuf->fields.sfmt_addi.f
1546 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1547 int UNUSED written
= 0;
1548 IADDR UNUSED pc
= abuf
->addr
;
1549 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1552 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1553 SET_H_GR (FLD (f_rt
), opval
);
1554 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1561 /* lbu: lbu $rt,$lo16($base) */
1564 SEM_FN_NAME (iq2000bf
,lbu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1566 #define FLD(f) abuf->fields.sfmt_addi.f
1567 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1568 int UNUSED written
= 0;
1569 IADDR UNUSED pc
= abuf
->addr
;
1570 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1573 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1574 SET_H_GR (FLD (f_rt
), opval
);
1575 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1582 /* lh: lh $rt,$lo16($base) */
1585 SEM_FN_NAME (iq2000bf
,lh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1587 #define FLD(f) abuf->fields.sfmt_addi.f
1588 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1589 int UNUSED written
= 0;
1590 IADDR UNUSED pc
= abuf
->addr
;
1591 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1594 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1595 SET_H_GR (FLD (f_rt
), opval
);
1596 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1603 /* lhu: lhu $rt,$lo16($base) */
1606 SEM_FN_NAME (iq2000bf
,lhu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1608 #define FLD(f) abuf->fields.sfmt_addi.f
1609 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1610 int UNUSED written
= 0;
1611 IADDR UNUSED pc
= abuf
->addr
;
1612 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1615 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1616 SET_H_GR (FLD (f_rt
), opval
);
1617 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1624 /* lui: lui $rt,$hi16 */
1627 SEM_FN_NAME (iq2000bf
,lui
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1629 #define FLD(f) abuf->fields.sfmt_addi.f
1630 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1631 int UNUSED written
= 0;
1632 IADDR UNUSED pc
= abuf
->addr
;
1633 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1636 SI opval
= SLLSI (FLD (f_imm
), 16);
1637 SET_H_GR (FLD (f_rt
), opval
);
1638 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1645 /* lw: lw $rt,$lo16($base) */
1648 SEM_FN_NAME (iq2000bf
,lw
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1650 #define FLD(f) abuf->fields.sfmt_addi.f
1651 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1652 int UNUSED written
= 0;
1653 IADDR UNUSED pc
= abuf
->addr
;
1654 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1657 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))));
1658 SET_H_GR (FLD (f_rt
), opval
);
1659 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1666 /* sb: sb $rt,$lo16($base) */
1669 SEM_FN_NAME (iq2000bf
,sb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1671 #define FLD(f) abuf->fields.sfmt_addi.f
1672 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1673 int UNUSED written
= 0;
1674 IADDR UNUSED pc
= abuf
->addr
;
1675 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1678 QI opval
= ANDQI (GET_H_GR (FLD (f_rt
)), 255);
1679 SETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1680 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1687 /* sh: sh $rt,$lo16($base) */
1690 SEM_FN_NAME (iq2000bf
,sh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1692 #define FLD(f) abuf->fields.sfmt_addi.f
1693 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1694 int UNUSED written
= 0;
1695 IADDR UNUSED pc
= abuf
->addr
;
1696 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1699 HI opval
= ANDHI (GET_H_GR (FLD (f_rt
)), 65535);
1700 SETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1701 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1708 /* sw: sw $rt,$lo16($base) */
1711 SEM_FN_NAME (iq2000bf
,sw
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1713 #define FLD(f) abuf->fields.sfmt_addi.f
1714 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1715 int UNUSED written
= 0;
1716 IADDR UNUSED pc
= abuf
->addr
;
1717 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1720 SI opval
= GET_H_GR (FLD (f_rt
));
1721 SETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1722 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1732 SEM_FN_NAME (iq2000bf
,break) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1734 #define FLD(f) abuf->fields.fmt_empty.f
1735 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1736 int UNUSED written
= 0;
1737 IADDR UNUSED pc
= abuf
->addr
;
1738 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1740 do_break (current_cpu
, pc
);
1746 /* syscall: syscall */
1749 SEM_FN_NAME (iq2000bf
,syscall
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1751 #define FLD(f) abuf->fields.fmt_empty.f
1752 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1753 int UNUSED written
= 0;
1754 IADDR UNUSED pc
= abuf
->addr
;
1755 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1757 do_syscall (current_cpu
);
1763 /* andoui: andoui $rt,$rs,$hi16 */
1766 SEM_FN_NAME (iq2000bf
,andoui
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1768 #define FLD(f) abuf->fields.sfmt_addi.f
1769 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1770 int UNUSED written
= 0;
1771 IADDR UNUSED pc
= abuf
->addr
;
1772 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1775 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ORSI (SLLSI (FLD (f_imm
), 16), 65535));
1776 SET_H_GR (FLD (f_rt
), opval
);
1777 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1784 /* orui: orui $rt,$rs,$hi16 */
1787 SEM_FN_NAME (iq2000bf
,orui
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1789 #define FLD(f) abuf->fields.sfmt_addi.f
1790 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1791 int UNUSED written
= 0;
1792 IADDR UNUSED pc
= abuf
->addr
;
1793 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1796 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), SLLSI (FLD (f_imm
), 16));
1797 SET_H_GR (FLD (f_rt
), opval
);
1798 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1805 /* bgtz: bgtz $rs,$offset */
1808 SEM_FN_NAME (iq2000bf
,bgtz
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1810 #define FLD(f) abuf->fields.sfmt_bbi.f
1811 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1812 int UNUSED written
= 0;
1813 IADDR UNUSED pc
= abuf
->addr
;
1815 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1817 if (GTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1820 USI opval
= FLD (i_offset
);
1821 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1822 written
|= (1 << 2);
1823 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1828 abuf
->written
= written
;
1829 SEM_BRANCH_FINI (vpc
);
1834 /* bgtzl: bgtzl $rs,$offset */
1837 SEM_FN_NAME (iq2000bf
,bgtzl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1839 #define FLD(f) abuf->fields.sfmt_bbi.f
1840 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1841 int UNUSED written
= 0;
1842 IADDR UNUSED pc
= abuf
->addr
;
1844 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1846 if (GTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1849 USI opval
= FLD (i_offset
);
1850 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1851 written
|= (1 << 2);
1852 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1857 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1860 abuf
->written
= written
;
1861 SEM_BRANCH_FINI (vpc
);
1866 /* blez: blez $rs,$offset */
1869 SEM_FN_NAME (iq2000bf
,blez
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1871 #define FLD(f) abuf->fields.sfmt_bbi.f
1872 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1873 int UNUSED written
= 0;
1874 IADDR UNUSED pc
= abuf
->addr
;
1876 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1878 if (LESI (GET_H_GR (FLD (f_rs
)), 0)) {
1881 USI opval
= FLD (i_offset
);
1882 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1883 written
|= (1 << 2);
1884 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1889 abuf
->written
= written
;
1890 SEM_BRANCH_FINI (vpc
);
1895 /* blezl: blezl $rs,$offset */
1898 SEM_FN_NAME (iq2000bf
,blezl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1900 #define FLD(f) abuf->fields.sfmt_bbi.f
1901 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1902 int UNUSED written
= 0;
1903 IADDR UNUSED pc
= abuf
->addr
;
1905 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1907 if (LESI (GET_H_GR (FLD (f_rs
)), 0)) {
1910 USI opval
= FLD (i_offset
);
1911 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1912 written
|= (1 << 2);
1913 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1918 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1921 abuf
->written
= written
;
1922 SEM_BRANCH_FINI (vpc
);
1927 /* mrgb: mrgb $rd,$rs,$rt,$mask */
1930 SEM_FN_NAME (iq2000bf
,mrgb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1932 #define FLD(f) abuf->fields.sfmt_mrgb.f
1933 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1934 int UNUSED written
= 0;
1935 IADDR UNUSED pc
= abuf
->addr
;
1936 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1940 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 0)))) {
1941 tmp_temp
= ANDSI (GET_H_GR (FLD (f_rs
)), 255);
1943 tmp_temp
= ANDSI (GET_H_GR (FLD (f_rt
)), 255);
1945 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 1)))) {
1946 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 65280));
1948 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 65280));
1950 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 2)))) {
1951 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 16711680));
1953 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 16711680));
1955 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 3)))) {
1956 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000));
1958 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000));
1961 SI opval
= tmp_temp
;
1962 SET_H_GR (FLD (f_rd
), opval
);
1963 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1971 /* bctxt: bctxt $rs,$offset */
1974 SEM_FN_NAME (iq2000bf
,bctxt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1976 #define FLD(f) abuf->fields.fmt_empty.f
1977 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1978 int UNUSED written
= 0;
1979 IADDR UNUSED pc
= abuf
->addr
;
1981 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1985 SEM_BRANCH_FINI (vpc
);
1990 /* bc0f: bc0f $offset */
1993 SEM_FN_NAME (iq2000bf
,bc0f
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1995 #define FLD(f) abuf->fields.fmt_empty.f
1996 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1997 int UNUSED written
= 0;
1998 IADDR UNUSED pc
= abuf
->addr
;
2000 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2004 SEM_BRANCH_FINI (vpc
);
2009 /* bc0fl: bc0fl $offset */
2012 SEM_FN_NAME (iq2000bf
,bc0fl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2014 #define FLD(f) abuf->fields.fmt_empty.f
2015 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2016 int UNUSED written
= 0;
2017 IADDR UNUSED pc
= abuf
->addr
;
2019 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2023 SEM_BRANCH_FINI (vpc
);
2028 /* bc3f: bc3f $offset */
2031 SEM_FN_NAME (iq2000bf
,bc3f
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2033 #define FLD(f) abuf->fields.fmt_empty.f
2034 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2035 int UNUSED written
= 0;
2036 IADDR UNUSED pc
= abuf
->addr
;
2038 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2042 SEM_BRANCH_FINI (vpc
);
2047 /* bc3fl: bc3fl $offset */
2050 SEM_FN_NAME (iq2000bf
,bc3fl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2052 #define FLD(f) abuf->fields.fmt_empty.f
2053 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2054 int UNUSED written
= 0;
2055 IADDR UNUSED pc
= abuf
->addr
;
2057 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2061 SEM_BRANCH_FINI (vpc
);
2066 /* bc0t: bc0t $offset */
2069 SEM_FN_NAME (iq2000bf
,bc0t
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2071 #define FLD(f) abuf->fields.fmt_empty.f
2072 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2073 int UNUSED written
= 0;
2074 IADDR UNUSED pc
= abuf
->addr
;
2076 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2080 SEM_BRANCH_FINI (vpc
);
2085 /* bc0tl: bc0tl $offset */
2088 SEM_FN_NAME (iq2000bf
,bc0tl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2090 #define FLD(f) abuf->fields.fmt_empty.f
2091 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2092 int UNUSED written
= 0;
2093 IADDR UNUSED pc
= abuf
->addr
;
2095 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2099 SEM_BRANCH_FINI (vpc
);
2104 /* bc3t: bc3t $offset */
2107 SEM_FN_NAME (iq2000bf
,bc3t
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2109 #define FLD(f) abuf->fields.fmt_empty.f
2110 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2111 int UNUSED written
= 0;
2112 IADDR UNUSED pc
= abuf
->addr
;
2114 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2118 SEM_BRANCH_FINI (vpc
);
2123 /* bc3tl: bc3tl $offset */
2126 SEM_FN_NAME (iq2000bf
,bc3tl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2128 #define FLD(f) abuf->fields.fmt_empty.f
2129 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2130 int UNUSED written
= 0;
2131 IADDR UNUSED pc
= abuf
->addr
;
2133 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2137 SEM_BRANCH_FINI (vpc
);
2142 /* cfc0: cfc0 $rt,$rd */
2145 SEM_FN_NAME (iq2000bf
,cfc0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2147 #define FLD(f) abuf->fields.fmt_empty.f
2148 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2149 int UNUSED written
= 0;
2150 IADDR UNUSED pc
= abuf
->addr
;
2151 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2159 /* cfc1: cfc1 $rt,$rd */
2162 SEM_FN_NAME (iq2000bf
,cfc1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2164 #define FLD(f) abuf->fields.fmt_empty.f
2165 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2166 int UNUSED written
= 0;
2167 IADDR UNUSED pc
= abuf
->addr
;
2168 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2176 /* cfc2: cfc2 $rt,$rd */
2179 SEM_FN_NAME (iq2000bf
,cfc2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2181 #define FLD(f) abuf->fields.fmt_empty.f
2182 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2183 int UNUSED written
= 0;
2184 IADDR UNUSED pc
= abuf
->addr
;
2185 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2193 /* cfc3: cfc3 $rt,$rd */
2196 SEM_FN_NAME (iq2000bf
,cfc3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2198 #define FLD(f) abuf->fields.fmt_empty.f
2199 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2200 int UNUSED written
= 0;
2201 IADDR UNUSED pc
= abuf
->addr
;
2202 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2210 /* chkhdr: chkhdr $rd,$rt */
2213 SEM_FN_NAME (iq2000bf
,chkhdr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2215 #define FLD(f) abuf->fields.fmt_empty.f
2216 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2217 int UNUSED written
= 0;
2218 IADDR UNUSED pc
= abuf
->addr
;
2219 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2227 /* ctc0: ctc0 $rt,$rd */
2230 SEM_FN_NAME (iq2000bf
,ctc0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2232 #define FLD(f) abuf->fields.fmt_empty.f
2233 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2234 int UNUSED written
= 0;
2235 IADDR UNUSED pc
= abuf
->addr
;
2236 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2244 /* ctc1: ctc1 $rt,$rd */
2247 SEM_FN_NAME (iq2000bf
,ctc1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2249 #define FLD(f) abuf->fields.fmt_empty.f
2250 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2251 int UNUSED written
= 0;
2252 IADDR UNUSED pc
= abuf
->addr
;
2253 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2261 /* ctc2: ctc2 $rt,$rd */
2264 SEM_FN_NAME (iq2000bf
,ctc2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2266 #define FLD(f) abuf->fields.fmt_empty.f
2267 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2268 int UNUSED written
= 0;
2269 IADDR UNUSED pc
= abuf
->addr
;
2270 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2278 /* ctc3: ctc3 $rt,$rd */
2281 SEM_FN_NAME (iq2000bf
,ctc3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2283 #define FLD(f) abuf->fields.fmt_empty.f
2284 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2285 int UNUSED written
= 0;
2286 IADDR UNUSED pc
= abuf
->addr
;
2287 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2298 SEM_FN_NAME (iq2000bf
,jcr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2300 #define FLD(f) abuf->fields.fmt_empty.f
2301 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2302 int UNUSED written
= 0;
2303 IADDR UNUSED pc
= abuf
->addr
;
2305 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2309 SEM_BRANCH_FINI (vpc
);
2314 /* luc32: luc32 $rt,$rd */
2317 SEM_FN_NAME (iq2000bf
,luc32
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2319 #define FLD(f) abuf->fields.fmt_empty.f
2320 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2321 int UNUSED written
= 0;
2322 IADDR UNUSED pc
= abuf
->addr
;
2323 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2331 /* luc32l: luc32l $rt,$rd */
2334 SEM_FN_NAME (iq2000bf
,luc32l
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2336 #define FLD(f) abuf->fields.fmt_empty.f
2337 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2338 int UNUSED written
= 0;
2339 IADDR UNUSED pc
= abuf
->addr
;
2340 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2348 /* luc64: luc64 $rt,$rd */
2351 SEM_FN_NAME (iq2000bf
,luc64
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2353 #define FLD(f) abuf->fields.fmt_empty.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
, 4);
2365 /* luc64l: luc64l $rt,$rd */
2368 SEM_FN_NAME (iq2000bf
,luc64l
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2370 #define FLD(f) abuf->fields.fmt_empty.f
2371 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2372 int UNUSED written
= 0;
2373 IADDR UNUSED pc
= abuf
->addr
;
2374 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2382 /* luk: luk $rt,$rd */
2385 SEM_FN_NAME (iq2000bf
,luk
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2387 #define FLD(f) abuf->fields.fmt_empty.f
2388 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2389 int UNUSED written
= 0;
2390 IADDR UNUSED pc
= abuf
->addr
;
2391 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2399 /* lulck: lulck $rt */
2402 SEM_FN_NAME (iq2000bf
,lulck
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2404 #define FLD(f) abuf->fields.fmt_empty.f
2405 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2406 int UNUSED written
= 0;
2407 IADDR UNUSED pc
= abuf
->addr
;
2408 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2416 /* lum32: lum32 $rt,$rd */
2419 SEM_FN_NAME (iq2000bf
,lum32
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2421 #define FLD(f) abuf->fields.fmt_empty.f
2422 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2423 int UNUSED written
= 0;
2424 IADDR UNUSED pc
= abuf
->addr
;
2425 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2433 /* lum32l: lum32l $rt,$rd */
2436 SEM_FN_NAME (iq2000bf
,lum32l
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2438 #define FLD(f) abuf->fields.fmt_empty.f
2439 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2440 int UNUSED written
= 0;
2441 IADDR UNUSED pc
= abuf
->addr
;
2442 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2450 /* lum64: lum64 $rt,$rd */
2453 SEM_FN_NAME (iq2000bf
,lum64
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2455 #define FLD(f) abuf->fields.fmt_empty.f
2456 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2457 int UNUSED written
= 0;
2458 IADDR UNUSED pc
= abuf
->addr
;
2459 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2467 /* lum64l: lum64l $rt,$rd */
2470 SEM_FN_NAME (iq2000bf
,lum64l
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2472 #define FLD(f) abuf->fields.fmt_empty.f
2473 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2474 int UNUSED written
= 0;
2475 IADDR UNUSED pc
= abuf
->addr
;
2476 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2484 /* lur: lur $rt,$rd */
2487 SEM_FN_NAME (iq2000bf
,lur
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2489 #define FLD(f) abuf->fields.fmt_empty.f
2490 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2491 int UNUSED written
= 0;
2492 IADDR UNUSED pc
= abuf
->addr
;
2493 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2501 /* lurl: lurl $rt,$rd */
2504 SEM_FN_NAME (iq2000bf
,lurl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2506 #define FLD(f) abuf->fields.fmt_empty.f
2507 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2508 int UNUSED written
= 0;
2509 IADDR UNUSED pc
= abuf
->addr
;
2510 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2518 /* luulck: luulck $rt */
2521 SEM_FN_NAME (iq2000bf
,luulck
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2523 #define FLD(f) abuf->fields.fmt_empty.f
2524 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2525 int UNUSED written
= 0;
2526 IADDR UNUSED pc
= abuf
->addr
;
2527 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2535 /* mfc0: mfc0 $rt,$rd */
2538 SEM_FN_NAME (iq2000bf
,mfc0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2540 #define FLD(f) abuf->fields.fmt_empty.f
2541 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2542 int UNUSED written
= 0;
2543 IADDR UNUSED pc
= abuf
->addr
;
2544 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2552 /* mfc1: mfc1 $rt,$rd */
2555 SEM_FN_NAME (iq2000bf
,mfc1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2557 #define FLD(f) abuf->fields.fmt_empty.f
2558 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2559 int UNUSED written
= 0;
2560 IADDR UNUSED pc
= abuf
->addr
;
2561 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2569 /* mfc2: mfc2 $rt,$rd */
2572 SEM_FN_NAME (iq2000bf
,mfc2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2574 #define FLD(f) abuf->fields.fmt_empty.f
2575 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2576 int UNUSED written
= 0;
2577 IADDR UNUSED pc
= abuf
->addr
;
2578 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2586 /* mfc3: mfc3 $rt,$rd */
2589 SEM_FN_NAME (iq2000bf
,mfc3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2591 #define FLD(f) abuf->fields.fmt_empty.f
2592 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2593 int UNUSED written
= 0;
2594 IADDR UNUSED pc
= abuf
->addr
;
2595 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2603 /* mtc0: mtc0 $rt,$rd */
2606 SEM_FN_NAME (iq2000bf
,mtc0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2608 #define FLD(f) abuf->fields.fmt_empty.f
2609 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2610 int UNUSED written
= 0;
2611 IADDR UNUSED pc
= abuf
->addr
;
2612 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2620 /* mtc1: mtc1 $rt,$rd */
2623 SEM_FN_NAME (iq2000bf
,mtc1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2625 #define FLD(f) abuf->fields.fmt_empty.f
2626 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2627 int UNUSED written
= 0;
2628 IADDR UNUSED pc
= abuf
->addr
;
2629 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2637 /* mtc2: mtc2 $rt,$rd */
2640 SEM_FN_NAME (iq2000bf
,mtc2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2642 #define FLD(f) abuf->fields.fmt_empty.f
2643 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2644 int UNUSED written
= 0;
2645 IADDR UNUSED pc
= abuf
->addr
;
2646 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2654 /* mtc3: mtc3 $rt,$rd */
2657 SEM_FN_NAME (iq2000bf
,mtc3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2659 #define FLD(f) abuf->fields.fmt_empty.f
2660 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2661 int UNUSED written
= 0;
2662 IADDR UNUSED pc
= abuf
->addr
;
2663 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2671 /* pkrl: pkrl $rd,$rt */
2674 SEM_FN_NAME (iq2000bf
,pkrl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2676 #define FLD(f) abuf->fields.fmt_empty.f
2677 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2678 int UNUSED written
= 0;
2679 IADDR UNUSED pc
= abuf
->addr
;
2680 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2688 /* pkrlr1: pkrlr1 $rt,$index,$count */
2691 SEM_FN_NAME (iq2000bf
,pkrlr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2693 #define FLD(f) abuf->fields.fmt_empty.f
2694 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2695 int UNUSED written
= 0;
2696 IADDR UNUSED pc
= abuf
->addr
;
2697 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2705 /* pkrlr30: pkrlr30 $rt,$index,$count */
2708 SEM_FN_NAME (iq2000bf
,pkrlr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2710 #define FLD(f) abuf->fields.fmt_empty.f
2711 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2712 int UNUSED written
= 0;
2713 IADDR UNUSED pc
= abuf
->addr
;
2714 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2722 /* rb: rb $rd,$rt */
2725 SEM_FN_NAME (iq2000bf
,rb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2727 #define FLD(f) abuf->fields.fmt_empty.f
2728 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2729 int UNUSED written
= 0;
2730 IADDR UNUSED pc
= abuf
->addr
;
2731 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2739 /* rbr1: rbr1 $rt,$index,$count */
2742 SEM_FN_NAME (iq2000bf
,rbr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2744 #define FLD(f) abuf->fields.fmt_empty.f
2745 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2746 int UNUSED written
= 0;
2747 IADDR UNUSED pc
= abuf
->addr
;
2748 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2756 /* rbr30: rbr30 $rt,$index,$count */
2759 SEM_FN_NAME (iq2000bf
,rbr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2761 #define FLD(f) abuf->fields.fmt_empty.f
2762 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2763 int UNUSED written
= 0;
2764 IADDR UNUSED pc
= abuf
->addr
;
2765 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2776 SEM_FN_NAME (iq2000bf
,rfe
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2778 #define FLD(f) abuf->fields.fmt_empty.f
2779 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2780 int UNUSED written
= 0;
2781 IADDR UNUSED pc
= abuf
->addr
;
2782 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2790 /* rx: rx $rd,$rt */
2793 SEM_FN_NAME (iq2000bf
,rx
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2795 #define FLD(f) abuf->fields.fmt_empty.f
2796 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2797 int UNUSED written
= 0;
2798 IADDR UNUSED pc
= abuf
->addr
;
2799 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2807 /* rxr1: rxr1 $rt,$index,$count */
2810 SEM_FN_NAME (iq2000bf
,rxr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2812 #define FLD(f) abuf->fields.fmt_empty.f
2813 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2814 int UNUSED written
= 0;
2815 IADDR UNUSED pc
= abuf
->addr
;
2816 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2824 /* rxr30: rxr30 $rt,$index,$count */
2827 SEM_FN_NAME (iq2000bf
,rxr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2829 #define FLD(f) abuf->fields.fmt_empty.f
2830 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2831 int UNUSED written
= 0;
2832 IADDR UNUSED pc
= abuf
->addr
;
2833 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2844 SEM_FN_NAME (iq2000bf
,sleep
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2846 #define FLD(f) abuf->fields.fmt_empty.f
2847 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2848 int UNUSED written
= 0;
2849 IADDR UNUSED pc
= abuf
->addr
;
2850 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2858 /* srrd: srrd $rt */
2861 SEM_FN_NAME (iq2000bf
,srrd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2863 #define FLD(f) abuf->fields.fmt_empty.f
2864 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2865 int UNUSED written
= 0;
2866 IADDR UNUSED pc
= abuf
->addr
;
2867 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2875 /* srrdl: srrdl $rt */
2878 SEM_FN_NAME (iq2000bf
,srrdl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2880 #define FLD(f) abuf->fields.fmt_empty.f
2881 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2882 int UNUSED written
= 0;
2883 IADDR UNUSED pc
= abuf
->addr
;
2884 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2892 /* srulck: srulck $rt */
2895 SEM_FN_NAME (iq2000bf
,srulck
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2897 #define FLD(f) abuf->fields.fmt_empty.f
2898 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2899 int UNUSED written
= 0;
2900 IADDR UNUSED pc
= abuf
->addr
;
2901 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2909 /* srwr: srwr $rt,$rd */
2912 SEM_FN_NAME (iq2000bf
,srwr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2914 #define FLD(f) abuf->fields.fmt_empty.f
2915 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2916 int UNUSED written
= 0;
2917 IADDR UNUSED pc
= abuf
->addr
;
2918 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2926 /* srwru: srwru $rt,$rd */
2929 SEM_FN_NAME (iq2000bf
,srwru
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2931 #define FLD(f) abuf->fields.fmt_empty.f
2932 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2933 int UNUSED written
= 0;
2934 IADDR UNUSED pc
= abuf
->addr
;
2935 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2943 /* trapqfl: trapqfl */
2946 SEM_FN_NAME (iq2000bf
,trapqfl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2948 #define FLD(f) abuf->fields.fmt_empty.f
2949 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2950 int UNUSED written
= 0;
2951 IADDR UNUSED pc
= abuf
->addr
;
2952 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2960 /* trapqne: trapqne */
2963 SEM_FN_NAME (iq2000bf
,trapqne
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2965 #define FLD(f) abuf->fields.fmt_empty.f
2966 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2967 int UNUSED written
= 0;
2968 IADDR UNUSED pc
= abuf
->addr
;
2969 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2977 /* traprel: traprel $rt */
2980 SEM_FN_NAME (iq2000bf
,traprel
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2982 #define FLD(f) abuf->fields.fmt_empty.f
2983 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2984 int UNUSED written
= 0;
2985 IADDR UNUSED pc
= abuf
->addr
;
2986 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2994 /* wb: wb $rd,$rt */
2997 SEM_FN_NAME (iq2000bf
,wb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2999 #define FLD(f) abuf->fields.fmt_empty.f
3000 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3001 int UNUSED written
= 0;
3002 IADDR UNUSED pc
= abuf
->addr
;
3003 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3011 /* wbu: wbu $rd,$rt */
3014 SEM_FN_NAME (iq2000bf
,wbu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3016 #define FLD(f) abuf->fields.fmt_empty.f
3017 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3018 int UNUSED written
= 0;
3019 IADDR UNUSED pc
= abuf
->addr
;
3020 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3028 /* wbr1: wbr1 $rt,$index,$count */
3031 SEM_FN_NAME (iq2000bf
,wbr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3033 #define FLD(f) abuf->fields.fmt_empty.f
3034 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3035 int UNUSED written
= 0;
3036 IADDR UNUSED pc
= abuf
->addr
;
3037 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3045 /* wbr1u: wbr1u $rt,$index,$count */
3048 SEM_FN_NAME (iq2000bf
,wbr1u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3050 #define FLD(f) abuf->fields.fmt_empty.f
3051 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3052 int UNUSED written
= 0;
3053 IADDR UNUSED pc
= abuf
->addr
;
3054 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3062 /* wbr30: wbr30 $rt,$index,$count */
3065 SEM_FN_NAME (iq2000bf
,wbr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3067 #define FLD(f) abuf->fields.fmt_empty.f
3068 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3069 int UNUSED written
= 0;
3070 IADDR UNUSED pc
= abuf
->addr
;
3071 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3079 /* wbr30u: wbr30u $rt,$index,$count */
3082 SEM_FN_NAME (iq2000bf
,wbr30u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3084 #define FLD(f) abuf->fields.fmt_empty.f
3085 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3086 int UNUSED written
= 0;
3087 IADDR UNUSED pc
= abuf
->addr
;
3088 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3096 /* wx: wx $rd,$rt */
3099 SEM_FN_NAME (iq2000bf
,wx
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3101 #define FLD(f) abuf->fields.fmt_empty.f
3102 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3103 int UNUSED written
= 0;
3104 IADDR UNUSED pc
= abuf
->addr
;
3105 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3113 /* wxu: wxu $rd,$rt */
3116 SEM_FN_NAME (iq2000bf
,wxu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3118 #define FLD(f) abuf->fields.fmt_empty.f
3119 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3120 int UNUSED written
= 0;
3121 IADDR UNUSED pc
= abuf
->addr
;
3122 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3130 /* wxr1: wxr1 $rt,$index,$count */
3133 SEM_FN_NAME (iq2000bf
,wxr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3135 #define FLD(f) abuf->fields.fmt_empty.f
3136 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3137 int UNUSED written
= 0;
3138 IADDR UNUSED pc
= abuf
->addr
;
3139 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3147 /* wxr1u: wxr1u $rt,$index,$count */
3150 SEM_FN_NAME (iq2000bf
,wxr1u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3152 #define FLD(f) abuf->fields.fmt_empty.f
3153 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3154 int UNUSED written
= 0;
3155 IADDR UNUSED pc
= abuf
->addr
;
3156 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3164 /* wxr30: wxr30 $rt,$index,$count */
3167 SEM_FN_NAME (iq2000bf
,wxr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3169 #define FLD(f) abuf->fields.fmt_empty.f
3170 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3171 int UNUSED written
= 0;
3172 IADDR UNUSED pc
= abuf
->addr
;
3173 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3181 /* wxr30u: wxr30u $rt,$index,$count */
3184 SEM_FN_NAME (iq2000bf
,wxr30u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3186 #define FLD(f) abuf->fields.fmt_empty.f
3187 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3188 int UNUSED written
= 0;
3189 IADDR UNUSED pc
= abuf
->addr
;
3190 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3198 /* ldw: ldw $rt,$lo16($base) */
3201 SEM_FN_NAME (iq2000bf
,ldw
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3203 #define FLD(f) abuf->fields.sfmt_addi.f
3204 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3205 int UNUSED written
= 0;
3206 IADDR UNUSED pc
= abuf
->addr
;
3207 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3211 tmp_addr
= ANDSI (ADDSI (GET_H_GR (FLD (f_rs
)), FLD (f_imm
)), INVSI (3));
3213 SI opval
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3214 SET_H_GR (ADDSI (FLD (f_rt
), 1), opval
);
3215 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3218 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (tmp_addr
, 4));
3219 SET_H_GR (FLD (f_rt
), opval
);
3220 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3228 /* sdw: sdw $rt,$lo16($base) */
3231 SEM_FN_NAME (iq2000bf
,sdw
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3233 #define FLD(f) abuf->fields.sfmt_addi.f
3234 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3235 int UNUSED written
= 0;
3236 IADDR UNUSED pc
= abuf
->addr
;
3237 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3241 tmp_addr
= ANDSI (ADDSI (GET_H_GR (FLD (f_rs
)), FLD (f_imm
)), INVSI (3));
3243 SI opval
= GET_H_GR (FLD (f_rt
));
3244 SETMEMSI (current_cpu
, pc
, ADDSI (tmp_addr
, 4), opval
);
3245 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3248 SI opval
= GET_H_GR (ADDSI (FLD (f_rt
), 1));
3249 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
3250 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3261 SEM_FN_NAME (iq2000bf
,j
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3263 #define FLD(f) abuf->fields.sfmt_j.f
3264 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3265 int UNUSED written
= 0;
3266 IADDR UNUSED pc
= abuf
->addr
;
3268 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3272 USI opval
= FLD (i_jmptarg
);
3273 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3274 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3278 SEM_BRANCH_FINI (vpc
);
3283 /* jal: jal $jmptarg */
3286 SEM_FN_NAME (iq2000bf
,jal
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3288 #define FLD(f) abuf->fields.sfmt_j.f
3289 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3290 int UNUSED written
= 0;
3291 IADDR UNUSED pc
= abuf
->addr
;
3293 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3298 SI opval
= ADDSI (pc
, 8);
3299 SET_H_GR (((UINT
) 31), opval
);
3300 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3303 USI opval
= FLD (i_jmptarg
);
3304 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3305 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3310 SEM_BRANCH_FINI (vpc
);
3315 /* bmb: bmb $rs,$rt,$offset */
3318 SEM_FN_NAME (iq2000bf
,bmb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3320 #define FLD(f) abuf->fields.sfmt_bbi.f
3321 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3322 int UNUSED written
= 0;
3323 IADDR UNUSED pc
= abuf
->addr
;
3325 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3330 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 255), ANDSI (GET_H_GR (FLD (f_rt
)), 255))) {
3333 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 65280), ANDSI (GET_H_GR (FLD (f_rt
)), 65280))) {
3336 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 16711680), ANDSI (GET_H_GR (FLD (f_rt
)), 16711680))) {
3339 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000), ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000))) {
3345 USI opval
= FLD (i_offset
);
3346 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3347 written
|= (1 << 3);
3348 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3354 abuf
->written
= written
;
3355 SEM_BRANCH_FINI (vpc
);
3360 /* Table of all semantic fns. */
3362 static const struct sem_fn_desc sem_fns
[] = {
3363 { IQ2000BF_INSN_X_INVALID
, SEM_FN_NAME (iq2000bf
,x_invalid
) },
3364 { IQ2000BF_INSN_X_AFTER
, SEM_FN_NAME (iq2000bf
,x_after
) },
3365 { IQ2000BF_INSN_X_BEFORE
, SEM_FN_NAME (iq2000bf
,x_before
) },
3366 { IQ2000BF_INSN_X_CTI_CHAIN
, SEM_FN_NAME (iq2000bf
,x_cti_chain
) },
3367 { IQ2000BF_INSN_X_CHAIN
, SEM_FN_NAME (iq2000bf
,x_chain
) },
3368 { IQ2000BF_INSN_X_BEGIN
, SEM_FN_NAME (iq2000bf
,x_begin
) },
3369 { IQ2000BF_INSN_ADD
, SEM_FN_NAME (iq2000bf
,add
) },
3370 { IQ2000BF_INSN_ADDI
, SEM_FN_NAME (iq2000bf
,addi
) },
3371 { IQ2000BF_INSN_ADDIU
, SEM_FN_NAME (iq2000bf
,addiu
) },
3372 { IQ2000BF_INSN_ADDU
, SEM_FN_NAME (iq2000bf
,addu
) },
3373 { IQ2000BF_INSN_ADO16
, SEM_FN_NAME (iq2000bf
,ado16
) },
3374 { IQ2000BF_INSN_AND
, SEM_FN_NAME (iq2000bf
,and) },
3375 { IQ2000BF_INSN_ANDI
, SEM_FN_NAME (iq2000bf
,andi
) },
3376 { IQ2000BF_INSN_ANDOI
, SEM_FN_NAME (iq2000bf
,andoi
) },
3377 { IQ2000BF_INSN_NOR
, SEM_FN_NAME (iq2000bf
,nor
) },
3378 { IQ2000BF_INSN_OR
, SEM_FN_NAME (iq2000bf
,or) },
3379 { IQ2000BF_INSN_ORI
, SEM_FN_NAME (iq2000bf
,ori
) },
3380 { IQ2000BF_INSN_RAM
, SEM_FN_NAME (iq2000bf
,ram
) },
3381 { IQ2000BF_INSN_SLL
, SEM_FN_NAME (iq2000bf
,sll
) },
3382 { IQ2000BF_INSN_SLLV
, SEM_FN_NAME (iq2000bf
,sllv
) },
3383 { IQ2000BF_INSN_SLMV
, SEM_FN_NAME (iq2000bf
,slmv
) },
3384 { IQ2000BF_INSN_SLT
, SEM_FN_NAME (iq2000bf
,slt
) },
3385 { IQ2000BF_INSN_SLTI
, SEM_FN_NAME (iq2000bf
,slti
) },
3386 { IQ2000BF_INSN_SLTIU
, SEM_FN_NAME (iq2000bf
,sltiu
) },
3387 { IQ2000BF_INSN_SLTU
, SEM_FN_NAME (iq2000bf
,sltu
) },
3388 { IQ2000BF_INSN_SRA
, SEM_FN_NAME (iq2000bf
,sra
) },
3389 { IQ2000BF_INSN_SRAV
, SEM_FN_NAME (iq2000bf
,srav
) },
3390 { IQ2000BF_INSN_SRL
, SEM_FN_NAME (iq2000bf
,srl
) },
3391 { IQ2000BF_INSN_SRLV
, SEM_FN_NAME (iq2000bf
,srlv
) },
3392 { IQ2000BF_INSN_SRMV
, SEM_FN_NAME (iq2000bf
,srmv
) },
3393 { IQ2000BF_INSN_SUB
, SEM_FN_NAME (iq2000bf
,sub
) },
3394 { IQ2000BF_INSN_SUBU
, SEM_FN_NAME (iq2000bf
,subu
) },
3395 { IQ2000BF_INSN_XOR
, SEM_FN_NAME (iq2000bf
,xor) },
3396 { IQ2000BF_INSN_XORI
, SEM_FN_NAME (iq2000bf
,xori
) },
3397 { IQ2000BF_INSN_BBI
, SEM_FN_NAME (iq2000bf
,bbi
) },
3398 { IQ2000BF_INSN_BBIN
, SEM_FN_NAME (iq2000bf
,bbin
) },
3399 { IQ2000BF_INSN_BBV
, SEM_FN_NAME (iq2000bf
,bbv
) },
3400 { IQ2000BF_INSN_BBVN
, SEM_FN_NAME (iq2000bf
,bbvn
) },
3401 { IQ2000BF_INSN_BEQ
, SEM_FN_NAME (iq2000bf
,beq
) },
3402 { IQ2000BF_INSN_BEQL
, SEM_FN_NAME (iq2000bf
,beql
) },
3403 { IQ2000BF_INSN_BGEZ
, SEM_FN_NAME (iq2000bf
,bgez
) },
3404 { IQ2000BF_INSN_BGEZAL
, SEM_FN_NAME (iq2000bf
,bgezal
) },
3405 { IQ2000BF_INSN_BGEZALL
, SEM_FN_NAME (iq2000bf
,bgezall
) },
3406 { IQ2000BF_INSN_BGEZL
, SEM_FN_NAME (iq2000bf
,bgezl
) },
3407 { IQ2000BF_INSN_BLTZ
, SEM_FN_NAME (iq2000bf
,bltz
) },
3408 { IQ2000BF_INSN_BLTZL
, SEM_FN_NAME (iq2000bf
,bltzl
) },
3409 { IQ2000BF_INSN_BLTZAL
, SEM_FN_NAME (iq2000bf
,bltzal
) },
3410 { IQ2000BF_INSN_BLTZALL
, SEM_FN_NAME (iq2000bf
,bltzall
) },
3411 { IQ2000BF_INSN_BMB0
, SEM_FN_NAME (iq2000bf
,bmb0
) },
3412 { IQ2000BF_INSN_BMB1
, SEM_FN_NAME (iq2000bf
,bmb1
) },
3413 { IQ2000BF_INSN_BMB2
, SEM_FN_NAME (iq2000bf
,bmb2
) },
3414 { IQ2000BF_INSN_BMB3
, SEM_FN_NAME (iq2000bf
,bmb3
) },
3415 { IQ2000BF_INSN_BNE
, SEM_FN_NAME (iq2000bf
,bne
) },
3416 { IQ2000BF_INSN_BNEL
, SEM_FN_NAME (iq2000bf
,bnel
) },
3417 { IQ2000BF_INSN_JALR
, SEM_FN_NAME (iq2000bf
,jalr
) },
3418 { IQ2000BF_INSN_JR
, SEM_FN_NAME (iq2000bf
,jr
) },
3419 { IQ2000BF_INSN_LB
, SEM_FN_NAME (iq2000bf
,lb
) },
3420 { IQ2000BF_INSN_LBU
, SEM_FN_NAME (iq2000bf
,lbu
) },
3421 { IQ2000BF_INSN_LH
, SEM_FN_NAME (iq2000bf
,lh
) },
3422 { IQ2000BF_INSN_LHU
, SEM_FN_NAME (iq2000bf
,lhu
) },
3423 { IQ2000BF_INSN_LUI
, SEM_FN_NAME (iq2000bf
,lui
) },
3424 { IQ2000BF_INSN_LW
, SEM_FN_NAME (iq2000bf
,lw
) },
3425 { IQ2000BF_INSN_SB
, SEM_FN_NAME (iq2000bf
,sb
) },
3426 { IQ2000BF_INSN_SH
, SEM_FN_NAME (iq2000bf
,sh
) },
3427 { IQ2000BF_INSN_SW
, SEM_FN_NAME (iq2000bf
,sw
) },
3428 { IQ2000BF_INSN_BREAK
, SEM_FN_NAME (iq2000bf
,break) },
3429 { IQ2000BF_INSN_SYSCALL
, SEM_FN_NAME (iq2000bf
,syscall
) },
3430 { IQ2000BF_INSN_ANDOUI
, SEM_FN_NAME (iq2000bf
,andoui
) },
3431 { IQ2000BF_INSN_ORUI
, SEM_FN_NAME (iq2000bf
,orui
) },
3432 { IQ2000BF_INSN_BGTZ
, SEM_FN_NAME (iq2000bf
,bgtz
) },
3433 { IQ2000BF_INSN_BGTZL
, SEM_FN_NAME (iq2000bf
,bgtzl
) },
3434 { IQ2000BF_INSN_BLEZ
, SEM_FN_NAME (iq2000bf
,blez
) },
3435 { IQ2000BF_INSN_BLEZL
, SEM_FN_NAME (iq2000bf
,blezl
) },
3436 { IQ2000BF_INSN_MRGB
, SEM_FN_NAME (iq2000bf
,mrgb
) },
3437 { IQ2000BF_INSN_BCTXT
, SEM_FN_NAME (iq2000bf
,bctxt
) },
3438 { IQ2000BF_INSN_BC0F
, SEM_FN_NAME (iq2000bf
,bc0f
) },
3439 { IQ2000BF_INSN_BC0FL
, SEM_FN_NAME (iq2000bf
,bc0fl
) },
3440 { IQ2000BF_INSN_BC3F
, SEM_FN_NAME (iq2000bf
,bc3f
) },
3441 { IQ2000BF_INSN_BC3FL
, SEM_FN_NAME (iq2000bf
,bc3fl
) },
3442 { IQ2000BF_INSN_BC0T
, SEM_FN_NAME (iq2000bf
,bc0t
) },
3443 { IQ2000BF_INSN_BC0TL
, SEM_FN_NAME (iq2000bf
,bc0tl
) },
3444 { IQ2000BF_INSN_BC3T
, SEM_FN_NAME (iq2000bf
,bc3t
) },
3445 { IQ2000BF_INSN_BC3TL
, SEM_FN_NAME (iq2000bf
,bc3tl
) },
3446 { IQ2000BF_INSN_CFC0
, SEM_FN_NAME (iq2000bf
,cfc0
) },
3447 { IQ2000BF_INSN_CFC1
, SEM_FN_NAME (iq2000bf
,cfc1
) },
3448 { IQ2000BF_INSN_CFC2
, SEM_FN_NAME (iq2000bf
,cfc2
) },
3449 { IQ2000BF_INSN_CFC3
, SEM_FN_NAME (iq2000bf
,cfc3
) },
3450 { IQ2000BF_INSN_CHKHDR
, SEM_FN_NAME (iq2000bf
,chkhdr
) },
3451 { IQ2000BF_INSN_CTC0
, SEM_FN_NAME (iq2000bf
,ctc0
) },
3452 { IQ2000BF_INSN_CTC1
, SEM_FN_NAME (iq2000bf
,ctc1
) },
3453 { IQ2000BF_INSN_CTC2
, SEM_FN_NAME (iq2000bf
,ctc2
) },
3454 { IQ2000BF_INSN_CTC3
, SEM_FN_NAME (iq2000bf
,ctc3
) },
3455 { IQ2000BF_INSN_JCR
, SEM_FN_NAME (iq2000bf
,jcr
) },
3456 { IQ2000BF_INSN_LUC32
, SEM_FN_NAME (iq2000bf
,luc32
) },
3457 { IQ2000BF_INSN_LUC32L
, SEM_FN_NAME (iq2000bf
,luc32l
) },
3458 { IQ2000BF_INSN_LUC64
, SEM_FN_NAME (iq2000bf
,luc64
) },
3459 { IQ2000BF_INSN_LUC64L
, SEM_FN_NAME (iq2000bf
,luc64l
) },
3460 { IQ2000BF_INSN_LUK
, SEM_FN_NAME (iq2000bf
,luk
) },
3461 { IQ2000BF_INSN_LULCK
, SEM_FN_NAME (iq2000bf
,lulck
) },
3462 { IQ2000BF_INSN_LUM32
, SEM_FN_NAME (iq2000bf
,lum32
) },
3463 { IQ2000BF_INSN_LUM32L
, SEM_FN_NAME (iq2000bf
,lum32l
) },
3464 { IQ2000BF_INSN_LUM64
, SEM_FN_NAME (iq2000bf
,lum64
) },
3465 { IQ2000BF_INSN_LUM64L
, SEM_FN_NAME (iq2000bf
,lum64l
) },
3466 { IQ2000BF_INSN_LUR
, SEM_FN_NAME (iq2000bf
,lur
) },
3467 { IQ2000BF_INSN_LURL
, SEM_FN_NAME (iq2000bf
,lurl
) },
3468 { IQ2000BF_INSN_LUULCK
, SEM_FN_NAME (iq2000bf
,luulck
) },
3469 { IQ2000BF_INSN_MFC0
, SEM_FN_NAME (iq2000bf
,mfc0
) },
3470 { IQ2000BF_INSN_MFC1
, SEM_FN_NAME (iq2000bf
,mfc1
) },
3471 { IQ2000BF_INSN_MFC2
, SEM_FN_NAME (iq2000bf
,mfc2
) },
3472 { IQ2000BF_INSN_MFC3
, SEM_FN_NAME (iq2000bf
,mfc3
) },
3473 { IQ2000BF_INSN_MTC0
, SEM_FN_NAME (iq2000bf
,mtc0
) },
3474 { IQ2000BF_INSN_MTC1
, SEM_FN_NAME (iq2000bf
,mtc1
) },
3475 { IQ2000BF_INSN_MTC2
, SEM_FN_NAME (iq2000bf
,mtc2
) },
3476 { IQ2000BF_INSN_MTC3
, SEM_FN_NAME (iq2000bf
,mtc3
) },
3477 { IQ2000BF_INSN_PKRL
, SEM_FN_NAME (iq2000bf
,pkrl
) },
3478 { IQ2000BF_INSN_PKRLR1
, SEM_FN_NAME (iq2000bf
,pkrlr1
) },
3479 { IQ2000BF_INSN_PKRLR30
, SEM_FN_NAME (iq2000bf
,pkrlr30
) },
3480 { IQ2000BF_INSN_RB
, SEM_FN_NAME (iq2000bf
,rb
) },
3481 { IQ2000BF_INSN_RBR1
, SEM_FN_NAME (iq2000bf
,rbr1
) },
3482 { IQ2000BF_INSN_RBR30
, SEM_FN_NAME (iq2000bf
,rbr30
) },
3483 { IQ2000BF_INSN_RFE
, SEM_FN_NAME (iq2000bf
,rfe
) },
3484 { IQ2000BF_INSN_RX
, SEM_FN_NAME (iq2000bf
,rx
) },
3485 { IQ2000BF_INSN_RXR1
, SEM_FN_NAME (iq2000bf
,rxr1
) },
3486 { IQ2000BF_INSN_RXR30
, SEM_FN_NAME (iq2000bf
,rxr30
) },
3487 { IQ2000BF_INSN_SLEEP
, SEM_FN_NAME (iq2000bf
,sleep
) },
3488 { IQ2000BF_INSN_SRRD
, SEM_FN_NAME (iq2000bf
,srrd
) },
3489 { IQ2000BF_INSN_SRRDL
, SEM_FN_NAME (iq2000bf
,srrdl
) },
3490 { IQ2000BF_INSN_SRULCK
, SEM_FN_NAME (iq2000bf
,srulck
) },
3491 { IQ2000BF_INSN_SRWR
, SEM_FN_NAME (iq2000bf
,srwr
) },
3492 { IQ2000BF_INSN_SRWRU
, SEM_FN_NAME (iq2000bf
,srwru
) },
3493 { IQ2000BF_INSN_TRAPQFL
, SEM_FN_NAME (iq2000bf
,trapqfl
) },
3494 { IQ2000BF_INSN_TRAPQNE
, SEM_FN_NAME (iq2000bf
,trapqne
) },
3495 { IQ2000BF_INSN_TRAPREL
, SEM_FN_NAME (iq2000bf
,traprel
) },
3496 { IQ2000BF_INSN_WB
, SEM_FN_NAME (iq2000bf
,wb
) },
3497 { IQ2000BF_INSN_WBU
, SEM_FN_NAME (iq2000bf
,wbu
) },
3498 { IQ2000BF_INSN_WBR1
, SEM_FN_NAME (iq2000bf
,wbr1
) },
3499 { IQ2000BF_INSN_WBR1U
, SEM_FN_NAME (iq2000bf
,wbr1u
) },
3500 { IQ2000BF_INSN_WBR30
, SEM_FN_NAME (iq2000bf
,wbr30
) },
3501 { IQ2000BF_INSN_WBR30U
, SEM_FN_NAME (iq2000bf
,wbr30u
) },
3502 { IQ2000BF_INSN_WX
, SEM_FN_NAME (iq2000bf
,wx
) },
3503 { IQ2000BF_INSN_WXU
, SEM_FN_NAME (iq2000bf
,wxu
) },
3504 { IQ2000BF_INSN_WXR1
, SEM_FN_NAME (iq2000bf
,wxr1
) },
3505 { IQ2000BF_INSN_WXR1U
, SEM_FN_NAME (iq2000bf
,wxr1u
) },
3506 { IQ2000BF_INSN_WXR30
, SEM_FN_NAME (iq2000bf
,wxr30
) },
3507 { IQ2000BF_INSN_WXR30U
, SEM_FN_NAME (iq2000bf
,wxr30u
) },
3508 { IQ2000BF_INSN_LDW
, SEM_FN_NAME (iq2000bf
,ldw
) },
3509 { IQ2000BF_INSN_SDW
, SEM_FN_NAME (iq2000bf
,sdw
) },
3510 { IQ2000BF_INSN_J
, SEM_FN_NAME (iq2000bf
,j
) },
3511 { IQ2000BF_INSN_JAL
, SEM_FN_NAME (iq2000bf
,jal
) },
3512 { IQ2000BF_INSN_BMB
, SEM_FN_NAME (iq2000bf
,bmb
) },
3516 /* Add the semantic fns to IDESC_TABLE. */
3519 SEM_FN_NAME (iq2000bf
,init_idesc_table
) (SIM_CPU
*current_cpu
)
3521 IDESC
*idesc_table
= CPU_IDESC (current_cpu
);
3522 const struct sem_fn_desc
*sf
;
3523 int mach_num
= MACH_NUM (CPU_MACH (current_cpu
));
3525 for (sf
= &sem_fns
[0]; sf
->fn
!= 0; ++sf
)
3527 const CGEN_INSN
*insn
= idesc_table
[sf
->index
].idata
;
3528 int valid_p
= (CGEN_INSN_VIRTUAL_P (insn
)
3529 || CGEN_INSN_MACH_HAS_P (insn
, mach_num
));
3532 idesc_table
[sf
->index
].sem_fast
= sf
->fn
;
3534 idesc_table
[sf
->index
].sem_fast
= SEM_FN_NAME (iq2000bf
,x_invalid
);
3537 idesc_table
[sf
->index
].sem_full
= sf
->fn
;
3539 idesc_table
[sf
->index
].sem_full
= SEM_FN_NAME (iq2000bf
,x_invalid
);