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 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 iq2000bf
26 #define WANT_CPU_IQ2000BF
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 (iq2000bf
,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
, 4);
70 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
77 /* x-after: --after-- */
80 SEM_FN_NAME (iq2000bf
,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_IQ2000BF
90 iq2000bf_pbb_after (current_cpu
, sem_arg
);
98 /* x-before: --before-- */
101 SEM_FN_NAME (iq2000bf
,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_IQ2000BF
111 iq2000bf_pbb_before (current_cpu
, sem_arg
);
119 /* x-cti-chain: --cti-chain-- */
122 SEM_FN_NAME (iq2000bf
,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_IQ2000BF
133 vpc
= iq2000bf_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
= iq2000bf_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 (iq2000bf
,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_IQ2000BF
162 vpc
= iq2000bf_pbb_chain (current_cpu
, sem_arg
);
173 /* x-begin: --begin-- */
176 SEM_FN_NAME (iq2000bf
,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_IQ2000BF
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
= iq2000bf_pbb_begin (current_cpu
, FAST_P
);
191 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
192 vpc
= iq2000bf_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
194 vpc
= iq2000bf_pbb_begin (current_cpu
, 0);
204 /* add: add $rd,$rs,$rt */
207 SEM_FN_NAME (iq2000bf
,add
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
209 #define FLD(f) abuf->fields.sfmt_mrgb.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
, 4);
216 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
217 SET_H_GR (FLD (f_rd
), opval
);
218 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
225 /* addi: addi $rt,$rs,$lo16 */
228 SEM_FN_NAME (iq2000bf
,addi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
230 #define FLD(f) abuf->fields.sfmt_addi.f
231 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
232 int UNUSED written
= 0;
233 IADDR UNUSED pc
= abuf
->addr
;
234 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
237 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))));
238 SET_H_GR (FLD (f_rt
), opval
);
239 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
246 /* addiu: addiu $rt,$rs,$lo16 */
249 SEM_FN_NAME (iq2000bf
,addiu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
251 #define FLD(f) abuf->fields.sfmt_addi.f
252 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
253 int UNUSED written
= 0;
254 IADDR UNUSED pc
= abuf
->addr
;
255 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
258 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))));
259 SET_H_GR (FLD (f_rt
), opval
);
260 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
267 /* addu: addu $rd,$rs,$rt */
270 SEM_FN_NAME (iq2000bf
,addu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
272 #define FLD(f) abuf->fields.sfmt_mrgb.f
273 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
274 int UNUSED written
= 0;
275 IADDR UNUSED pc
= abuf
->addr
;
276 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
279 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
280 SET_H_GR (FLD (f_rd
), opval
);
281 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
288 /* ado16: ado16 $rd,$rs,$rt */
291 SEM_FN_NAME (iq2000bf
,ado16
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
293 #define FLD(f) abuf->fields.sfmt_mrgb.f
294 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
295 int UNUSED written
= 0;
296 IADDR UNUSED pc
= abuf
->addr
;
297 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
302 tmp_low
= ADDHI (ANDHI (GET_H_GR (FLD (f_rs
)), 65535), ANDHI (GET_H_GR (FLD (f_rt
)), 65535));
303 tmp_high
= ADDHI (SRLSI (GET_H_GR (FLD (f_rs
)), 16), SRLSI (GET_H_GR (FLD (f_rt
)), 16));
305 SI opval
= ORSI (SLLSI (tmp_high
, 16), tmp_low
);
306 SET_H_GR (FLD (f_rd
), opval
);
307 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
315 /* and: and $rd,$rs,$rt */
318 SEM_FN_NAME (iq2000bf
,and) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
320 #define FLD(f) abuf->fields.sfmt_mrgb.f
321 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
322 int UNUSED written
= 0;
323 IADDR UNUSED pc
= abuf
->addr
;
324 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
327 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
328 SET_H_GR (FLD (f_rd
), opval
);
329 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
336 /* andi: andi $rt,$rs,$lo16 */
339 SEM_FN_NAME (iq2000bf
,andi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
341 #define FLD(f) abuf->fields.sfmt_addi.f
342 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
343 int UNUSED written
= 0;
344 IADDR UNUSED pc
= abuf
->addr
;
345 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
348 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
349 SET_H_GR (FLD (f_rt
), opval
);
350 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
357 /* andoi: andoi $rt,$rs,$lo16 */
360 SEM_FN_NAME (iq2000bf
,andoi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
362 #define FLD(f) abuf->fields.sfmt_addi.f
363 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
364 int UNUSED written
= 0;
365 IADDR UNUSED pc
= abuf
->addr
;
366 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
369 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ORSI (0xffff0000, EXTHISI (TRUNCSIHI (FLD (f_imm
)))));
370 SET_H_GR (FLD (f_rt
), opval
);
371 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
378 /* nor: nor $rd,$rs,$rt */
381 SEM_FN_NAME (iq2000bf
,nor
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
383 #define FLD(f) abuf->fields.sfmt_mrgb.f
384 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
385 int UNUSED written
= 0;
386 IADDR UNUSED pc
= abuf
->addr
;
387 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
390 SI opval
= INVSI (ORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
))));
391 SET_H_GR (FLD (f_rd
), opval
);
392 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
399 /* or: or $rd,$rs,$rt */
402 SEM_FN_NAME (iq2000bf
,or) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
404 #define FLD(f) abuf->fields.sfmt_mrgb.f
405 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
406 int UNUSED written
= 0;
407 IADDR UNUSED pc
= abuf
->addr
;
408 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
411 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
412 SET_H_GR (FLD (f_rd
), opval
);
413 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
420 /* ori: ori $rt,$rs,$lo16 */
423 SEM_FN_NAME (iq2000bf
,ori
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
425 #define FLD(f) abuf->fields.sfmt_addi.f
426 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
427 int UNUSED written
= 0;
428 IADDR UNUSED pc
= abuf
->addr
;
429 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
432 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
433 SET_H_GR (FLD (f_rt
), opval
);
434 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
441 /* ram: ram $rd,$rt,$shamt,$maskl,$maskr */
444 SEM_FN_NAME (iq2000bf
,ram
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
446 #define FLD(f) abuf->fields.sfmt_ram.f
447 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
448 int UNUSED written
= 0;
449 IADDR UNUSED pc
= abuf
->addr
;
450 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
454 SI opval
= RORSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
455 SET_H_GR (FLD (f_rd
), opval
);
456 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
459 SI opval
= ANDSI (GET_H_GR (FLD (f_rd
)), SRLSI (0xffffffff, FLD (f_maskl
)));
460 SET_H_GR (FLD (f_rd
), opval
);
461 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
464 SI opval
= ANDSI (GET_H_GR (FLD (f_rd
)), SLLSI (0xffffffff, FLD (f_rs
)));
465 SET_H_GR (FLD (f_rd
), opval
);
466 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
474 /* sll: sll $rd,$rt,$shamt */
477 SEM_FN_NAME (iq2000bf
,sll
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
479 #define FLD(f) abuf->fields.sfmt_ram.f
480 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
481 int UNUSED written
= 0;
482 IADDR UNUSED pc
= abuf
->addr
;
483 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
486 SI opval
= SLLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
487 SET_H_GR (FLD (f_rd
), opval
);
488 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
495 /* sllv: sllv $rd,$rt,$rs */
498 SEM_FN_NAME (iq2000bf
,sllv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
500 #define FLD(f) abuf->fields.sfmt_mrgb.f
501 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
502 int UNUSED written
= 0;
503 IADDR UNUSED pc
= abuf
->addr
;
504 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
507 SI opval
= SLLSI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
508 SET_H_GR (FLD (f_rd
), opval
);
509 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
516 /* slmv: slmv $rd,$rt,$rs,$shamt */
519 SEM_FN_NAME (iq2000bf
,slmv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
521 #define FLD(f) abuf->fields.sfmt_ram.f
522 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
523 int UNUSED written
= 0;
524 IADDR UNUSED pc
= abuf
->addr
;
525 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
528 SI opval
= ANDSI (SLLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
)), SRLSI (0xffffffff, GET_H_GR (FLD (f_rs
))));
529 SET_H_GR (FLD (f_rd
), opval
);
530 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
537 /* slt: slt $rd,$rs,$rt */
540 SEM_FN_NAME (iq2000bf
,slt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
542 #define FLD(f) abuf->fields.sfmt_mrgb.f
543 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
544 int UNUSED written
= 0;
545 IADDR UNUSED pc
= abuf
->addr
;
546 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
548 if (LTSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
551 SET_H_GR (FLD (f_rd
), opval
);
553 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
558 SET_H_GR (FLD (f_rd
), opval
);
560 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
564 abuf
->written
= written
;
569 /* slti: slti $rt,$rs,$imm */
572 SEM_FN_NAME (iq2000bf
,slti
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
574 #define FLD(f) abuf->fields.sfmt_addi.f
575 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
576 int UNUSED written
= 0;
577 IADDR UNUSED pc
= abuf
->addr
;
578 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
580 if (LTSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))) {
583 SET_H_GR (FLD (f_rt
), opval
);
585 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
590 SET_H_GR (FLD (f_rt
), opval
);
592 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
596 abuf
->written
= written
;
601 /* sltiu: sltiu $rt,$rs,$imm */
604 SEM_FN_NAME (iq2000bf
,sltiu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
606 #define FLD(f) abuf->fields.sfmt_addi.f
607 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
608 int UNUSED written
= 0;
609 IADDR UNUSED pc
= abuf
->addr
;
610 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
612 if (LTUSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))) {
615 SET_H_GR (FLD (f_rt
), opval
);
617 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
622 SET_H_GR (FLD (f_rt
), opval
);
624 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
628 abuf
->written
= written
;
633 /* sltu: sltu $rd,$rs,$rt */
636 SEM_FN_NAME (iq2000bf
,sltu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
638 #define FLD(f) abuf->fields.sfmt_mrgb.f
639 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
640 int UNUSED written
= 0;
641 IADDR UNUSED pc
= abuf
->addr
;
642 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
644 if (LTUSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
647 SET_H_GR (FLD (f_rd
), opval
);
649 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
654 SET_H_GR (FLD (f_rd
), opval
);
656 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
660 abuf
->written
= written
;
665 /* sra: sra $rd,$rt,$shamt */
668 SEM_FN_NAME (iq2000bf
,sra
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
670 #define FLD(f) abuf->fields.sfmt_ram.f
671 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
672 int UNUSED written
= 0;
673 IADDR UNUSED pc
= abuf
->addr
;
674 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
677 SI opval
= SRASI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
678 SET_H_GR (FLD (f_rd
), opval
);
679 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
686 /* srav: srav $rd,$rt,$rs */
689 SEM_FN_NAME (iq2000bf
,srav
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
691 #define FLD(f) abuf->fields.sfmt_mrgb.f
692 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
693 int UNUSED written
= 0;
694 IADDR UNUSED pc
= abuf
->addr
;
695 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
698 SI opval
= SRASI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
699 SET_H_GR (FLD (f_rd
), opval
);
700 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
707 /* srl: srl $rd,$rt,$shamt */
710 SEM_FN_NAME (iq2000bf
,srl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
712 #define FLD(f) abuf->fields.sfmt_ram.f
713 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
714 int UNUSED written
= 0;
715 IADDR UNUSED pc
= abuf
->addr
;
716 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
719 SI opval
= SRLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
720 SET_H_GR (FLD (f_rd
), opval
);
721 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
728 /* srlv: srlv $rd,$rt,$rs */
731 SEM_FN_NAME (iq2000bf
,srlv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
733 #define FLD(f) abuf->fields.sfmt_mrgb.f
734 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
735 int UNUSED written
= 0;
736 IADDR UNUSED pc
= abuf
->addr
;
737 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
740 SI opval
= SRLSI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
741 SET_H_GR (FLD (f_rd
), opval
);
742 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
749 /* srmv: srmv $rd,$rt,$rs,$shamt */
752 SEM_FN_NAME (iq2000bf
,srmv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
754 #define FLD(f) abuf->fields.sfmt_ram.f
755 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
756 int UNUSED written
= 0;
757 IADDR UNUSED pc
= abuf
->addr
;
758 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
761 SI opval
= ANDSI (SRLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
)), SLLSI (0xffffffff, GET_H_GR (FLD (f_rs
))));
762 SET_H_GR (FLD (f_rd
), opval
);
763 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
770 /* sub: sub $rd,$rs,$rt */
773 SEM_FN_NAME (iq2000bf
,sub
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
775 #define FLD(f) abuf->fields.sfmt_mrgb.f
776 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
777 int UNUSED written
= 0;
778 IADDR UNUSED pc
= abuf
->addr
;
779 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
782 SI opval
= SUBSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
783 SET_H_GR (FLD (f_rd
), opval
);
784 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
791 /* subu: subu $rd,$rs,$rt */
794 SEM_FN_NAME (iq2000bf
,subu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
796 #define FLD(f) abuf->fields.sfmt_mrgb.f
797 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
798 int UNUSED written
= 0;
799 IADDR UNUSED pc
= abuf
->addr
;
800 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
803 SI opval
= SUBSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
804 SET_H_GR (FLD (f_rd
), opval
);
805 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
812 /* xor: xor $rd,$rs,$rt */
815 SEM_FN_NAME (iq2000bf
,xor) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
817 #define FLD(f) abuf->fields.sfmt_mrgb.f
818 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
819 int UNUSED written
= 0;
820 IADDR UNUSED pc
= abuf
->addr
;
821 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
824 SI opval
= XORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
825 SET_H_GR (FLD (f_rd
), opval
);
826 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
833 /* xori: xori $rt,$rs,$lo16 */
836 SEM_FN_NAME (iq2000bf
,xori
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
838 #define FLD(f) abuf->fields.sfmt_addi.f
839 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
840 int UNUSED written
= 0;
841 IADDR UNUSED pc
= abuf
->addr
;
842 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
845 SI opval
= XORSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
846 SET_H_GR (FLD (f_rt
), opval
);
847 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
854 /* bbi: bbi $rs($bitnum),$offset */
857 SEM_FN_NAME (iq2000bf
,bbi
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
859 #define FLD(f) abuf->fields.sfmt_bbi.f
860 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
861 int UNUSED written
= 0;
862 IADDR UNUSED pc
= abuf
->addr
;
864 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
866 if (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, FLD (f_rt
)))) {
869 USI opval
= FLD (i_offset
);
870 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
872 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
877 abuf
->written
= written
;
878 SEM_BRANCH_FINI (vpc
);
883 /* bbin: bbin $rs($bitnum),$offset */
886 SEM_FN_NAME (iq2000bf
,bbin
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
888 #define FLD(f) abuf->fields.sfmt_bbi.f
889 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
890 int UNUSED written
= 0;
891 IADDR UNUSED pc
= abuf
->addr
;
893 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
895 if (NOTSI (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, FLD (f_rt
))))) {
898 USI opval
= FLD (i_offset
);
899 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
901 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
906 abuf
->written
= written
;
907 SEM_BRANCH_FINI (vpc
);
912 /* bbv: bbv $rs,$rt,$offset */
915 SEM_FN_NAME (iq2000bf
,bbv
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
917 #define FLD(f) abuf->fields.sfmt_bbi.f
918 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
919 int UNUSED written
= 0;
920 IADDR UNUSED pc
= abuf
->addr
;
922 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
924 if (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, ANDSI (GET_H_GR (FLD (f_rt
)), 31)))) {
927 USI opval
= FLD (i_offset
);
928 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
930 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
935 abuf
->written
= written
;
936 SEM_BRANCH_FINI (vpc
);
941 /* bbvn: bbvn $rs,$rt,$offset */
944 SEM_FN_NAME (iq2000bf
,bbvn
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
946 #define FLD(f) abuf->fields.sfmt_bbi.f
947 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
948 int UNUSED written
= 0;
949 IADDR UNUSED pc
= abuf
->addr
;
951 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
953 if (NOTSI (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, ANDSI (GET_H_GR (FLD (f_rt
)), 31))))) {
956 USI opval
= FLD (i_offset
);
957 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
959 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
964 abuf
->written
= written
;
965 SEM_BRANCH_FINI (vpc
);
970 /* beq: beq $rs,$rt,$offset */
973 SEM_FN_NAME (iq2000bf
,beq
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
975 #define FLD(f) abuf->fields.sfmt_bbi.f
976 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
977 int UNUSED written
= 0;
978 IADDR UNUSED pc
= abuf
->addr
;
980 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
982 if (EQSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
985 USI opval
= FLD (i_offset
);
986 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
988 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
993 abuf
->written
= written
;
994 SEM_BRANCH_FINI (vpc
);
999 /* beql: beql $rs,$rt,$offset */
1002 SEM_FN_NAME (iq2000bf
,beql
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1004 #define FLD(f) abuf->fields.sfmt_bbi.f
1005 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1006 int UNUSED written
= 0;
1007 IADDR UNUSED pc
= abuf
->addr
;
1009 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1011 if (EQSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1014 USI opval
= FLD (i_offset
);
1015 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1016 written
|= (1 << 3);
1017 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1022 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1025 abuf
->written
= written
;
1026 SEM_BRANCH_FINI (vpc
);
1031 /* bgez: bgez $rs,$offset */
1034 SEM_FN_NAME (iq2000bf
,bgez
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1036 #define FLD(f) abuf->fields.sfmt_bbi.f
1037 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1038 int UNUSED written
= 0;
1039 IADDR UNUSED pc
= abuf
->addr
;
1041 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1043 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1046 USI opval
= FLD (i_offset
);
1047 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1048 written
|= (1 << 2);
1049 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1054 abuf
->written
= written
;
1055 SEM_BRANCH_FINI (vpc
);
1060 /* bgezal: bgezal $rs,$offset */
1063 SEM_FN_NAME (iq2000bf
,bgezal
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1065 #define FLD(f) abuf->fields.sfmt_bbi.f
1066 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1067 int UNUSED written
= 0;
1068 IADDR UNUSED pc
= abuf
->addr
;
1070 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1072 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1075 SI opval
= ADDSI (pc
, 8);
1076 SET_H_GR (((UINT
) 31), opval
);
1077 written
|= (1 << 3);
1078 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1082 USI opval
= FLD (i_offset
);
1083 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1084 written
|= (1 << 4);
1085 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1091 abuf
->written
= written
;
1092 SEM_BRANCH_FINI (vpc
);
1097 /* bgezall: bgezall $rs,$offset */
1100 SEM_FN_NAME (iq2000bf
,bgezall
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1102 #define FLD(f) abuf->fields.sfmt_bbi.f
1103 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1104 int UNUSED written
= 0;
1105 IADDR UNUSED pc
= abuf
->addr
;
1107 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1109 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1112 SI opval
= ADDSI (pc
, 8);
1113 SET_H_GR (((UINT
) 31), opval
);
1114 written
|= (1 << 3);
1115 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1119 USI opval
= FLD (i_offset
);
1120 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1121 written
|= (1 << 4);
1122 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1128 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1131 abuf
->written
= written
;
1132 SEM_BRANCH_FINI (vpc
);
1137 /* bgezl: bgezl $rs,$offset */
1140 SEM_FN_NAME (iq2000bf
,bgezl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1142 #define FLD(f) abuf->fields.sfmt_bbi.f
1143 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1144 int UNUSED written
= 0;
1145 IADDR UNUSED pc
= abuf
->addr
;
1147 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1149 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1152 USI opval
= FLD (i_offset
);
1153 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1154 written
|= (1 << 2);
1155 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1160 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1163 abuf
->written
= written
;
1164 SEM_BRANCH_FINI (vpc
);
1169 /* bltz: bltz $rs,$offset */
1172 SEM_FN_NAME (iq2000bf
,bltz
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1174 #define FLD(f) abuf->fields.sfmt_bbi.f
1175 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1176 int UNUSED written
= 0;
1177 IADDR UNUSED pc
= abuf
->addr
;
1179 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1181 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1184 USI opval
= FLD (i_offset
);
1185 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1186 written
|= (1 << 2);
1187 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1192 abuf
->written
= written
;
1193 SEM_BRANCH_FINI (vpc
);
1198 /* bltzl: bltzl $rs,$offset */
1201 SEM_FN_NAME (iq2000bf
,bltzl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1203 #define FLD(f) abuf->fields.sfmt_bbi.f
1204 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1205 int UNUSED written
= 0;
1206 IADDR UNUSED pc
= abuf
->addr
;
1208 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1210 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1213 USI opval
= FLD (i_offset
);
1214 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1215 written
|= (1 << 2);
1216 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1221 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1224 abuf
->written
= written
;
1225 SEM_BRANCH_FINI (vpc
);
1230 /* bltzal: bltzal $rs,$offset */
1233 SEM_FN_NAME (iq2000bf
,bltzal
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1235 #define FLD(f) abuf->fields.sfmt_bbi.f
1236 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1237 int UNUSED written
= 0;
1238 IADDR UNUSED pc
= abuf
->addr
;
1240 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1242 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1245 SI opval
= ADDSI (pc
, 8);
1246 SET_H_GR (((UINT
) 31), opval
);
1247 written
|= (1 << 3);
1248 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1252 USI opval
= FLD (i_offset
);
1253 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1254 written
|= (1 << 4);
1255 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1261 abuf
->written
= written
;
1262 SEM_BRANCH_FINI (vpc
);
1267 /* bltzall: bltzall $rs,$offset */
1270 SEM_FN_NAME (iq2000bf
,bltzall
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1272 #define FLD(f) abuf->fields.sfmt_bbi.f
1273 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1274 int UNUSED written
= 0;
1275 IADDR UNUSED pc
= abuf
->addr
;
1277 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1279 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1282 SI opval
= ADDSI (pc
, 8);
1283 SET_H_GR (((UINT
) 31), opval
);
1284 written
|= (1 << 3);
1285 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1289 USI opval
= FLD (i_offset
);
1290 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1291 written
|= (1 << 4);
1292 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1298 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1301 abuf
->written
= written
;
1302 SEM_BRANCH_FINI (vpc
);
1307 /* bmb0: bmb0 $rs,$rt,$offset */
1310 SEM_FN_NAME (iq2000bf
,bmb0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1312 #define FLD(f) abuf->fields.sfmt_bbi.f
1313 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1314 int UNUSED written
= 0;
1315 IADDR UNUSED pc
= abuf
->addr
;
1317 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1319 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 255), ANDSI (GET_H_GR (FLD (f_rt
)), 255))) {
1322 USI opval
= FLD (i_offset
);
1323 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1324 written
|= (1 << 3);
1325 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1330 abuf
->written
= written
;
1331 SEM_BRANCH_FINI (vpc
);
1336 /* bmb1: bmb1 $rs,$rt,$offset */
1339 SEM_FN_NAME (iq2000bf
,bmb1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1341 #define FLD(f) abuf->fields.sfmt_bbi.f
1342 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1343 int UNUSED written
= 0;
1344 IADDR UNUSED pc
= abuf
->addr
;
1346 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1348 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 65280), ANDSI (GET_H_GR (FLD (f_rt
)), 65280))) {
1351 USI opval
= FLD (i_offset
);
1352 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1353 written
|= (1 << 3);
1354 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1359 abuf
->written
= written
;
1360 SEM_BRANCH_FINI (vpc
);
1365 /* bmb2: bmb2 $rs,$rt,$offset */
1368 SEM_FN_NAME (iq2000bf
,bmb2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1370 #define FLD(f) abuf->fields.sfmt_bbi.f
1371 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1372 int UNUSED written
= 0;
1373 IADDR UNUSED pc
= abuf
->addr
;
1375 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1377 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 16711680), ANDSI (GET_H_GR (FLD (f_rt
)), 16711680))) {
1380 USI opval
= FLD (i_offset
);
1381 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1382 written
|= (1 << 3);
1383 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1388 abuf
->written
= written
;
1389 SEM_BRANCH_FINI (vpc
);
1394 /* bmb3: bmb3 $rs,$rt,$offset */
1397 SEM_FN_NAME (iq2000bf
,bmb3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1399 #define FLD(f) abuf->fields.sfmt_bbi.f
1400 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1401 int UNUSED written
= 0;
1402 IADDR UNUSED pc
= abuf
->addr
;
1404 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1406 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000), ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000))) {
1409 USI opval
= FLD (i_offset
);
1410 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1411 written
|= (1 << 3);
1412 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1417 abuf
->written
= written
;
1418 SEM_BRANCH_FINI (vpc
);
1423 /* bne: bne $rs,$rt,$offset */
1426 SEM_FN_NAME (iq2000bf
,bne
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1428 #define FLD(f) abuf->fields.sfmt_bbi.f
1429 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1430 int UNUSED written
= 0;
1431 IADDR UNUSED pc
= abuf
->addr
;
1433 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1435 if (NESI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1438 USI opval
= FLD (i_offset
);
1439 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1440 written
|= (1 << 3);
1441 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1446 abuf
->written
= written
;
1447 SEM_BRANCH_FINI (vpc
);
1452 /* bnel: bnel $rs,$rt,$offset */
1455 SEM_FN_NAME (iq2000bf
,bnel
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1457 #define FLD(f) abuf->fields.sfmt_bbi.f
1458 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1459 int UNUSED written
= 0;
1460 IADDR UNUSED pc
= abuf
->addr
;
1462 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1464 if (NESI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1467 USI opval
= FLD (i_offset
);
1468 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1469 written
|= (1 << 3);
1470 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1475 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1478 abuf
->written
= written
;
1479 SEM_BRANCH_FINI (vpc
);
1484 /* jalr: jalr $rd,$rs */
1487 SEM_FN_NAME (iq2000bf
,jalr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1489 #define FLD(f) abuf->fields.sfmt_mrgb.f
1490 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1491 int UNUSED written
= 0;
1492 IADDR UNUSED pc
= abuf
->addr
;
1494 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1499 SI opval
= ADDSI (pc
, 8);
1500 SET_H_GR (FLD (f_rd
), opval
);
1501 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1504 USI opval
= GET_H_GR (FLD (f_rs
));
1505 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1506 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1511 SEM_BRANCH_FINI (vpc
);
1519 SEM_FN_NAME (iq2000bf
,jr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1521 #define FLD(f) abuf->fields.sfmt_bbi.f
1522 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1523 int UNUSED written
= 0;
1524 IADDR UNUSED pc
= abuf
->addr
;
1526 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1530 USI opval
= GET_H_GR (FLD (f_rs
));
1531 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1532 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1536 SEM_BRANCH_FINI (vpc
);
1541 /* lb: lb $rt,$lo16($base) */
1544 SEM_FN_NAME (iq2000bf
,lb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1546 #define FLD(f) abuf->fields.sfmt_addi.f
1547 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1548 int UNUSED written
= 0;
1549 IADDR UNUSED pc
= abuf
->addr
;
1550 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1553 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1554 SET_H_GR (FLD (f_rt
), opval
);
1555 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1562 /* lbu: lbu $rt,$lo16($base) */
1565 SEM_FN_NAME (iq2000bf
,lbu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1567 #define FLD(f) abuf->fields.sfmt_addi.f
1568 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1569 int UNUSED written
= 0;
1570 IADDR UNUSED pc
= abuf
->addr
;
1571 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1574 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1575 SET_H_GR (FLD (f_rt
), opval
);
1576 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1583 /* lh: lh $rt,$lo16($base) */
1586 SEM_FN_NAME (iq2000bf
,lh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1588 #define FLD(f) abuf->fields.sfmt_addi.f
1589 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1590 int UNUSED written
= 0;
1591 IADDR UNUSED pc
= abuf
->addr
;
1592 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1595 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1596 SET_H_GR (FLD (f_rt
), opval
);
1597 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1604 /* lhu: lhu $rt,$lo16($base) */
1607 SEM_FN_NAME (iq2000bf
,lhu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1609 #define FLD(f) abuf->fields.sfmt_addi.f
1610 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1611 int UNUSED written
= 0;
1612 IADDR UNUSED pc
= abuf
->addr
;
1613 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1616 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1617 SET_H_GR (FLD (f_rt
), opval
);
1618 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1625 /* lui: lui $rt,$hi16 */
1628 SEM_FN_NAME (iq2000bf
,lui
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1630 #define FLD(f) abuf->fields.sfmt_addi.f
1631 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1632 int UNUSED written
= 0;
1633 IADDR UNUSED pc
= abuf
->addr
;
1634 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1637 SI opval
= SLLSI (FLD (f_imm
), 16);
1638 SET_H_GR (FLD (f_rt
), opval
);
1639 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1646 /* lw: lw $rt,$lo16($base) */
1649 SEM_FN_NAME (iq2000bf
,lw
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1651 #define FLD(f) abuf->fields.sfmt_addi.f
1652 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1653 int UNUSED written
= 0;
1654 IADDR UNUSED pc
= abuf
->addr
;
1655 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1658 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))));
1659 SET_H_GR (FLD (f_rt
), opval
);
1660 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1667 /* sb: sb $rt,$lo16($base) */
1670 SEM_FN_NAME (iq2000bf
,sb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1672 #define FLD(f) abuf->fields.sfmt_addi.f
1673 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1674 int UNUSED written
= 0;
1675 IADDR UNUSED pc
= abuf
->addr
;
1676 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1679 QI opval
= ANDQI (GET_H_GR (FLD (f_rt
)), 255);
1680 SETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1681 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1688 /* sh: sh $rt,$lo16($base) */
1691 SEM_FN_NAME (iq2000bf
,sh
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1693 #define FLD(f) abuf->fields.sfmt_addi.f
1694 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1695 int UNUSED written
= 0;
1696 IADDR UNUSED pc
= abuf
->addr
;
1697 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1700 HI opval
= ANDHI (GET_H_GR (FLD (f_rt
)), 65535);
1701 SETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1702 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1709 /* sw: sw $rt,$lo16($base) */
1712 SEM_FN_NAME (iq2000bf
,sw
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1714 #define FLD(f) abuf->fields.sfmt_addi.f
1715 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1716 int UNUSED written
= 0;
1717 IADDR UNUSED pc
= abuf
->addr
;
1718 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1721 SI opval
= GET_H_GR (FLD (f_rt
));
1722 SETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1723 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1733 SEM_FN_NAME (iq2000bf
,break) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1735 #define FLD(f) abuf->fields.fmt_empty.f
1736 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1737 int UNUSED written
= 0;
1738 IADDR UNUSED pc
= abuf
->addr
;
1739 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1741 do_break (current_cpu
, pc
);
1747 /* syscall: syscall */
1750 SEM_FN_NAME (iq2000bf
,syscall
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1752 #define FLD(f) abuf->fields.fmt_empty.f
1753 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1754 int UNUSED written
= 0;
1755 IADDR UNUSED pc
= abuf
->addr
;
1756 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1758 do_syscall (current_cpu
);
1764 /* andoui: andoui $rt,$rs,$hi16 */
1767 SEM_FN_NAME (iq2000bf
,andoui
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1769 #define FLD(f) abuf->fields.sfmt_addi.f
1770 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1771 int UNUSED written
= 0;
1772 IADDR UNUSED pc
= abuf
->addr
;
1773 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1776 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ORSI (SLLSI (FLD (f_imm
), 16), 65535));
1777 SET_H_GR (FLD (f_rt
), opval
);
1778 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1785 /* orui: orui $rt,$rs,$hi16 */
1788 SEM_FN_NAME (iq2000bf
,orui
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1790 #define FLD(f) abuf->fields.sfmt_addi.f
1791 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1792 int UNUSED written
= 0;
1793 IADDR UNUSED pc
= abuf
->addr
;
1794 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1797 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), SLLSI (FLD (f_imm
), 16));
1798 SET_H_GR (FLD (f_rt
), opval
);
1799 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1806 /* bgtz: bgtz $rs,$offset */
1809 SEM_FN_NAME (iq2000bf
,bgtz
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1811 #define FLD(f) abuf->fields.sfmt_bbi.f
1812 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1813 int UNUSED written
= 0;
1814 IADDR UNUSED pc
= abuf
->addr
;
1816 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1818 if (GTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1821 USI opval
= FLD (i_offset
);
1822 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1823 written
|= (1 << 2);
1824 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1829 abuf
->written
= written
;
1830 SEM_BRANCH_FINI (vpc
);
1835 /* bgtzl: bgtzl $rs,$offset */
1838 SEM_FN_NAME (iq2000bf
,bgtzl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1840 #define FLD(f) abuf->fields.sfmt_bbi.f
1841 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1842 int UNUSED written
= 0;
1843 IADDR UNUSED pc
= abuf
->addr
;
1845 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1847 if (GTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1850 USI opval
= FLD (i_offset
);
1851 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1852 written
|= (1 << 2);
1853 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1858 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1861 abuf
->written
= written
;
1862 SEM_BRANCH_FINI (vpc
);
1867 /* blez: blez $rs,$offset */
1870 SEM_FN_NAME (iq2000bf
,blez
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1872 #define FLD(f) abuf->fields.sfmt_bbi.f
1873 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1874 int UNUSED written
= 0;
1875 IADDR UNUSED pc
= abuf
->addr
;
1877 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1879 if (LESI (GET_H_GR (FLD (f_rs
)), 0)) {
1882 USI opval
= FLD (i_offset
);
1883 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1884 written
|= (1 << 2);
1885 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1890 abuf
->written
= written
;
1891 SEM_BRANCH_FINI (vpc
);
1896 /* blezl: blezl $rs,$offset */
1899 SEM_FN_NAME (iq2000bf
,blezl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1901 #define FLD(f) abuf->fields.sfmt_bbi.f
1902 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1903 int UNUSED written
= 0;
1904 IADDR UNUSED pc
= abuf
->addr
;
1906 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1908 if (LESI (GET_H_GR (FLD (f_rs
)), 0)) {
1911 USI opval
= FLD (i_offset
);
1912 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1913 written
|= (1 << 2);
1914 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1919 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1922 abuf
->written
= written
;
1923 SEM_BRANCH_FINI (vpc
);
1928 /* mrgb: mrgb $rd,$rs,$rt,$mask */
1931 SEM_FN_NAME (iq2000bf
,mrgb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1933 #define FLD(f) abuf->fields.sfmt_mrgb.f
1934 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1935 int UNUSED written
= 0;
1936 IADDR UNUSED pc
= abuf
->addr
;
1937 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1941 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 0)))) {
1942 tmp_temp
= ANDSI (GET_H_GR (FLD (f_rs
)), 255);
1944 tmp_temp
= ANDSI (GET_H_GR (FLD (f_rt
)), 255);
1946 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 1)))) {
1947 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 65280));
1949 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 65280));
1951 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 2)))) {
1952 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 16711680));
1954 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 16711680));
1956 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 3)))) {
1957 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000));
1959 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000));
1962 SI opval
= tmp_temp
;
1963 SET_H_GR (FLD (f_rd
), opval
);
1964 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1972 /* bctxt: bctxt $rs,$offset */
1975 SEM_FN_NAME (iq2000bf
,bctxt
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1977 #define FLD(f) abuf->fields.fmt_empty.f
1978 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1979 int UNUSED written
= 0;
1980 IADDR UNUSED pc
= abuf
->addr
;
1982 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1986 SEM_BRANCH_FINI (vpc
);
1991 /* bc0f: bc0f $offset */
1994 SEM_FN_NAME (iq2000bf
,bc0f
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
1996 #define FLD(f) abuf->fields.fmt_empty.f
1997 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1998 int UNUSED written
= 0;
1999 IADDR UNUSED pc
= abuf
->addr
;
2001 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2005 SEM_BRANCH_FINI (vpc
);
2010 /* bc0fl: bc0fl $offset */
2013 SEM_FN_NAME (iq2000bf
,bc0fl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2015 #define FLD(f) abuf->fields.fmt_empty.f
2016 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2017 int UNUSED written
= 0;
2018 IADDR UNUSED pc
= abuf
->addr
;
2020 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2024 SEM_BRANCH_FINI (vpc
);
2029 /* bc3f: bc3f $offset */
2032 SEM_FN_NAME (iq2000bf
,bc3f
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2034 #define FLD(f) abuf->fields.fmt_empty.f
2035 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2036 int UNUSED written
= 0;
2037 IADDR UNUSED pc
= abuf
->addr
;
2039 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2043 SEM_BRANCH_FINI (vpc
);
2048 /* bc3fl: bc3fl $offset */
2051 SEM_FN_NAME (iq2000bf
,bc3fl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2053 #define FLD(f) abuf->fields.fmt_empty.f
2054 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2055 int UNUSED written
= 0;
2056 IADDR UNUSED pc
= abuf
->addr
;
2058 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2062 SEM_BRANCH_FINI (vpc
);
2067 /* bc0t: bc0t $offset */
2070 SEM_FN_NAME (iq2000bf
,bc0t
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2072 #define FLD(f) abuf->fields.fmt_empty.f
2073 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2074 int UNUSED written
= 0;
2075 IADDR UNUSED pc
= abuf
->addr
;
2077 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2081 SEM_BRANCH_FINI (vpc
);
2086 /* bc0tl: bc0tl $offset */
2089 SEM_FN_NAME (iq2000bf
,bc0tl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2091 #define FLD(f) abuf->fields.fmt_empty.f
2092 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2093 int UNUSED written
= 0;
2094 IADDR UNUSED pc
= abuf
->addr
;
2096 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2100 SEM_BRANCH_FINI (vpc
);
2105 /* bc3t: bc3t $offset */
2108 SEM_FN_NAME (iq2000bf
,bc3t
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2110 #define FLD(f) abuf->fields.fmt_empty.f
2111 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2112 int UNUSED written
= 0;
2113 IADDR UNUSED pc
= abuf
->addr
;
2115 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2119 SEM_BRANCH_FINI (vpc
);
2124 /* bc3tl: bc3tl $offset */
2127 SEM_FN_NAME (iq2000bf
,bc3tl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2129 #define FLD(f) abuf->fields.fmt_empty.f
2130 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2131 int UNUSED written
= 0;
2132 IADDR UNUSED pc
= abuf
->addr
;
2134 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2138 SEM_BRANCH_FINI (vpc
);
2143 /* cfc0: cfc0 $rt,$rd */
2146 SEM_FN_NAME (iq2000bf
,cfc0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2148 #define FLD(f) abuf->fields.fmt_empty.f
2149 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2150 int UNUSED written
= 0;
2151 IADDR UNUSED pc
= abuf
->addr
;
2152 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2160 /* cfc1: cfc1 $rt,$rd */
2163 SEM_FN_NAME (iq2000bf
,cfc1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2165 #define FLD(f) abuf->fields.fmt_empty.f
2166 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2167 int UNUSED written
= 0;
2168 IADDR UNUSED pc
= abuf
->addr
;
2169 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2177 /* cfc2: cfc2 $rt,$rd */
2180 SEM_FN_NAME (iq2000bf
,cfc2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2182 #define FLD(f) abuf->fields.fmt_empty.f
2183 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2184 int UNUSED written
= 0;
2185 IADDR UNUSED pc
= abuf
->addr
;
2186 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2194 /* cfc3: cfc3 $rt,$rd */
2197 SEM_FN_NAME (iq2000bf
,cfc3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2199 #define FLD(f) abuf->fields.fmt_empty.f
2200 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2201 int UNUSED written
= 0;
2202 IADDR UNUSED pc
= abuf
->addr
;
2203 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2211 /* chkhdr: chkhdr $rd,$rt */
2214 SEM_FN_NAME (iq2000bf
,chkhdr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2216 #define FLD(f) abuf->fields.fmt_empty.f
2217 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2218 int UNUSED written
= 0;
2219 IADDR UNUSED pc
= abuf
->addr
;
2220 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2228 /* ctc0: ctc0 $rt,$rd */
2231 SEM_FN_NAME (iq2000bf
,ctc0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2233 #define FLD(f) abuf->fields.fmt_empty.f
2234 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2235 int UNUSED written
= 0;
2236 IADDR UNUSED pc
= abuf
->addr
;
2237 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2245 /* ctc1: ctc1 $rt,$rd */
2248 SEM_FN_NAME (iq2000bf
,ctc1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2250 #define FLD(f) abuf->fields.fmt_empty.f
2251 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2252 int UNUSED written
= 0;
2253 IADDR UNUSED pc
= abuf
->addr
;
2254 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2262 /* ctc2: ctc2 $rt,$rd */
2265 SEM_FN_NAME (iq2000bf
,ctc2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2267 #define FLD(f) abuf->fields.fmt_empty.f
2268 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2269 int UNUSED written
= 0;
2270 IADDR UNUSED pc
= abuf
->addr
;
2271 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2279 /* ctc3: ctc3 $rt,$rd */
2282 SEM_FN_NAME (iq2000bf
,ctc3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2284 #define FLD(f) abuf->fields.fmt_empty.f
2285 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2286 int UNUSED written
= 0;
2287 IADDR UNUSED pc
= abuf
->addr
;
2288 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2299 SEM_FN_NAME (iq2000bf
,jcr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2301 #define FLD(f) abuf->fields.fmt_empty.f
2302 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2303 int UNUSED written
= 0;
2304 IADDR UNUSED pc
= abuf
->addr
;
2306 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2310 SEM_BRANCH_FINI (vpc
);
2315 /* luc32: luc32 $rt,$rd */
2318 SEM_FN_NAME (iq2000bf
,luc32
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2320 #define FLD(f) abuf->fields.fmt_empty.f
2321 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2322 int UNUSED written
= 0;
2323 IADDR UNUSED pc
= abuf
->addr
;
2324 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2332 /* luc32l: luc32l $rt,$rd */
2335 SEM_FN_NAME (iq2000bf
,luc32l
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2337 #define FLD(f) abuf->fields.fmt_empty.f
2338 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2339 int UNUSED written
= 0;
2340 IADDR UNUSED pc
= abuf
->addr
;
2341 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2349 /* luc64: luc64 $rt,$rd */
2352 SEM_FN_NAME (iq2000bf
,luc64
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2354 #define FLD(f) abuf->fields.fmt_empty.f
2355 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2356 int UNUSED written
= 0;
2357 IADDR UNUSED pc
= abuf
->addr
;
2358 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2366 /* luc64l: luc64l $rt,$rd */
2369 SEM_FN_NAME (iq2000bf
,luc64l
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2371 #define FLD(f) abuf->fields.fmt_empty.f
2372 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2373 int UNUSED written
= 0;
2374 IADDR UNUSED pc
= abuf
->addr
;
2375 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2383 /* luk: luk $rt,$rd */
2386 SEM_FN_NAME (iq2000bf
,luk
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2388 #define FLD(f) abuf->fields.fmt_empty.f
2389 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2390 int UNUSED written
= 0;
2391 IADDR UNUSED pc
= abuf
->addr
;
2392 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2400 /* lulck: lulck $rt */
2403 SEM_FN_NAME (iq2000bf
,lulck
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2405 #define FLD(f) abuf->fields.fmt_empty.f
2406 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2407 int UNUSED written
= 0;
2408 IADDR UNUSED pc
= abuf
->addr
;
2409 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2417 /* lum32: lum32 $rt,$rd */
2420 SEM_FN_NAME (iq2000bf
,lum32
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2422 #define FLD(f) abuf->fields.fmt_empty.f
2423 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2424 int UNUSED written
= 0;
2425 IADDR UNUSED pc
= abuf
->addr
;
2426 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2434 /* lum32l: lum32l $rt,$rd */
2437 SEM_FN_NAME (iq2000bf
,lum32l
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2439 #define FLD(f) abuf->fields.fmt_empty.f
2440 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2441 int UNUSED written
= 0;
2442 IADDR UNUSED pc
= abuf
->addr
;
2443 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2451 /* lum64: lum64 $rt,$rd */
2454 SEM_FN_NAME (iq2000bf
,lum64
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2456 #define FLD(f) abuf->fields.fmt_empty.f
2457 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2458 int UNUSED written
= 0;
2459 IADDR UNUSED pc
= abuf
->addr
;
2460 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2468 /* lum64l: lum64l $rt,$rd */
2471 SEM_FN_NAME (iq2000bf
,lum64l
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2473 #define FLD(f) abuf->fields.fmt_empty.f
2474 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2475 int UNUSED written
= 0;
2476 IADDR UNUSED pc
= abuf
->addr
;
2477 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2485 /* lur: lur $rt,$rd */
2488 SEM_FN_NAME (iq2000bf
,lur
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2490 #define FLD(f) abuf->fields.fmt_empty.f
2491 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2492 int UNUSED written
= 0;
2493 IADDR UNUSED pc
= abuf
->addr
;
2494 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2502 /* lurl: lurl $rt,$rd */
2505 SEM_FN_NAME (iq2000bf
,lurl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2507 #define FLD(f) abuf->fields.fmt_empty.f
2508 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2509 int UNUSED written
= 0;
2510 IADDR UNUSED pc
= abuf
->addr
;
2511 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2519 /* luulck: luulck $rt */
2522 SEM_FN_NAME (iq2000bf
,luulck
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2524 #define FLD(f) abuf->fields.fmt_empty.f
2525 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2526 int UNUSED written
= 0;
2527 IADDR UNUSED pc
= abuf
->addr
;
2528 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2536 /* mfc0: mfc0 $rt,$rd */
2539 SEM_FN_NAME (iq2000bf
,mfc0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2541 #define FLD(f) abuf->fields.fmt_empty.f
2542 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2543 int UNUSED written
= 0;
2544 IADDR UNUSED pc
= abuf
->addr
;
2545 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2553 /* mfc1: mfc1 $rt,$rd */
2556 SEM_FN_NAME (iq2000bf
,mfc1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2558 #define FLD(f) abuf->fields.fmt_empty.f
2559 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2560 int UNUSED written
= 0;
2561 IADDR UNUSED pc
= abuf
->addr
;
2562 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2570 /* mfc2: mfc2 $rt,$rd */
2573 SEM_FN_NAME (iq2000bf
,mfc2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2575 #define FLD(f) abuf->fields.fmt_empty.f
2576 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2577 int UNUSED written
= 0;
2578 IADDR UNUSED pc
= abuf
->addr
;
2579 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2587 /* mfc3: mfc3 $rt,$rd */
2590 SEM_FN_NAME (iq2000bf
,mfc3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2592 #define FLD(f) abuf->fields.fmt_empty.f
2593 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2594 int UNUSED written
= 0;
2595 IADDR UNUSED pc
= abuf
->addr
;
2596 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2604 /* mtc0: mtc0 $rt,$rd */
2607 SEM_FN_NAME (iq2000bf
,mtc0
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2609 #define FLD(f) abuf->fields.fmt_empty.f
2610 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2611 int UNUSED written
= 0;
2612 IADDR UNUSED pc
= abuf
->addr
;
2613 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2621 /* mtc1: mtc1 $rt,$rd */
2624 SEM_FN_NAME (iq2000bf
,mtc1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2626 #define FLD(f) abuf->fields.fmt_empty.f
2627 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2628 int UNUSED written
= 0;
2629 IADDR UNUSED pc
= abuf
->addr
;
2630 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2638 /* mtc2: mtc2 $rt,$rd */
2641 SEM_FN_NAME (iq2000bf
,mtc2
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2643 #define FLD(f) abuf->fields.fmt_empty.f
2644 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2645 int UNUSED written
= 0;
2646 IADDR UNUSED pc
= abuf
->addr
;
2647 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2655 /* mtc3: mtc3 $rt,$rd */
2658 SEM_FN_NAME (iq2000bf
,mtc3
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2660 #define FLD(f) abuf->fields.fmt_empty.f
2661 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2662 int UNUSED written
= 0;
2663 IADDR UNUSED pc
= abuf
->addr
;
2664 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2672 /* pkrl: pkrl $rd,$rt */
2675 SEM_FN_NAME (iq2000bf
,pkrl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2677 #define FLD(f) abuf->fields.fmt_empty.f
2678 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2679 int UNUSED written
= 0;
2680 IADDR UNUSED pc
= abuf
->addr
;
2681 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2689 /* pkrlr1: pkrlr1 $rt,$index,$count */
2692 SEM_FN_NAME (iq2000bf
,pkrlr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2694 #define FLD(f) abuf->fields.fmt_empty.f
2695 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2696 int UNUSED written
= 0;
2697 IADDR UNUSED pc
= abuf
->addr
;
2698 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2706 /* pkrlr30: pkrlr30 $rt,$index,$count */
2709 SEM_FN_NAME (iq2000bf
,pkrlr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2711 #define FLD(f) abuf->fields.fmt_empty.f
2712 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2713 int UNUSED written
= 0;
2714 IADDR UNUSED pc
= abuf
->addr
;
2715 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2723 /* rb: rb $rd,$rt */
2726 SEM_FN_NAME (iq2000bf
,rb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2728 #define FLD(f) abuf->fields.fmt_empty.f
2729 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2730 int UNUSED written
= 0;
2731 IADDR UNUSED pc
= abuf
->addr
;
2732 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2740 /* rbr1: rbr1 $rt,$index,$count */
2743 SEM_FN_NAME (iq2000bf
,rbr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2745 #define FLD(f) abuf->fields.fmt_empty.f
2746 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2747 int UNUSED written
= 0;
2748 IADDR UNUSED pc
= abuf
->addr
;
2749 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2757 /* rbr30: rbr30 $rt,$index,$count */
2760 SEM_FN_NAME (iq2000bf
,rbr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2762 #define FLD(f) abuf->fields.fmt_empty.f
2763 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2764 int UNUSED written
= 0;
2765 IADDR UNUSED pc
= abuf
->addr
;
2766 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2777 SEM_FN_NAME (iq2000bf
,rfe
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2779 #define FLD(f) abuf->fields.fmt_empty.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
, 4);
2791 /* rx: rx $rd,$rt */
2794 SEM_FN_NAME (iq2000bf
,rx
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2796 #define FLD(f) abuf->fields.fmt_empty.f
2797 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2798 int UNUSED written
= 0;
2799 IADDR UNUSED pc
= abuf
->addr
;
2800 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2808 /* rxr1: rxr1 $rt,$index,$count */
2811 SEM_FN_NAME (iq2000bf
,rxr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2813 #define FLD(f) abuf->fields.fmt_empty.f
2814 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2815 int UNUSED written
= 0;
2816 IADDR UNUSED pc
= abuf
->addr
;
2817 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2825 /* rxr30: rxr30 $rt,$index,$count */
2828 SEM_FN_NAME (iq2000bf
,rxr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2830 #define FLD(f) abuf->fields.fmt_empty.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
, 4);
2845 SEM_FN_NAME (iq2000bf
,sleep
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2847 #define FLD(f) abuf->fields.fmt_empty.f
2848 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2849 int UNUSED written
= 0;
2850 IADDR UNUSED pc
= abuf
->addr
;
2851 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2859 /* srrd: srrd $rt */
2862 SEM_FN_NAME (iq2000bf
,srrd
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2864 #define FLD(f) abuf->fields.fmt_empty.f
2865 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2866 int UNUSED written
= 0;
2867 IADDR UNUSED pc
= abuf
->addr
;
2868 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2876 /* srrdl: srrdl $rt */
2879 SEM_FN_NAME (iq2000bf
,srrdl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2881 #define FLD(f) abuf->fields.fmt_empty.f
2882 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2883 int UNUSED written
= 0;
2884 IADDR UNUSED pc
= abuf
->addr
;
2885 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2893 /* srulck: srulck $rt */
2896 SEM_FN_NAME (iq2000bf
,srulck
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2898 #define FLD(f) abuf->fields.fmt_empty.f
2899 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2900 int UNUSED written
= 0;
2901 IADDR UNUSED pc
= abuf
->addr
;
2902 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2910 /* srwr: srwr $rt,$rd */
2913 SEM_FN_NAME (iq2000bf
,srwr
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2915 #define FLD(f) abuf->fields.fmt_empty.f
2916 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2917 int UNUSED written
= 0;
2918 IADDR UNUSED pc
= abuf
->addr
;
2919 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2927 /* srwru: srwru $rt,$rd */
2930 SEM_FN_NAME (iq2000bf
,srwru
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2932 #define FLD(f) abuf->fields.fmt_empty.f
2933 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2934 int UNUSED written
= 0;
2935 IADDR UNUSED pc
= abuf
->addr
;
2936 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2944 /* trapqfl: trapqfl */
2947 SEM_FN_NAME (iq2000bf
,trapqfl
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2949 #define FLD(f) abuf->fields.fmt_empty.f
2950 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2951 int UNUSED written
= 0;
2952 IADDR UNUSED pc
= abuf
->addr
;
2953 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2961 /* trapqne: trapqne */
2964 SEM_FN_NAME (iq2000bf
,trapqne
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2966 #define FLD(f) abuf->fields.fmt_empty.f
2967 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2968 int UNUSED written
= 0;
2969 IADDR UNUSED pc
= abuf
->addr
;
2970 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2978 /* traprel: traprel $rt */
2981 SEM_FN_NAME (iq2000bf
,traprel
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
2983 #define FLD(f) abuf->fields.fmt_empty.f
2984 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2985 int UNUSED written
= 0;
2986 IADDR UNUSED pc
= abuf
->addr
;
2987 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2995 /* wb: wb $rd,$rt */
2998 SEM_FN_NAME (iq2000bf
,wb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3000 #define FLD(f) abuf->fields.fmt_empty.f
3001 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3002 int UNUSED written
= 0;
3003 IADDR UNUSED pc
= abuf
->addr
;
3004 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3012 /* wbu: wbu $rd,$rt */
3015 SEM_FN_NAME (iq2000bf
,wbu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3017 #define FLD(f) abuf->fields.fmt_empty.f
3018 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3019 int UNUSED written
= 0;
3020 IADDR UNUSED pc
= abuf
->addr
;
3021 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3029 /* wbr1: wbr1 $rt,$index,$count */
3032 SEM_FN_NAME (iq2000bf
,wbr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3034 #define FLD(f) abuf->fields.fmt_empty.f
3035 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3036 int UNUSED written
= 0;
3037 IADDR UNUSED pc
= abuf
->addr
;
3038 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3046 /* wbr1u: wbr1u $rt,$index,$count */
3049 SEM_FN_NAME (iq2000bf
,wbr1u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3051 #define FLD(f) abuf->fields.fmt_empty.f
3052 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3053 int UNUSED written
= 0;
3054 IADDR UNUSED pc
= abuf
->addr
;
3055 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3063 /* wbr30: wbr30 $rt,$index,$count */
3066 SEM_FN_NAME (iq2000bf
,wbr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3068 #define FLD(f) abuf->fields.fmt_empty.f
3069 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3070 int UNUSED written
= 0;
3071 IADDR UNUSED pc
= abuf
->addr
;
3072 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3080 /* wbr30u: wbr30u $rt,$index,$count */
3083 SEM_FN_NAME (iq2000bf
,wbr30u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3085 #define FLD(f) abuf->fields.fmt_empty.f
3086 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3087 int UNUSED written
= 0;
3088 IADDR UNUSED pc
= abuf
->addr
;
3089 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3097 /* wx: wx $rd,$rt */
3100 SEM_FN_NAME (iq2000bf
,wx
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3102 #define FLD(f) abuf->fields.fmt_empty.f
3103 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3104 int UNUSED written
= 0;
3105 IADDR UNUSED pc
= abuf
->addr
;
3106 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3114 /* wxu: wxu $rd,$rt */
3117 SEM_FN_NAME (iq2000bf
,wxu
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3119 #define FLD(f) abuf->fields.fmt_empty.f
3120 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3121 int UNUSED written
= 0;
3122 IADDR UNUSED pc
= abuf
->addr
;
3123 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3131 /* wxr1: wxr1 $rt,$index,$count */
3134 SEM_FN_NAME (iq2000bf
,wxr1
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3136 #define FLD(f) abuf->fields.fmt_empty.f
3137 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3138 int UNUSED written
= 0;
3139 IADDR UNUSED pc
= abuf
->addr
;
3140 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3148 /* wxr1u: wxr1u $rt,$index,$count */
3151 SEM_FN_NAME (iq2000bf
,wxr1u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3153 #define FLD(f) abuf->fields.fmt_empty.f
3154 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3155 int UNUSED written
= 0;
3156 IADDR UNUSED pc
= abuf
->addr
;
3157 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3165 /* wxr30: wxr30 $rt,$index,$count */
3168 SEM_FN_NAME (iq2000bf
,wxr30
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3170 #define FLD(f) abuf->fields.fmt_empty.f
3171 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3172 int UNUSED written
= 0;
3173 IADDR UNUSED pc
= abuf
->addr
;
3174 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3182 /* wxr30u: wxr30u $rt,$index,$count */
3185 SEM_FN_NAME (iq2000bf
,wxr30u
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3187 #define FLD(f) abuf->fields.fmt_empty.f
3188 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3189 int UNUSED written
= 0;
3190 IADDR UNUSED pc
= abuf
->addr
;
3191 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3199 /* ldw: ldw $rt,$lo16($base) */
3202 SEM_FN_NAME (iq2000bf
,ldw
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3204 #define FLD(f) abuf->fields.sfmt_addi.f
3205 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3206 int UNUSED written
= 0;
3207 IADDR UNUSED pc
= abuf
->addr
;
3208 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3212 tmp_addr
= ANDSI (ADDSI (GET_H_GR (FLD (f_rs
)), FLD (f_imm
)), INVSI (3));
3214 SI opval
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3215 SET_H_GR (ADDSI (FLD (f_rt
), 1), opval
);
3216 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3219 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (tmp_addr
, 4));
3220 SET_H_GR (FLD (f_rt
), opval
);
3221 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3229 /* sdw: sdw $rt,$lo16($base) */
3232 SEM_FN_NAME (iq2000bf
,sdw
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3234 #define FLD(f) abuf->fields.sfmt_addi.f
3235 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3236 int UNUSED written
= 0;
3237 IADDR UNUSED pc
= abuf
->addr
;
3238 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3242 tmp_addr
= ANDSI (ADDSI (GET_H_GR (FLD (f_rs
)), FLD (f_imm
)), INVSI (3));
3244 SI opval
= GET_H_GR (FLD (f_rt
));
3245 SETMEMSI (current_cpu
, pc
, ADDSI (tmp_addr
, 4), opval
);
3246 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3249 SI opval
= GET_H_GR (ADDSI (FLD (f_rt
), 1));
3250 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
3251 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3262 SEM_FN_NAME (iq2000bf
,j
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3264 #define FLD(f) abuf->fields.sfmt_j.f
3265 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3266 int UNUSED written
= 0;
3267 IADDR UNUSED pc
= abuf
->addr
;
3269 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3273 USI opval
= FLD (i_jmptarg
);
3274 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3275 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3279 SEM_BRANCH_FINI (vpc
);
3284 /* jal: jal $jmptarg */
3287 SEM_FN_NAME (iq2000bf
,jal
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3289 #define FLD(f) abuf->fields.sfmt_j.f
3290 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3291 int UNUSED written
= 0;
3292 IADDR UNUSED pc
= abuf
->addr
;
3294 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3299 SI opval
= ADDSI (pc
, 8);
3300 SET_H_GR (((UINT
) 31), opval
);
3301 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3304 USI opval
= FLD (i_jmptarg
);
3305 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3306 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3311 SEM_BRANCH_FINI (vpc
);
3316 /* bmb: bmb $rs,$rt,$offset */
3319 SEM_FN_NAME (iq2000bf
,bmb
) (SIM_CPU
*current_cpu
, SEM_ARG sem_arg
)
3321 #define FLD(f) abuf->fields.sfmt_bbi.f
3322 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3323 int UNUSED written
= 0;
3324 IADDR UNUSED pc
= abuf
->addr
;
3326 SEM_PC vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3331 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 255), ANDSI (GET_H_GR (FLD (f_rt
)), 255))) {
3334 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 65280), ANDSI (GET_H_GR (FLD (f_rt
)), 65280))) {
3337 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 16711680), ANDSI (GET_H_GR (FLD (f_rt
)), 16711680))) {
3340 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000), ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000))) {
3346 USI opval
= FLD (i_offset
);
3347 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3348 written
|= (1 << 3);
3349 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3355 abuf
->written
= written
;
3356 SEM_BRANCH_FINI (vpc
);
3361 /* Table of all semantic fns. */
3363 static const struct sem_fn_desc sem_fns
[] = {
3364 { IQ2000BF_INSN_X_INVALID
, SEM_FN_NAME (iq2000bf
,x_invalid
) },
3365 { IQ2000BF_INSN_X_AFTER
, SEM_FN_NAME (iq2000bf
,x_after
) },
3366 { IQ2000BF_INSN_X_BEFORE
, SEM_FN_NAME (iq2000bf
,x_before
) },
3367 { IQ2000BF_INSN_X_CTI_CHAIN
, SEM_FN_NAME (iq2000bf
,x_cti_chain
) },
3368 { IQ2000BF_INSN_X_CHAIN
, SEM_FN_NAME (iq2000bf
,x_chain
) },
3369 { IQ2000BF_INSN_X_BEGIN
, SEM_FN_NAME (iq2000bf
,x_begin
) },
3370 { IQ2000BF_INSN_ADD
, SEM_FN_NAME (iq2000bf
,add
) },
3371 { IQ2000BF_INSN_ADDI
, SEM_FN_NAME (iq2000bf
,addi
) },
3372 { IQ2000BF_INSN_ADDIU
, SEM_FN_NAME (iq2000bf
,addiu
) },
3373 { IQ2000BF_INSN_ADDU
, SEM_FN_NAME (iq2000bf
,addu
) },
3374 { IQ2000BF_INSN_ADO16
, SEM_FN_NAME (iq2000bf
,ado16
) },
3375 { IQ2000BF_INSN_AND
, SEM_FN_NAME (iq2000bf
,and) },
3376 { IQ2000BF_INSN_ANDI
, SEM_FN_NAME (iq2000bf
,andi
) },
3377 { IQ2000BF_INSN_ANDOI
, SEM_FN_NAME (iq2000bf
,andoi
) },
3378 { IQ2000BF_INSN_NOR
, SEM_FN_NAME (iq2000bf
,nor
) },
3379 { IQ2000BF_INSN_OR
, SEM_FN_NAME (iq2000bf
,or) },
3380 { IQ2000BF_INSN_ORI
, SEM_FN_NAME (iq2000bf
,ori
) },
3381 { IQ2000BF_INSN_RAM
, SEM_FN_NAME (iq2000bf
,ram
) },
3382 { IQ2000BF_INSN_SLL
, SEM_FN_NAME (iq2000bf
,sll
) },
3383 { IQ2000BF_INSN_SLLV
, SEM_FN_NAME (iq2000bf
,sllv
) },
3384 { IQ2000BF_INSN_SLMV
, SEM_FN_NAME (iq2000bf
,slmv
) },
3385 { IQ2000BF_INSN_SLT
, SEM_FN_NAME (iq2000bf
,slt
) },
3386 { IQ2000BF_INSN_SLTI
, SEM_FN_NAME (iq2000bf
,slti
) },
3387 { IQ2000BF_INSN_SLTIU
, SEM_FN_NAME (iq2000bf
,sltiu
) },
3388 { IQ2000BF_INSN_SLTU
, SEM_FN_NAME (iq2000bf
,sltu
) },
3389 { IQ2000BF_INSN_SRA
, SEM_FN_NAME (iq2000bf
,sra
) },
3390 { IQ2000BF_INSN_SRAV
, SEM_FN_NAME (iq2000bf
,srav
) },
3391 { IQ2000BF_INSN_SRL
, SEM_FN_NAME (iq2000bf
,srl
) },
3392 { IQ2000BF_INSN_SRLV
, SEM_FN_NAME (iq2000bf
,srlv
) },
3393 { IQ2000BF_INSN_SRMV
, SEM_FN_NAME (iq2000bf
,srmv
) },
3394 { IQ2000BF_INSN_SUB
, SEM_FN_NAME (iq2000bf
,sub
) },
3395 { IQ2000BF_INSN_SUBU
, SEM_FN_NAME (iq2000bf
,subu
) },
3396 { IQ2000BF_INSN_XOR
, SEM_FN_NAME (iq2000bf
,xor) },
3397 { IQ2000BF_INSN_XORI
, SEM_FN_NAME (iq2000bf
,xori
) },
3398 { IQ2000BF_INSN_BBI
, SEM_FN_NAME (iq2000bf
,bbi
) },
3399 { IQ2000BF_INSN_BBIN
, SEM_FN_NAME (iq2000bf
,bbin
) },
3400 { IQ2000BF_INSN_BBV
, SEM_FN_NAME (iq2000bf
,bbv
) },
3401 { IQ2000BF_INSN_BBVN
, SEM_FN_NAME (iq2000bf
,bbvn
) },
3402 { IQ2000BF_INSN_BEQ
, SEM_FN_NAME (iq2000bf
,beq
) },
3403 { IQ2000BF_INSN_BEQL
, SEM_FN_NAME (iq2000bf
,beql
) },
3404 { IQ2000BF_INSN_BGEZ
, SEM_FN_NAME (iq2000bf
,bgez
) },
3405 { IQ2000BF_INSN_BGEZAL
, SEM_FN_NAME (iq2000bf
,bgezal
) },
3406 { IQ2000BF_INSN_BGEZALL
, SEM_FN_NAME (iq2000bf
,bgezall
) },
3407 { IQ2000BF_INSN_BGEZL
, SEM_FN_NAME (iq2000bf
,bgezl
) },
3408 { IQ2000BF_INSN_BLTZ
, SEM_FN_NAME (iq2000bf
,bltz
) },
3409 { IQ2000BF_INSN_BLTZL
, SEM_FN_NAME (iq2000bf
,bltzl
) },
3410 { IQ2000BF_INSN_BLTZAL
, SEM_FN_NAME (iq2000bf
,bltzal
) },
3411 { IQ2000BF_INSN_BLTZALL
, SEM_FN_NAME (iq2000bf
,bltzall
) },
3412 { IQ2000BF_INSN_BMB0
, SEM_FN_NAME (iq2000bf
,bmb0
) },
3413 { IQ2000BF_INSN_BMB1
, SEM_FN_NAME (iq2000bf
,bmb1
) },
3414 { IQ2000BF_INSN_BMB2
, SEM_FN_NAME (iq2000bf
,bmb2
) },
3415 { IQ2000BF_INSN_BMB3
, SEM_FN_NAME (iq2000bf
,bmb3
) },
3416 { IQ2000BF_INSN_BNE
, SEM_FN_NAME (iq2000bf
,bne
) },
3417 { IQ2000BF_INSN_BNEL
, SEM_FN_NAME (iq2000bf
,bnel
) },
3418 { IQ2000BF_INSN_JALR
, SEM_FN_NAME (iq2000bf
,jalr
) },
3419 { IQ2000BF_INSN_JR
, SEM_FN_NAME (iq2000bf
,jr
) },
3420 { IQ2000BF_INSN_LB
, SEM_FN_NAME (iq2000bf
,lb
) },
3421 { IQ2000BF_INSN_LBU
, SEM_FN_NAME (iq2000bf
,lbu
) },
3422 { IQ2000BF_INSN_LH
, SEM_FN_NAME (iq2000bf
,lh
) },
3423 { IQ2000BF_INSN_LHU
, SEM_FN_NAME (iq2000bf
,lhu
) },
3424 { IQ2000BF_INSN_LUI
, SEM_FN_NAME (iq2000bf
,lui
) },
3425 { IQ2000BF_INSN_LW
, SEM_FN_NAME (iq2000bf
,lw
) },
3426 { IQ2000BF_INSN_SB
, SEM_FN_NAME (iq2000bf
,sb
) },
3427 { IQ2000BF_INSN_SH
, SEM_FN_NAME (iq2000bf
,sh
) },
3428 { IQ2000BF_INSN_SW
, SEM_FN_NAME (iq2000bf
,sw
) },
3429 { IQ2000BF_INSN_BREAK
, SEM_FN_NAME (iq2000bf
,break) },
3430 { IQ2000BF_INSN_SYSCALL
, SEM_FN_NAME (iq2000bf
,syscall
) },
3431 { IQ2000BF_INSN_ANDOUI
, SEM_FN_NAME (iq2000bf
,andoui
) },
3432 { IQ2000BF_INSN_ORUI
, SEM_FN_NAME (iq2000bf
,orui
) },
3433 { IQ2000BF_INSN_BGTZ
, SEM_FN_NAME (iq2000bf
,bgtz
) },
3434 { IQ2000BF_INSN_BGTZL
, SEM_FN_NAME (iq2000bf
,bgtzl
) },
3435 { IQ2000BF_INSN_BLEZ
, SEM_FN_NAME (iq2000bf
,blez
) },
3436 { IQ2000BF_INSN_BLEZL
, SEM_FN_NAME (iq2000bf
,blezl
) },
3437 { IQ2000BF_INSN_MRGB
, SEM_FN_NAME (iq2000bf
,mrgb
) },
3438 { IQ2000BF_INSN_BCTXT
, SEM_FN_NAME (iq2000bf
,bctxt
) },
3439 { IQ2000BF_INSN_BC0F
, SEM_FN_NAME (iq2000bf
,bc0f
) },
3440 { IQ2000BF_INSN_BC0FL
, SEM_FN_NAME (iq2000bf
,bc0fl
) },
3441 { IQ2000BF_INSN_BC3F
, SEM_FN_NAME (iq2000bf
,bc3f
) },
3442 { IQ2000BF_INSN_BC3FL
, SEM_FN_NAME (iq2000bf
,bc3fl
) },
3443 { IQ2000BF_INSN_BC0T
, SEM_FN_NAME (iq2000bf
,bc0t
) },
3444 { IQ2000BF_INSN_BC0TL
, SEM_FN_NAME (iq2000bf
,bc0tl
) },
3445 { IQ2000BF_INSN_BC3T
, SEM_FN_NAME (iq2000bf
,bc3t
) },
3446 { IQ2000BF_INSN_BC3TL
, SEM_FN_NAME (iq2000bf
,bc3tl
) },
3447 { IQ2000BF_INSN_CFC0
, SEM_FN_NAME (iq2000bf
,cfc0
) },
3448 { IQ2000BF_INSN_CFC1
, SEM_FN_NAME (iq2000bf
,cfc1
) },
3449 { IQ2000BF_INSN_CFC2
, SEM_FN_NAME (iq2000bf
,cfc2
) },
3450 { IQ2000BF_INSN_CFC3
, SEM_FN_NAME (iq2000bf
,cfc3
) },
3451 { IQ2000BF_INSN_CHKHDR
, SEM_FN_NAME (iq2000bf
,chkhdr
) },
3452 { IQ2000BF_INSN_CTC0
, SEM_FN_NAME (iq2000bf
,ctc0
) },
3453 { IQ2000BF_INSN_CTC1
, SEM_FN_NAME (iq2000bf
,ctc1
) },
3454 { IQ2000BF_INSN_CTC2
, SEM_FN_NAME (iq2000bf
,ctc2
) },
3455 { IQ2000BF_INSN_CTC3
, SEM_FN_NAME (iq2000bf
,ctc3
) },
3456 { IQ2000BF_INSN_JCR
, SEM_FN_NAME (iq2000bf
,jcr
) },
3457 { IQ2000BF_INSN_LUC32
, SEM_FN_NAME (iq2000bf
,luc32
) },
3458 { IQ2000BF_INSN_LUC32L
, SEM_FN_NAME (iq2000bf
,luc32l
) },
3459 { IQ2000BF_INSN_LUC64
, SEM_FN_NAME (iq2000bf
,luc64
) },
3460 { IQ2000BF_INSN_LUC64L
, SEM_FN_NAME (iq2000bf
,luc64l
) },
3461 { IQ2000BF_INSN_LUK
, SEM_FN_NAME (iq2000bf
,luk
) },
3462 { IQ2000BF_INSN_LULCK
, SEM_FN_NAME (iq2000bf
,lulck
) },
3463 { IQ2000BF_INSN_LUM32
, SEM_FN_NAME (iq2000bf
,lum32
) },
3464 { IQ2000BF_INSN_LUM32L
, SEM_FN_NAME (iq2000bf
,lum32l
) },
3465 { IQ2000BF_INSN_LUM64
, SEM_FN_NAME (iq2000bf
,lum64
) },
3466 { IQ2000BF_INSN_LUM64L
, SEM_FN_NAME (iq2000bf
,lum64l
) },
3467 { IQ2000BF_INSN_LUR
, SEM_FN_NAME (iq2000bf
,lur
) },
3468 { IQ2000BF_INSN_LURL
, SEM_FN_NAME (iq2000bf
,lurl
) },
3469 { IQ2000BF_INSN_LUULCK
, SEM_FN_NAME (iq2000bf
,luulck
) },
3470 { IQ2000BF_INSN_MFC0
, SEM_FN_NAME (iq2000bf
,mfc0
) },
3471 { IQ2000BF_INSN_MFC1
, SEM_FN_NAME (iq2000bf
,mfc1
) },
3472 { IQ2000BF_INSN_MFC2
, SEM_FN_NAME (iq2000bf
,mfc2
) },
3473 { IQ2000BF_INSN_MFC3
, SEM_FN_NAME (iq2000bf
,mfc3
) },
3474 { IQ2000BF_INSN_MTC0
, SEM_FN_NAME (iq2000bf
,mtc0
) },
3475 { IQ2000BF_INSN_MTC1
, SEM_FN_NAME (iq2000bf
,mtc1
) },
3476 { IQ2000BF_INSN_MTC2
, SEM_FN_NAME (iq2000bf
,mtc2
) },
3477 { IQ2000BF_INSN_MTC3
, SEM_FN_NAME (iq2000bf
,mtc3
) },
3478 { IQ2000BF_INSN_PKRL
, SEM_FN_NAME (iq2000bf
,pkrl
) },
3479 { IQ2000BF_INSN_PKRLR1
, SEM_FN_NAME (iq2000bf
,pkrlr1
) },
3480 { IQ2000BF_INSN_PKRLR30
, SEM_FN_NAME (iq2000bf
,pkrlr30
) },
3481 { IQ2000BF_INSN_RB
, SEM_FN_NAME (iq2000bf
,rb
) },
3482 { IQ2000BF_INSN_RBR1
, SEM_FN_NAME (iq2000bf
,rbr1
) },
3483 { IQ2000BF_INSN_RBR30
, SEM_FN_NAME (iq2000bf
,rbr30
) },
3484 { IQ2000BF_INSN_RFE
, SEM_FN_NAME (iq2000bf
,rfe
) },
3485 { IQ2000BF_INSN_RX
, SEM_FN_NAME (iq2000bf
,rx
) },
3486 { IQ2000BF_INSN_RXR1
, SEM_FN_NAME (iq2000bf
,rxr1
) },
3487 { IQ2000BF_INSN_RXR30
, SEM_FN_NAME (iq2000bf
,rxr30
) },
3488 { IQ2000BF_INSN_SLEEP
, SEM_FN_NAME (iq2000bf
,sleep
) },
3489 { IQ2000BF_INSN_SRRD
, SEM_FN_NAME (iq2000bf
,srrd
) },
3490 { IQ2000BF_INSN_SRRDL
, SEM_FN_NAME (iq2000bf
,srrdl
) },
3491 { IQ2000BF_INSN_SRULCK
, SEM_FN_NAME (iq2000bf
,srulck
) },
3492 { IQ2000BF_INSN_SRWR
, SEM_FN_NAME (iq2000bf
,srwr
) },
3493 { IQ2000BF_INSN_SRWRU
, SEM_FN_NAME (iq2000bf
,srwru
) },
3494 { IQ2000BF_INSN_TRAPQFL
, SEM_FN_NAME (iq2000bf
,trapqfl
) },
3495 { IQ2000BF_INSN_TRAPQNE
, SEM_FN_NAME (iq2000bf
,trapqne
) },
3496 { IQ2000BF_INSN_TRAPREL
, SEM_FN_NAME (iq2000bf
,traprel
) },
3497 { IQ2000BF_INSN_WB
, SEM_FN_NAME (iq2000bf
,wb
) },
3498 { IQ2000BF_INSN_WBU
, SEM_FN_NAME (iq2000bf
,wbu
) },
3499 { IQ2000BF_INSN_WBR1
, SEM_FN_NAME (iq2000bf
,wbr1
) },
3500 { IQ2000BF_INSN_WBR1U
, SEM_FN_NAME (iq2000bf
,wbr1u
) },
3501 { IQ2000BF_INSN_WBR30
, SEM_FN_NAME (iq2000bf
,wbr30
) },
3502 { IQ2000BF_INSN_WBR30U
, SEM_FN_NAME (iq2000bf
,wbr30u
) },
3503 { IQ2000BF_INSN_WX
, SEM_FN_NAME (iq2000bf
,wx
) },
3504 { IQ2000BF_INSN_WXU
, SEM_FN_NAME (iq2000bf
,wxu
) },
3505 { IQ2000BF_INSN_WXR1
, SEM_FN_NAME (iq2000bf
,wxr1
) },
3506 { IQ2000BF_INSN_WXR1U
, SEM_FN_NAME (iq2000bf
,wxr1u
) },
3507 { IQ2000BF_INSN_WXR30
, SEM_FN_NAME (iq2000bf
,wxr30
) },
3508 { IQ2000BF_INSN_WXR30U
, SEM_FN_NAME (iq2000bf
,wxr30u
) },
3509 { IQ2000BF_INSN_LDW
, SEM_FN_NAME (iq2000bf
,ldw
) },
3510 { IQ2000BF_INSN_SDW
, SEM_FN_NAME (iq2000bf
,sdw
) },
3511 { IQ2000BF_INSN_J
, SEM_FN_NAME (iq2000bf
,j
) },
3512 { IQ2000BF_INSN_JAL
, SEM_FN_NAME (iq2000bf
,jal
) },
3513 { IQ2000BF_INSN_BMB
, SEM_FN_NAME (iq2000bf
,bmb
) },
3517 /* Add the semantic fns to IDESC_TABLE. */
3520 SEM_FN_NAME (iq2000bf
,init_idesc_table
) (SIM_CPU
*current_cpu
)
3522 IDESC
*idesc_table
= CPU_IDESC (current_cpu
);
3523 const struct sem_fn_desc
*sf
;
3524 int mach_num
= MACH_NUM (CPU_MACH (current_cpu
));
3526 for (sf
= &sem_fns
[0]; sf
->fn
!= 0; ++sf
)
3528 const CGEN_INSN
*insn
= idesc_table
[sf
->index
].idata
;
3529 int valid_p
= (CGEN_INSN_VIRTUAL_P (insn
)
3530 || CGEN_INSN_MACH_HAS_P (insn
, mach_num
));
3533 idesc_table
[sf
->index
].sem_fast
= sf
->fn
;
3535 idesc_table
[sf
->index
].sem_fast
= SEM_FN_NAME (iq2000bf
,x_invalid
);
3538 idesc_table
[sf
->index
].sem_full
= sf
->fn
;
3540 idesc_table
[sf
->index
].sem_full
= SEM_FN_NAME (iq2000bf
,x_invalid
);