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.
27 /* The labels have the case they have because the enum of insn types
28 is all uppercase and in the non-stdc case the insn symbol is built
29 into the enum name. */
35 { IQ2000BF_INSN_X_INVALID
, && case_sem_INSN_X_INVALID
},
36 { IQ2000BF_INSN_X_AFTER
, && case_sem_INSN_X_AFTER
},
37 { IQ2000BF_INSN_X_BEFORE
, && case_sem_INSN_X_BEFORE
},
38 { IQ2000BF_INSN_X_CTI_CHAIN
, && case_sem_INSN_X_CTI_CHAIN
},
39 { IQ2000BF_INSN_X_CHAIN
, && case_sem_INSN_X_CHAIN
},
40 { IQ2000BF_INSN_X_BEGIN
, && case_sem_INSN_X_BEGIN
},
41 { IQ2000BF_INSN_ADD
, && case_sem_INSN_ADD
},
42 { IQ2000BF_INSN_ADDI
, && case_sem_INSN_ADDI
},
43 { IQ2000BF_INSN_ADDIU
, && case_sem_INSN_ADDIU
},
44 { IQ2000BF_INSN_ADDU
, && case_sem_INSN_ADDU
},
45 { IQ2000BF_INSN_ADO16
, && case_sem_INSN_ADO16
},
46 { IQ2000BF_INSN_AND
, && case_sem_INSN_AND
},
47 { IQ2000BF_INSN_ANDI
, && case_sem_INSN_ANDI
},
48 { IQ2000BF_INSN_ANDOI
, && case_sem_INSN_ANDOI
},
49 { IQ2000BF_INSN_NOR
, && case_sem_INSN_NOR
},
50 { IQ2000BF_INSN_OR
, && case_sem_INSN_OR
},
51 { IQ2000BF_INSN_ORI
, && case_sem_INSN_ORI
},
52 { IQ2000BF_INSN_RAM
, && case_sem_INSN_RAM
},
53 { IQ2000BF_INSN_SLL
, && case_sem_INSN_SLL
},
54 { IQ2000BF_INSN_SLLV
, && case_sem_INSN_SLLV
},
55 { IQ2000BF_INSN_SLMV
, && case_sem_INSN_SLMV
},
56 { IQ2000BF_INSN_SLT
, && case_sem_INSN_SLT
},
57 { IQ2000BF_INSN_SLTI
, && case_sem_INSN_SLTI
},
58 { IQ2000BF_INSN_SLTIU
, && case_sem_INSN_SLTIU
},
59 { IQ2000BF_INSN_SLTU
, && case_sem_INSN_SLTU
},
60 { IQ2000BF_INSN_SRA
, && case_sem_INSN_SRA
},
61 { IQ2000BF_INSN_SRAV
, && case_sem_INSN_SRAV
},
62 { IQ2000BF_INSN_SRL
, && case_sem_INSN_SRL
},
63 { IQ2000BF_INSN_SRLV
, && case_sem_INSN_SRLV
},
64 { IQ2000BF_INSN_SRMV
, && case_sem_INSN_SRMV
},
65 { IQ2000BF_INSN_SUB
, && case_sem_INSN_SUB
},
66 { IQ2000BF_INSN_SUBU
, && case_sem_INSN_SUBU
},
67 { IQ2000BF_INSN_XOR
, && case_sem_INSN_XOR
},
68 { IQ2000BF_INSN_XORI
, && case_sem_INSN_XORI
},
69 { IQ2000BF_INSN_BBI
, && case_sem_INSN_BBI
},
70 { IQ2000BF_INSN_BBIN
, && case_sem_INSN_BBIN
},
71 { IQ2000BF_INSN_BBV
, && case_sem_INSN_BBV
},
72 { IQ2000BF_INSN_BBVN
, && case_sem_INSN_BBVN
},
73 { IQ2000BF_INSN_BEQ
, && case_sem_INSN_BEQ
},
74 { IQ2000BF_INSN_BEQL
, && case_sem_INSN_BEQL
},
75 { IQ2000BF_INSN_BGEZ
, && case_sem_INSN_BGEZ
},
76 { IQ2000BF_INSN_BGEZAL
, && case_sem_INSN_BGEZAL
},
77 { IQ2000BF_INSN_BGEZALL
, && case_sem_INSN_BGEZALL
},
78 { IQ2000BF_INSN_BGEZL
, && case_sem_INSN_BGEZL
},
79 { IQ2000BF_INSN_BLTZ
, && case_sem_INSN_BLTZ
},
80 { IQ2000BF_INSN_BLTZL
, && case_sem_INSN_BLTZL
},
81 { IQ2000BF_INSN_BLTZAL
, && case_sem_INSN_BLTZAL
},
82 { IQ2000BF_INSN_BLTZALL
, && case_sem_INSN_BLTZALL
},
83 { IQ2000BF_INSN_BMB0
, && case_sem_INSN_BMB0
},
84 { IQ2000BF_INSN_BMB1
, && case_sem_INSN_BMB1
},
85 { IQ2000BF_INSN_BMB2
, && case_sem_INSN_BMB2
},
86 { IQ2000BF_INSN_BMB3
, && case_sem_INSN_BMB3
},
87 { IQ2000BF_INSN_BNE
, && case_sem_INSN_BNE
},
88 { IQ2000BF_INSN_BNEL
, && case_sem_INSN_BNEL
},
89 { IQ2000BF_INSN_JALR
, && case_sem_INSN_JALR
},
90 { IQ2000BF_INSN_JR
, && case_sem_INSN_JR
},
91 { IQ2000BF_INSN_LB
, && case_sem_INSN_LB
},
92 { IQ2000BF_INSN_LBU
, && case_sem_INSN_LBU
},
93 { IQ2000BF_INSN_LH
, && case_sem_INSN_LH
},
94 { IQ2000BF_INSN_LHU
, && case_sem_INSN_LHU
},
95 { IQ2000BF_INSN_LUI
, && case_sem_INSN_LUI
},
96 { IQ2000BF_INSN_LW
, && case_sem_INSN_LW
},
97 { IQ2000BF_INSN_SB
, && case_sem_INSN_SB
},
98 { IQ2000BF_INSN_SH
, && case_sem_INSN_SH
},
99 { IQ2000BF_INSN_SW
, && case_sem_INSN_SW
},
100 { IQ2000BF_INSN_BREAK
, && case_sem_INSN_BREAK
},
101 { IQ2000BF_INSN_SYSCALL
, && case_sem_INSN_SYSCALL
},
102 { IQ2000BF_INSN_ANDOUI
, && case_sem_INSN_ANDOUI
},
103 { IQ2000BF_INSN_ORUI
, && case_sem_INSN_ORUI
},
104 { IQ2000BF_INSN_BGTZ
, && case_sem_INSN_BGTZ
},
105 { IQ2000BF_INSN_BGTZL
, && case_sem_INSN_BGTZL
},
106 { IQ2000BF_INSN_BLEZ
, && case_sem_INSN_BLEZ
},
107 { IQ2000BF_INSN_BLEZL
, && case_sem_INSN_BLEZL
},
108 { IQ2000BF_INSN_MRGB
, && case_sem_INSN_MRGB
},
109 { IQ2000BF_INSN_BCTXT
, && case_sem_INSN_BCTXT
},
110 { IQ2000BF_INSN_BC0F
, && case_sem_INSN_BC0F
},
111 { IQ2000BF_INSN_BC0FL
, && case_sem_INSN_BC0FL
},
112 { IQ2000BF_INSN_BC3F
, && case_sem_INSN_BC3F
},
113 { IQ2000BF_INSN_BC3FL
, && case_sem_INSN_BC3FL
},
114 { IQ2000BF_INSN_BC0T
, && case_sem_INSN_BC0T
},
115 { IQ2000BF_INSN_BC0TL
, && case_sem_INSN_BC0TL
},
116 { IQ2000BF_INSN_BC3T
, && case_sem_INSN_BC3T
},
117 { IQ2000BF_INSN_BC3TL
, && case_sem_INSN_BC3TL
},
118 { IQ2000BF_INSN_CFC0
, && case_sem_INSN_CFC0
},
119 { IQ2000BF_INSN_CFC1
, && case_sem_INSN_CFC1
},
120 { IQ2000BF_INSN_CFC2
, && case_sem_INSN_CFC2
},
121 { IQ2000BF_INSN_CFC3
, && case_sem_INSN_CFC3
},
122 { IQ2000BF_INSN_CHKHDR
, && case_sem_INSN_CHKHDR
},
123 { IQ2000BF_INSN_CTC0
, && case_sem_INSN_CTC0
},
124 { IQ2000BF_INSN_CTC1
, && case_sem_INSN_CTC1
},
125 { IQ2000BF_INSN_CTC2
, && case_sem_INSN_CTC2
},
126 { IQ2000BF_INSN_CTC3
, && case_sem_INSN_CTC3
},
127 { IQ2000BF_INSN_JCR
, && case_sem_INSN_JCR
},
128 { IQ2000BF_INSN_LUC32
, && case_sem_INSN_LUC32
},
129 { IQ2000BF_INSN_LUC32L
, && case_sem_INSN_LUC32L
},
130 { IQ2000BF_INSN_LUC64
, && case_sem_INSN_LUC64
},
131 { IQ2000BF_INSN_LUC64L
, && case_sem_INSN_LUC64L
},
132 { IQ2000BF_INSN_LUK
, && case_sem_INSN_LUK
},
133 { IQ2000BF_INSN_LULCK
, && case_sem_INSN_LULCK
},
134 { IQ2000BF_INSN_LUM32
, && case_sem_INSN_LUM32
},
135 { IQ2000BF_INSN_LUM32L
, && case_sem_INSN_LUM32L
},
136 { IQ2000BF_INSN_LUM64
, && case_sem_INSN_LUM64
},
137 { IQ2000BF_INSN_LUM64L
, && case_sem_INSN_LUM64L
},
138 { IQ2000BF_INSN_LUR
, && case_sem_INSN_LUR
},
139 { IQ2000BF_INSN_LURL
, && case_sem_INSN_LURL
},
140 { IQ2000BF_INSN_LUULCK
, && case_sem_INSN_LUULCK
},
141 { IQ2000BF_INSN_MFC0
, && case_sem_INSN_MFC0
},
142 { IQ2000BF_INSN_MFC1
, && case_sem_INSN_MFC1
},
143 { IQ2000BF_INSN_MFC2
, && case_sem_INSN_MFC2
},
144 { IQ2000BF_INSN_MFC3
, && case_sem_INSN_MFC3
},
145 { IQ2000BF_INSN_MTC0
, && case_sem_INSN_MTC0
},
146 { IQ2000BF_INSN_MTC1
, && case_sem_INSN_MTC1
},
147 { IQ2000BF_INSN_MTC2
, && case_sem_INSN_MTC2
},
148 { IQ2000BF_INSN_MTC3
, && case_sem_INSN_MTC3
},
149 { IQ2000BF_INSN_PKRL
, && case_sem_INSN_PKRL
},
150 { IQ2000BF_INSN_PKRLR1
, && case_sem_INSN_PKRLR1
},
151 { IQ2000BF_INSN_PKRLR30
, && case_sem_INSN_PKRLR30
},
152 { IQ2000BF_INSN_RB
, && case_sem_INSN_RB
},
153 { IQ2000BF_INSN_RBR1
, && case_sem_INSN_RBR1
},
154 { IQ2000BF_INSN_RBR30
, && case_sem_INSN_RBR30
},
155 { IQ2000BF_INSN_RFE
, && case_sem_INSN_RFE
},
156 { IQ2000BF_INSN_RX
, && case_sem_INSN_RX
},
157 { IQ2000BF_INSN_RXR1
, && case_sem_INSN_RXR1
},
158 { IQ2000BF_INSN_RXR30
, && case_sem_INSN_RXR30
},
159 { IQ2000BF_INSN_SLEEP
, && case_sem_INSN_SLEEP
},
160 { IQ2000BF_INSN_SRRD
, && case_sem_INSN_SRRD
},
161 { IQ2000BF_INSN_SRRDL
, && case_sem_INSN_SRRDL
},
162 { IQ2000BF_INSN_SRULCK
, && case_sem_INSN_SRULCK
},
163 { IQ2000BF_INSN_SRWR
, && case_sem_INSN_SRWR
},
164 { IQ2000BF_INSN_SRWRU
, && case_sem_INSN_SRWRU
},
165 { IQ2000BF_INSN_TRAPQFL
, && case_sem_INSN_TRAPQFL
},
166 { IQ2000BF_INSN_TRAPQNE
, && case_sem_INSN_TRAPQNE
},
167 { IQ2000BF_INSN_TRAPREL
, && case_sem_INSN_TRAPREL
},
168 { IQ2000BF_INSN_WB
, && case_sem_INSN_WB
},
169 { IQ2000BF_INSN_WBU
, && case_sem_INSN_WBU
},
170 { IQ2000BF_INSN_WBR1
, && case_sem_INSN_WBR1
},
171 { IQ2000BF_INSN_WBR1U
, && case_sem_INSN_WBR1U
},
172 { IQ2000BF_INSN_WBR30
, && case_sem_INSN_WBR30
},
173 { IQ2000BF_INSN_WBR30U
, && case_sem_INSN_WBR30U
},
174 { IQ2000BF_INSN_WX
, && case_sem_INSN_WX
},
175 { IQ2000BF_INSN_WXU
, && case_sem_INSN_WXU
},
176 { IQ2000BF_INSN_WXR1
, && case_sem_INSN_WXR1
},
177 { IQ2000BF_INSN_WXR1U
, && case_sem_INSN_WXR1U
},
178 { IQ2000BF_INSN_WXR30
, && case_sem_INSN_WXR30
},
179 { IQ2000BF_INSN_WXR30U
, && case_sem_INSN_WXR30U
},
180 { IQ2000BF_INSN_LDW
, && case_sem_INSN_LDW
},
181 { IQ2000BF_INSN_SDW
, && case_sem_INSN_SDW
},
182 { IQ2000BF_INSN_J
, && case_sem_INSN_J
},
183 { IQ2000BF_INSN_JAL
, && case_sem_INSN_JAL
},
184 { IQ2000BF_INSN_BMB
, && case_sem_INSN_BMB
},
189 for (i
= 0; labels
[i
].label
!= 0; ++i
)
192 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_fast_lab
= labels
[i
].label
;
194 CPU_IDESC (current_cpu
) [labels
[i
].index
].sem_full_lab
= labels
[i
].label
;
199 #endif /* DEFINE_LABELS */
203 /* If hyper-fast [well not unnecessarily slow] execution is selected, turn
204 off frills like tracing and profiling. */
205 /* FIXME: A better way would be to have TRACE_RESULT check for something
206 that can cause it to be optimized out. Another way would be to emit
207 special handlers into the instruction "stream". */
211 #define TRACE_RESULT(cpu, abuf, name, type, val)
215 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
216 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
218 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
225 /* Branch to next handler without going around main loop. */
226 #define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
227 SWITCH (sem
, SEM_ARGBUF (vpc
) -> semantic
.sem_case
)
229 #else /* ! WITH_SCACHE_PBB */
231 #define NEXT(vpc) BREAK (sem)
234 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_fast_lab
)
236 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->sem_full_lab
)
239 SWITCH (sem
, SEM_ARGBUF (sc
) -> idesc
->num
)
242 #endif /* ! WITH_SCACHE_PBB */
246 CASE (sem
, INSN_X_INVALID
) : /* --invalid-- */
248 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
249 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
250 #define FLD(f) abuf->fields.fmt_empty.f
251 int UNUSED written
= 0;
252 IADDR UNUSED pc
= abuf
->addr
;
253 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
256 /* Update the recorded pc in the cpu state struct.
257 Only necessary for WITH_SCACHE case, but to avoid the
258 conditional compilation .... */
260 /* Virtual insns have zero size. Overwrite vpc with address of next insn
261 using the default-insn-bitsize spec. When executing insns in parallel
262 we may want to queue the fault and continue execution. */
263 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
264 vpc
= sim_engine_invalid_insn (current_cpu
, pc
, vpc
);
271 CASE (sem
, INSN_X_AFTER
) : /* --after-- */
273 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
274 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
275 #define FLD(f) abuf->fields.fmt_empty.f
276 int UNUSED written
= 0;
277 IADDR UNUSED pc
= abuf
->addr
;
278 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
281 #if WITH_SCACHE_PBB_IQ2000BF
282 iq2000bf_pbb_after (current_cpu
, sem_arg
);
290 CASE (sem
, INSN_X_BEFORE
) : /* --before-- */
292 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
293 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
294 #define FLD(f) abuf->fields.fmt_empty.f
295 int UNUSED written
= 0;
296 IADDR UNUSED pc
= abuf
->addr
;
297 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
300 #if WITH_SCACHE_PBB_IQ2000BF
301 iq2000bf_pbb_before (current_cpu
, sem_arg
);
309 CASE (sem
, INSN_X_CTI_CHAIN
) : /* --cti-chain-- */
311 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
312 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
313 #define FLD(f) abuf->fields.fmt_empty.f
314 int UNUSED written
= 0;
315 IADDR UNUSED pc
= abuf
->addr
;
316 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
319 #if WITH_SCACHE_PBB_IQ2000BF
321 vpc
= iq2000bf_pbb_cti_chain (current_cpu
, sem_arg
,
322 pbb_br_type
, pbb_br_npc
);
325 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
326 vpc
= iq2000bf_pbb_cti_chain (current_cpu
, sem_arg
,
327 CPU_PBB_BR_TYPE (current_cpu
),
328 CPU_PBB_BR_NPC (current_cpu
));
337 CASE (sem
, INSN_X_CHAIN
) : /* --chain-- */
339 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
340 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
341 #define FLD(f) abuf->fields.fmt_empty.f
342 int UNUSED written
= 0;
343 IADDR UNUSED pc
= abuf
->addr
;
344 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
347 #if WITH_SCACHE_PBB_IQ2000BF
348 vpc
= iq2000bf_pbb_chain (current_cpu
, sem_arg
);
359 CASE (sem
, INSN_X_BEGIN
) : /* --begin-- */
361 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
362 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
363 #define FLD(f) abuf->fields.fmt_empty.f
364 int UNUSED written
= 0;
365 IADDR UNUSED pc
= abuf
->addr
;
366 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 0);
369 #if WITH_SCACHE_PBB_IQ2000BF
370 #if defined DEFINE_SWITCH || defined FAST_P
371 /* In the switch case FAST_P is a constant, allowing several optimizations
372 in any called inline functions. */
373 vpc
= iq2000bf_pbb_begin (current_cpu
, FAST_P
);
375 #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */
376 vpc
= iq2000bf_pbb_begin (current_cpu
, STATE_RUN_FAST_P (CPU_STATE (current_cpu
)));
378 vpc
= iq2000bf_pbb_begin (current_cpu
, 0);
388 CASE (sem
, INSN_ADD
) : /* add $rd,$rs,$rt */
390 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
391 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
392 #define FLD(f) abuf->fields.sfmt_mrgb.f
393 int UNUSED written
= 0;
394 IADDR UNUSED pc
= abuf
->addr
;
395 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
398 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
399 SET_H_GR (FLD (f_rd
), opval
);
400 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
407 CASE (sem
, INSN_ADDI
) : /* addi $rt,$rs,$lo16 */
409 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
410 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
411 #define FLD(f) abuf->fields.sfmt_addi.f
412 int UNUSED written
= 0;
413 IADDR UNUSED pc
= abuf
->addr
;
414 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
417 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))));
418 SET_H_GR (FLD (f_rt
), opval
);
419 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
426 CASE (sem
, INSN_ADDIU
) : /* addiu $rt,$rs,$lo16 */
428 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
429 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
430 #define FLD(f) abuf->fields.sfmt_addi.f
431 int UNUSED written
= 0;
432 IADDR UNUSED pc
= abuf
->addr
;
433 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
436 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))));
437 SET_H_GR (FLD (f_rt
), opval
);
438 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
445 CASE (sem
, INSN_ADDU
) : /* addu $rd,$rs,$rt */
447 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
448 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
449 #define FLD(f) abuf->fields.sfmt_mrgb.f
450 int UNUSED written
= 0;
451 IADDR UNUSED pc
= abuf
->addr
;
452 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
455 SI opval
= ADDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
456 SET_H_GR (FLD (f_rd
), opval
);
457 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
464 CASE (sem
, INSN_ADO16
) : /* ado16 $rd,$rs,$rt */
466 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
467 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
468 #define FLD(f) abuf->fields.sfmt_mrgb.f
469 int UNUSED written
= 0;
470 IADDR UNUSED pc
= abuf
->addr
;
471 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
476 tmp_low
= ADDHI (ANDHI (GET_H_GR (FLD (f_rs
)), 65535), ANDHI (GET_H_GR (FLD (f_rt
)), 65535));
477 tmp_high
= ADDHI (SRLSI (GET_H_GR (FLD (f_rs
)), 16), SRLSI (GET_H_GR (FLD (f_rt
)), 16));
479 SI opval
= ORSI (SLLSI (tmp_high
, 16), tmp_low
);
480 SET_H_GR (FLD (f_rd
), opval
);
481 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
489 CASE (sem
, INSN_AND
) : /* and $rd,$rs,$rt */
491 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
492 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
493 #define FLD(f) abuf->fields.sfmt_mrgb.f
494 int UNUSED written
= 0;
495 IADDR UNUSED pc
= abuf
->addr
;
496 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
499 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
500 SET_H_GR (FLD (f_rd
), opval
);
501 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
508 CASE (sem
, INSN_ANDI
) : /* andi $rt,$rs,$lo16 */
510 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
511 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
512 #define FLD(f) abuf->fields.sfmt_addi.f
513 int UNUSED written
= 0;
514 IADDR UNUSED pc
= abuf
->addr
;
515 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
518 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
519 SET_H_GR (FLD (f_rt
), opval
);
520 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
527 CASE (sem
, INSN_ANDOI
) : /* andoi $rt,$rs,$lo16 */
529 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
530 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
531 #define FLD(f) abuf->fields.sfmt_addi.f
532 int UNUSED written
= 0;
533 IADDR UNUSED pc
= abuf
->addr
;
534 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
537 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ORSI (0xffff0000, EXTHISI (TRUNCSIHI (FLD (f_imm
)))));
538 SET_H_GR (FLD (f_rt
), opval
);
539 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
546 CASE (sem
, INSN_NOR
) : /* nor $rd,$rs,$rt */
548 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
549 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
550 #define FLD(f) abuf->fields.sfmt_mrgb.f
551 int UNUSED written
= 0;
552 IADDR UNUSED pc
= abuf
->addr
;
553 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
556 SI opval
= INVSI (ORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
))));
557 SET_H_GR (FLD (f_rd
), opval
);
558 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
565 CASE (sem
, INSN_OR
) : /* or $rd,$rs,$rt */
567 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
568 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
569 #define FLD(f) abuf->fields.sfmt_mrgb.f
570 int UNUSED written
= 0;
571 IADDR UNUSED pc
= abuf
->addr
;
572 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
575 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
576 SET_H_GR (FLD (f_rd
), opval
);
577 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
584 CASE (sem
, INSN_ORI
) : /* ori $rt,$rs,$lo16 */
586 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
587 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
588 #define FLD(f) abuf->fields.sfmt_addi.f
589 int UNUSED written
= 0;
590 IADDR UNUSED pc
= abuf
->addr
;
591 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
594 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
595 SET_H_GR (FLD (f_rt
), opval
);
596 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
603 CASE (sem
, INSN_RAM
) : /* ram $rd,$rt,$shamt,$maskl,$maskr */
605 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
606 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
607 #define FLD(f) abuf->fields.sfmt_ram.f
608 int UNUSED written
= 0;
609 IADDR UNUSED pc
= abuf
->addr
;
610 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
614 SI opval
= RORSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
615 SET_H_GR (FLD (f_rd
), opval
);
616 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
619 SI opval
= ANDSI (GET_H_GR (FLD (f_rd
)), SRLSI (0xffffffff, FLD (f_maskl
)));
620 SET_H_GR (FLD (f_rd
), opval
);
621 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
624 SI opval
= ANDSI (GET_H_GR (FLD (f_rd
)), SLLSI (0xffffffff, FLD (f_rs
)));
625 SET_H_GR (FLD (f_rd
), opval
);
626 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
634 CASE (sem
, INSN_SLL
) : /* sll $rd,$rt,$shamt */
636 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
637 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
638 #define FLD(f) abuf->fields.sfmt_ram.f
639 int UNUSED written
= 0;
640 IADDR UNUSED pc
= abuf
->addr
;
641 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
644 SI opval
= SLLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
645 SET_H_GR (FLD (f_rd
), opval
);
646 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
653 CASE (sem
, INSN_SLLV
) : /* sllv $rd,$rt,$rs */
655 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
656 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
657 #define FLD(f) abuf->fields.sfmt_mrgb.f
658 int UNUSED written
= 0;
659 IADDR UNUSED pc
= abuf
->addr
;
660 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
663 SI opval
= SLLSI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
664 SET_H_GR (FLD (f_rd
), opval
);
665 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
672 CASE (sem
, INSN_SLMV
) : /* slmv $rd,$rt,$rs,$shamt */
674 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
675 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
676 #define FLD(f) abuf->fields.sfmt_ram.f
677 int UNUSED written
= 0;
678 IADDR UNUSED pc
= abuf
->addr
;
679 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
682 SI opval
= ANDSI (SLLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
)), SRLSI (0xffffffff, GET_H_GR (FLD (f_rs
))));
683 SET_H_GR (FLD (f_rd
), opval
);
684 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
691 CASE (sem
, INSN_SLT
) : /* slt $rd,$rs,$rt */
693 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
694 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
695 #define FLD(f) abuf->fields.sfmt_mrgb.f
696 int UNUSED written
= 0;
697 IADDR UNUSED pc
= abuf
->addr
;
698 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
700 if (LTSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
703 SET_H_GR (FLD (f_rd
), opval
);
705 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
710 SET_H_GR (FLD (f_rd
), opval
);
712 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
716 abuf
->written
= written
;
721 CASE (sem
, INSN_SLTI
) : /* slti $rt,$rs,$imm */
723 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
724 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
725 #define FLD(f) abuf->fields.sfmt_addi.f
726 int UNUSED written
= 0;
727 IADDR UNUSED pc
= abuf
->addr
;
728 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
730 if (LTSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))) {
733 SET_H_GR (FLD (f_rt
), opval
);
735 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
740 SET_H_GR (FLD (f_rt
), opval
);
742 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
746 abuf
->written
= written
;
751 CASE (sem
, INSN_SLTIU
) : /* sltiu $rt,$rs,$imm */
753 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
754 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
755 #define FLD(f) abuf->fields.sfmt_addi.f
756 int UNUSED written
= 0;
757 IADDR UNUSED pc
= abuf
->addr
;
758 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
760 if (LTUSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))) {
763 SET_H_GR (FLD (f_rt
), opval
);
765 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
770 SET_H_GR (FLD (f_rt
), opval
);
772 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
776 abuf
->written
= written
;
781 CASE (sem
, INSN_SLTU
) : /* sltu $rd,$rs,$rt */
783 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
784 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
785 #define FLD(f) abuf->fields.sfmt_mrgb.f
786 int UNUSED written
= 0;
787 IADDR UNUSED pc
= abuf
->addr
;
788 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
790 if (LTUSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
793 SET_H_GR (FLD (f_rd
), opval
);
795 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
800 SET_H_GR (FLD (f_rd
), opval
);
802 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
806 abuf
->written
= written
;
811 CASE (sem
, INSN_SRA
) : /* sra $rd,$rt,$shamt */
813 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
814 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
815 #define FLD(f) abuf->fields.sfmt_ram.f
816 int UNUSED written
= 0;
817 IADDR UNUSED pc
= abuf
->addr
;
818 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
821 SI opval
= SRASI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
822 SET_H_GR (FLD (f_rd
), opval
);
823 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
830 CASE (sem
, INSN_SRAV
) : /* srav $rd,$rt,$rs */
832 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
833 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
834 #define FLD(f) abuf->fields.sfmt_mrgb.f
835 int UNUSED written
= 0;
836 IADDR UNUSED pc
= abuf
->addr
;
837 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
840 SI opval
= SRASI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
841 SET_H_GR (FLD (f_rd
), opval
);
842 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
849 CASE (sem
, INSN_SRL
) : /* srl $rd,$rt,$shamt */
851 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
852 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
853 #define FLD(f) abuf->fields.sfmt_ram.f
854 int UNUSED written
= 0;
855 IADDR UNUSED pc
= abuf
->addr
;
856 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
859 SI opval
= SRLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
));
860 SET_H_GR (FLD (f_rd
), opval
);
861 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
868 CASE (sem
, INSN_SRLV
) : /* srlv $rd,$rt,$rs */
870 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
871 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
872 #define FLD(f) abuf->fields.sfmt_mrgb.f
873 int UNUSED written
= 0;
874 IADDR UNUSED pc
= abuf
->addr
;
875 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
878 SI opval
= SRLSI (GET_H_GR (FLD (f_rt
)), ANDSI (GET_H_GR (FLD (f_rs
)), 31));
879 SET_H_GR (FLD (f_rd
), opval
);
880 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
887 CASE (sem
, INSN_SRMV
) : /* srmv $rd,$rt,$rs,$shamt */
889 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
890 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
891 #define FLD(f) abuf->fields.sfmt_ram.f
892 int UNUSED written
= 0;
893 IADDR UNUSED pc
= abuf
->addr
;
894 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
897 SI opval
= ANDSI (SRLSI (GET_H_GR (FLD (f_rt
)), FLD (f_shamt
)), SLLSI (0xffffffff, GET_H_GR (FLD (f_rs
))));
898 SET_H_GR (FLD (f_rd
), opval
);
899 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
906 CASE (sem
, INSN_SUB
) : /* sub $rd,$rs,$rt */
908 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
909 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
910 #define FLD(f) abuf->fields.sfmt_mrgb.f
911 int UNUSED written
= 0;
912 IADDR UNUSED pc
= abuf
->addr
;
913 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
916 SI opval
= SUBSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
917 SET_H_GR (FLD (f_rd
), opval
);
918 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
925 CASE (sem
, INSN_SUBU
) : /* subu $rd,$rs,$rt */
927 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
928 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
929 #define FLD(f) abuf->fields.sfmt_mrgb.f
930 int UNUSED written
= 0;
931 IADDR UNUSED pc
= abuf
->addr
;
932 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
935 SI opval
= SUBSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
936 SET_H_GR (FLD (f_rd
), opval
);
937 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
944 CASE (sem
, INSN_XOR
) : /* xor $rd,$rs,$rt */
946 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
947 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
948 #define FLD(f) abuf->fields.sfmt_mrgb.f
949 int UNUSED written
= 0;
950 IADDR UNUSED pc
= abuf
->addr
;
951 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
954 SI opval
= XORSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)));
955 SET_H_GR (FLD (f_rd
), opval
);
956 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
963 CASE (sem
, INSN_XORI
) : /* xori $rt,$rs,$lo16 */
965 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
966 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
967 #define FLD(f) abuf->fields.sfmt_addi.f
968 int UNUSED written
= 0;
969 IADDR UNUSED pc
= abuf
->addr
;
970 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
973 SI opval
= XORSI (GET_H_GR (FLD (f_rs
)), ZEXTSISI (FLD (f_imm
)));
974 SET_H_GR (FLD (f_rt
), opval
);
975 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
982 CASE (sem
, INSN_BBI
) : /* bbi $rs($bitnum),$offset */
984 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
985 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
986 #define FLD(f) abuf->fields.sfmt_bbi.f
987 int UNUSED written
= 0;
988 IADDR UNUSED pc
= abuf
->addr
;
990 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
992 if (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, FLD (f_rt
)))) {
995 USI opval
= FLD (i_offset
);
996 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
998 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1003 abuf
->written
= written
;
1004 SEM_BRANCH_FINI (vpc
);
1009 CASE (sem
, INSN_BBIN
) : /* bbin $rs($bitnum),$offset */
1011 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1012 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1013 #define FLD(f) abuf->fields.sfmt_bbi.f
1014 int UNUSED written
= 0;
1015 IADDR UNUSED pc
= abuf
->addr
;
1017 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1019 if (NOTSI (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, FLD (f_rt
))))) {
1022 USI opval
= FLD (i_offset
);
1023 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1024 written
|= (1 << 3);
1025 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1030 abuf
->written
= written
;
1031 SEM_BRANCH_FINI (vpc
);
1036 CASE (sem
, INSN_BBV
) : /* bbv $rs,$rt,$offset */
1038 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1039 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1040 #define FLD(f) abuf->fields.sfmt_bbi.f
1041 int UNUSED written
= 0;
1042 IADDR UNUSED pc
= abuf
->addr
;
1044 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1046 if (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, ANDSI (GET_H_GR (FLD (f_rt
)), 31)))) {
1049 USI opval
= FLD (i_offset
);
1050 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1051 written
|= (1 << 3);
1052 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1057 abuf
->written
= written
;
1058 SEM_BRANCH_FINI (vpc
);
1063 CASE (sem
, INSN_BBVN
) : /* bbvn $rs,$rt,$offset */
1065 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1066 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1067 #define FLD(f) abuf->fields.sfmt_bbi.f
1068 int UNUSED written
= 0;
1069 IADDR UNUSED pc
= abuf
->addr
;
1071 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1073 if (NOTSI (ANDSI (GET_H_GR (FLD (f_rs
)), SLLSI (1, ANDSI (GET_H_GR (FLD (f_rt
)), 31))))) {
1076 USI opval
= FLD (i_offset
);
1077 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1078 written
|= (1 << 3);
1079 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1084 abuf
->written
= written
;
1085 SEM_BRANCH_FINI (vpc
);
1090 CASE (sem
, INSN_BEQ
) : /* beq $rs,$rt,$offset */
1092 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1093 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1094 #define FLD(f) abuf->fields.sfmt_bbi.f
1095 int UNUSED written
= 0;
1096 IADDR UNUSED pc
= abuf
->addr
;
1098 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1100 if (EQSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1103 USI opval
= FLD (i_offset
);
1104 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1105 written
|= (1 << 3);
1106 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1111 abuf
->written
= written
;
1112 SEM_BRANCH_FINI (vpc
);
1117 CASE (sem
, INSN_BEQL
) : /* beql $rs,$rt,$offset */
1119 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1120 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1121 #define FLD(f) abuf->fields.sfmt_bbi.f
1122 int UNUSED written
= 0;
1123 IADDR UNUSED pc
= abuf
->addr
;
1125 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1127 if (EQSI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1130 USI opval
= FLD (i_offset
);
1131 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1132 written
|= (1 << 3);
1133 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1138 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1141 abuf
->written
= written
;
1142 SEM_BRANCH_FINI (vpc
);
1147 CASE (sem
, INSN_BGEZ
) : /* bgez $rs,$offset */
1149 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1150 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1151 #define FLD(f) abuf->fields.sfmt_bbi.f
1152 int UNUSED written
= 0;
1153 IADDR UNUSED pc
= abuf
->addr
;
1155 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1157 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1160 USI opval
= FLD (i_offset
);
1161 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1162 written
|= (1 << 2);
1163 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1168 abuf
->written
= written
;
1169 SEM_BRANCH_FINI (vpc
);
1174 CASE (sem
, INSN_BGEZAL
) : /* bgezal $rs,$offset */
1176 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1177 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1178 #define FLD(f) abuf->fields.sfmt_bbi.f
1179 int UNUSED written
= 0;
1180 IADDR UNUSED pc
= abuf
->addr
;
1182 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1184 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1187 SI opval
= ADDSI (pc
, 8);
1188 SET_H_GR (((UINT
) 31), opval
);
1189 written
|= (1 << 3);
1190 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1194 USI opval
= FLD (i_offset
);
1195 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1196 written
|= (1 << 4);
1197 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1203 abuf
->written
= written
;
1204 SEM_BRANCH_FINI (vpc
);
1209 CASE (sem
, INSN_BGEZALL
) : /* bgezall $rs,$offset */
1211 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1212 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1213 #define FLD(f) abuf->fields.sfmt_bbi.f
1214 int UNUSED written
= 0;
1215 IADDR UNUSED pc
= abuf
->addr
;
1217 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1219 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1222 SI opval
= ADDSI (pc
, 8);
1223 SET_H_GR (((UINT
) 31), opval
);
1224 written
|= (1 << 3);
1225 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1229 USI opval
= FLD (i_offset
);
1230 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1231 written
|= (1 << 4);
1232 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1238 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1241 abuf
->written
= written
;
1242 SEM_BRANCH_FINI (vpc
);
1247 CASE (sem
, INSN_BGEZL
) : /* bgezl $rs,$offset */
1249 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1250 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1251 #define FLD(f) abuf->fields.sfmt_bbi.f
1252 int UNUSED written
= 0;
1253 IADDR UNUSED pc
= abuf
->addr
;
1255 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1257 if (GESI (GET_H_GR (FLD (f_rs
)), 0)) {
1260 USI opval
= FLD (i_offset
);
1261 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1262 written
|= (1 << 2);
1263 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1268 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1271 abuf
->written
= written
;
1272 SEM_BRANCH_FINI (vpc
);
1277 CASE (sem
, INSN_BLTZ
) : /* bltz $rs,$offset */
1279 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1280 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1281 #define FLD(f) abuf->fields.sfmt_bbi.f
1282 int UNUSED written
= 0;
1283 IADDR UNUSED pc
= abuf
->addr
;
1285 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1287 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1290 USI opval
= FLD (i_offset
);
1291 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1292 written
|= (1 << 2);
1293 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1298 abuf
->written
= written
;
1299 SEM_BRANCH_FINI (vpc
);
1304 CASE (sem
, INSN_BLTZL
) : /* bltzl $rs,$offset */
1306 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1307 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1308 #define FLD(f) abuf->fields.sfmt_bbi.f
1309 int UNUSED written
= 0;
1310 IADDR UNUSED pc
= abuf
->addr
;
1312 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1314 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1317 USI opval
= FLD (i_offset
);
1318 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1319 written
|= (1 << 2);
1320 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1325 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1328 abuf
->written
= written
;
1329 SEM_BRANCH_FINI (vpc
);
1334 CASE (sem
, INSN_BLTZAL
) : /* bltzal $rs,$offset */
1336 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1337 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1338 #define FLD(f) abuf->fields.sfmt_bbi.f
1339 int UNUSED written
= 0;
1340 IADDR UNUSED pc
= abuf
->addr
;
1342 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1344 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1347 SI opval
= ADDSI (pc
, 8);
1348 SET_H_GR (((UINT
) 31), opval
);
1349 written
|= (1 << 3);
1350 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1354 USI opval
= FLD (i_offset
);
1355 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1356 written
|= (1 << 4);
1357 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1363 abuf
->written
= written
;
1364 SEM_BRANCH_FINI (vpc
);
1369 CASE (sem
, INSN_BLTZALL
) : /* bltzall $rs,$offset */
1371 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1372 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1373 #define FLD(f) abuf->fields.sfmt_bbi.f
1374 int UNUSED written
= 0;
1375 IADDR UNUSED pc
= abuf
->addr
;
1377 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1379 if (LTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1382 SI opval
= ADDSI (pc
, 8);
1383 SET_H_GR (((UINT
) 31), opval
);
1384 written
|= (1 << 3);
1385 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1389 USI opval
= FLD (i_offset
);
1390 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1391 written
|= (1 << 4);
1392 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1398 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1401 abuf
->written
= written
;
1402 SEM_BRANCH_FINI (vpc
);
1407 CASE (sem
, INSN_BMB0
) : /* bmb0 $rs,$rt,$offset */
1409 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1410 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1411 #define FLD(f) abuf->fields.sfmt_bbi.f
1412 int UNUSED written
= 0;
1413 IADDR UNUSED pc
= abuf
->addr
;
1415 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1417 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 255), ANDSI (GET_H_GR (FLD (f_rt
)), 255))) {
1420 USI opval
= FLD (i_offset
);
1421 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1422 written
|= (1 << 3);
1423 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1428 abuf
->written
= written
;
1429 SEM_BRANCH_FINI (vpc
);
1434 CASE (sem
, INSN_BMB1
) : /* bmb1 $rs,$rt,$offset */
1436 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1437 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1438 #define FLD(f) abuf->fields.sfmt_bbi.f
1439 int UNUSED written
= 0;
1440 IADDR UNUSED pc
= abuf
->addr
;
1442 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1444 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 65280), ANDSI (GET_H_GR (FLD (f_rt
)), 65280))) {
1447 USI opval
= FLD (i_offset
);
1448 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1449 written
|= (1 << 3);
1450 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1455 abuf
->written
= written
;
1456 SEM_BRANCH_FINI (vpc
);
1461 CASE (sem
, INSN_BMB2
) : /* bmb2 $rs,$rt,$offset */
1463 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1464 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1465 #define FLD(f) abuf->fields.sfmt_bbi.f
1466 int UNUSED written
= 0;
1467 IADDR UNUSED pc
= abuf
->addr
;
1469 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1471 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 16711680), ANDSI (GET_H_GR (FLD (f_rt
)), 16711680))) {
1474 USI opval
= FLD (i_offset
);
1475 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1476 written
|= (1 << 3);
1477 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1482 abuf
->written
= written
;
1483 SEM_BRANCH_FINI (vpc
);
1488 CASE (sem
, INSN_BMB3
) : /* bmb3 $rs,$rt,$offset */
1490 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1491 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1492 #define FLD(f) abuf->fields.sfmt_bbi.f
1493 int UNUSED written
= 0;
1494 IADDR UNUSED pc
= abuf
->addr
;
1496 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1498 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000), ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000))) {
1501 USI opval
= FLD (i_offset
);
1502 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1503 written
|= (1 << 3);
1504 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1509 abuf
->written
= written
;
1510 SEM_BRANCH_FINI (vpc
);
1515 CASE (sem
, INSN_BNE
) : /* bne $rs,$rt,$offset */
1517 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1518 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1519 #define FLD(f) abuf->fields.sfmt_bbi.f
1520 int UNUSED written
= 0;
1521 IADDR UNUSED pc
= abuf
->addr
;
1523 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1525 if (NESI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1528 USI opval
= FLD (i_offset
);
1529 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1530 written
|= (1 << 3);
1531 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1536 abuf
->written
= written
;
1537 SEM_BRANCH_FINI (vpc
);
1542 CASE (sem
, INSN_BNEL
) : /* bnel $rs,$rt,$offset */
1544 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1545 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1546 #define FLD(f) abuf->fields.sfmt_bbi.f
1547 int UNUSED written
= 0;
1548 IADDR UNUSED pc
= abuf
->addr
;
1550 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1552 if (NESI (GET_H_GR (FLD (f_rs
)), GET_H_GR (FLD (f_rt
)))) {
1555 USI opval
= FLD (i_offset
);
1556 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1557 written
|= (1 << 3);
1558 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1563 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1566 abuf
->written
= written
;
1567 SEM_BRANCH_FINI (vpc
);
1572 CASE (sem
, INSN_JALR
) : /* jalr $rd,$rs */
1574 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1575 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1576 #define FLD(f) abuf->fields.sfmt_mrgb.f
1577 int UNUSED written
= 0;
1578 IADDR UNUSED pc
= abuf
->addr
;
1580 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1585 SI opval
= ADDSI (pc
, 8);
1586 SET_H_GR (FLD (f_rd
), opval
);
1587 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1590 USI opval
= GET_H_GR (FLD (f_rs
));
1591 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1592 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1597 SEM_BRANCH_FINI (vpc
);
1602 CASE (sem
, INSN_JR
) : /* jr $rs */
1604 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1605 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1606 #define FLD(f) abuf->fields.sfmt_bbi.f
1607 int UNUSED written
= 0;
1608 IADDR UNUSED pc
= abuf
->addr
;
1610 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1614 USI opval
= GET_H_GR (FLD (f_rs
));
1615 SEM_BRANCH_VIA_ADDR (current_cpu
, sem_arg
, opval
, vpc
);
1616 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1620 SEM_BRANCH_FINI (vpc
);
1625 CASE (sem
, INSN_LB
) : /* lb $rt,$lo16($base) */
1627 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1628 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1629 #define FLD(f) abuf->fields.sfmt_addi.f
1630 int UNUSED written
= 0;
1631 IADDR UNUSED pc
= abuf
->addr
;
1632 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1635 SI opval
= EXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1636 SET_H_GR (FLD (f_rt
), opval
);
1637 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1644 CASE (sem
, INSN_LBU
) : /* lbu $rt,$lo16($base) */
1646 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1647 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1648 #define FLD(f) abuf->fields.sfmt_addi.f
1649 int UNUSED written
= 0;
1650 IADDR UNUSED pc
= abuf
->addr
;
1651 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1654 SI opval
= ZEXTQISI (GETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1655 SET_H_GR (FLD (f_rt
), opval
);
1656 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1663 CASE (sem
, INSN_LH
) : /* lh $rt,$lo16($base) */
1665 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1666 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1667 #define FLD(f) abuf->fields.sfmt_addi.f
1668 int UNUSED written
= 0;
1669 IADDR UNUSED pc
= abuf
->addr
;
1670 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1673 SI opval
= EXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1674 SET_H_GR (FLD (f_rt
), opval
);
1675 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1682 CASE (sem
, INSN_LHU
) : /* lhu $rt,$lo16($base) */
1684 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1685 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1686 #define FLD(f) abuf->fields.sfmt_addi.f
1687 int UNUSED written
= 0;
1688 IADDR UNUSED pc
= abuf
->addr
;
1689 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1692 SI opval
= ZEXTHISI (GETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
))))));
1693 SET_H_GR (FLD (f_rt
), opval
);
1694 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1701 CASE (sem
, INSN_LUI
) : /* lui $rt,$hi16 */
1703 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1704 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1705 #define FLD(f) abuf->fields.sfmt_addi.f
1706 int UNUSED written
= 0;
1707 IADDR UNUSED pc
= abuf
->addr
;
1708 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1711 SI opval
= SLLSI (FLD (f_imm
), 16);
1712 SET_H_GR (FLD (f_rt
), opval
);
1713 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1720 CASE (sem
, INSN_LW
) : /* lw $rt,$lo16($base) */
1722 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1723 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1724 #define FLD(f) abuf->fields.sfmt_addi.f
1725 int UNUSED written
= 0;
1726 IADDR UNUSED pc
= abuf
->addr
;
1727 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1730 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))));
1731 SET_H_GR (FLD (f_rt
), opval
);
1732 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1739 CASE (sem
, INSN_SB
) : /* sb $rt,$lo16($base) */
1741 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1742 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1743 #define FLD(f) abuf->fields.sfmt_addi.f
1744 int UNUSED written
= 0;
1745 IADDR UNUSED pc
= abuf
->addr
;
1746 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1749 QI opval
= ANDQI (GET_H_GR (FLD (f_rt
)), 255);
1750 SETMEMQI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1751 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1758 CASE (sem
, INSN_SH
) : /* sh $rt,$lo16($base) */
1760 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1761 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1762 #define FLD(f) abuf->fields.sfmt_addi.f
1763 int UNUSED written
= 0;
1764 IADDR UNUSED pc
= abuf
->addr
;
1765 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1768 HI opval
= ANDHI (GET_H_GR (FLD (f_rt
)), 65535);
1769 SETMEMHI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1770 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1777 CASE (sem
, INSN_SW
) : /* sw $rt,$lo16($base) */
1779 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1780 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1781 #define FLD(f) abuf->fields.sfmt_addi.f
1782 int UNUSED written
= 0;
1783 IADDR UNUSED pc
= abuf
->addr
;
1784 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1787 SI opval
= GET_H_GR (FLD (f_rt
));
1788 SETMEMSI (current_cpu
, pc
, ADDSI (GET_H_GR (FLD (f_rs
)), EXTHISI (TRUNCSIHI (FLD (f_imm
)))), opval
);
1789 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
1796 CASE (sem
, INSN_BREAK
) : /* break */
1798 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1799 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1800 #define FLD(f) abuf->fields.fmt_empty.f
1801 int UNUSED written
= 0;
1802 IADDR UNUSED pc
= abuf
->addr
;
1803 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1805 do_break (current_cpu
, pc
);
1811 CASE (sem
, INSN_SYSCALL
) : /* syscall */
1813 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1814 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1815 #define FLD(f) abuf->fields.fmt_empty.f
1816 int UNUSED written
= 0;
1817 IADDR UNUSED pc
= abuf
->addr
;
1818 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1820 do_syscall (current_cpu
);
1826 CASE (sem
, INSN_ANDOUI
) : /* andoui $rt,$rs,$hi16 */
1828 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1829 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1830 #define FLD(f) abuf->fields.sfmt_addi.f
1831 int UNUSED written
= 0;
1832 IADDR UNUSED pc
= abuf
->addr
;
1833 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1836 SI opval
= ANDSI (GET_H_GR (FLD (f_rs
)), ORSI (SLLSI (FLD (f_imm
), 16), 65535));
1837 SET_H_GR (FLD (f_rt
), opval
);
1838 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1845 CASE (sem
, INSN_ORUI
) : /* orui $rt,$rs,$hi16 */
1847 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1848 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1849 #define FLD(f) abuf->fields.sfmt_addi.f
1850 int UNUSED written
= 0;
1851 IADDR UNUSED pc
= abuf
->addr
;
1852 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1855 SI opval
= ORSI (GET_H_GR (FLD (f_rs
)), SLLSI (FLD (f_imm
), 16));
1856 SET_H_GR (FLD (f_rt
), opval
);
1857 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
1864 CASE (sem
, INSN_BGTZ
) : /* bgtz $rs,$offset */
1866 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1867 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1868 #define FLD(f) abuf->fields.sfmt_bbi.f
1869 int UNUSED written
= 0;
1870 IADDR UNUSED pc
= abuf
->addr
;
1872 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1874 if (GTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1877 USI opval
= FLD (i_offset
);
1878 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1879 written
|= (1 << 2);
1880 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1885 abuf
->written
= written
;
1886 SEM_BRANCH_FINI (vpc
);
1891 CASE (sem
, INSN_BGTZL
) : /* bgtzl $rs,$offset */
1893 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1894 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1895 #define FLD(f) abuf->fields.sfmt_bbi.f
1896 int UNUSED written
= 0;
1897 IADDR UNUSED pc
= abuf
->addr
;
1899 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1901 if (GTSI (GET_H_GR (FLD (f_rs
)), 0)) {
1904 USI opval
= FLD (i_offset
);
1905 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1906 written
|= (1 << 2);
1907 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1912 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1915 abuf
->written
= written
;
1916 SEM_BRANCH_FINI (vpc
);
1921 CASE (sem
, INSN_BLEZ
) : /* blez $rs,$offset */
1923 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1924 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1925 #define FLD(f) abuf->fields.sfmt_bbi.f
1926 int UNUSED written
= 0;
1927 IADDR UNUSED pc
= abuf
->addr
;
1929 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1931 if (LESI (GET_H_GR (FLD (f_rs
)), 0)) {
1934 USI opval
= FLD (i_offset
);
1935 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1936 written
|= (1 << 2);
1937 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1942 abuf
->written
= written
;
1943 SEM_BRANCH_FINI (vpc
);
1948 CASE (sem
, INSN_BLEZL
) : /* blezl $rs,$offset */
1950 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1951 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1952 #define FLD(f) abuf->fields.sfmt_bbi.f
1953 int UNUSED written
= 0;
1954 IADDR UNUSED pc
= abuf
->addr
;
1956 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1958 if (LESI (GET_H_GR (FLD (f_rs
)), 0)) {
1961 USI opval
= FLD (i_offset
);
1962 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
1963 written
|= (1 << 2);
1964 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
1969 SEM_SKIP_INSN (current_cpu
, sem_arg
, vpc
);
1972 abuf
->written
= written
;
1973 SEM_BRANCH_FINI (vpc
);
1978 CASE (sem
, INSN_MRGB
) : /* mrgb $rd,$rs,$rt,$mask */
1980 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
1981 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
1982 #define FLD(f) abuf->fields.sfmt_mrgb.f
1983 int UNUSED written
= 0;
1984 IADDR UNUSED pc
= abuf
->addr
;
1985 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
1989 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 0)))) {
1990 tmp_temp
= ANDSI (GET_H_GR (FLD (f_rs
)), 255);
1992 tmp_temp
= ANDSI (GET_H_GR (FLD (f_rt
)), 255);
1994 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 1)))) {
1995 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 65280));
1997 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 65280));
1999 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 2)))) {
2000 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 16711680));
2002 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 16711680));
2004 if (NOTSI (ANDSI (FLD (f_mask
), SLLSI (1, 3)))) {
2005 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000));
2007 tmp_temp
= ORSI (tmp_temp
, ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000));
2010 SI opval
= tmp_temp
;
2011 SET_H_GR (FLD (f_rd
), opval
);
2012 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
2020 CASE (sem
, INSN_BCTXT
) : /* bctxt $rs,$offset */
2022 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2023 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2024 #define FLD(f) abuf->fields.fmt_empty.f
2025 int UNUSED written
= 0;
2026 IADDR UNUSED pc
= abuf
->addr
;
2028 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2032 SEM_BRANCH_FINI (vpc
);
2037 CASE (sem
, INSN_BC0F
) : /* bc0f $offset */
2039 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2040 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2041 #define FLD(f) abuf->fields.fmt_empty.f
2042 int UNUSED written
= 0;
2043 IADDR UNUSED pc
= abuf
->addr
;
2045 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2049 SEM_BRANCH_FINI (vpc
);
2054 CASE (sem
, INSN_BC0FL
) : /* bc0fl $offset */
2056 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2057 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2058 #define FLD(f) abuf->fields.fmt_empty.f
2059 int UNUSED written
= 0;
2060 IADDR UNUSED pc
= abuf
->addr
;
2062 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2066 SEM_BRANCH_FINI (vpc
);
2071 CASE (sem
, INSN_BC3F
) : /* bc3f $offset */
2073 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2074 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2075 #define FLD(f) abuf->fields.fmt_empty.f
2076 int UNUSED written
= 0;
2077 IADDR UNUSED pc
= abuf
->addr
;
2079 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2083 SEM_BRANCH_FINI (vpc
);
2088 CASE (sem
, INSN_BC3FL
) : /* bc3fl $offset */
2090 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2091 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2092 #define FLD(f) abuf->fields.fmt_empty.f
2093 int UNUSED written
= 0;
2094 IADDR UNUSED pc
= abuf
->addr
;
2096 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2100 SEM_BRANCH_FINI (vpc
);
2105 CASE (sem
, INSN_BC0T
) : /* bc0t $offset */
2107 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2108 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2109 #define FLD(f) abuf->fields.fmt_empty.f
2110 int UNUSED written
= 0;
2111 IADDR UNUSED pc
= abuf
->addr
;
2113 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2117 SEM_BRANCH_FINI (vpc
);
2122 CASE (sem
, INSN_BC0TL
) : /* bc0tl $offset */
2124 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2125 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2126 #define FLD(f) abuf->fields.fmt_empty.f
2127 int UNUSED written
= 0;
2128 IADDR UNUSED pc
= abuf
->addr
;
2130 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2134 SEM_BRANCH_FINI (vpc
);
2139 CASE (sem
, INSN_BC3T
) : /* bc3t $offset */
2141 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2142 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2143 #define FLD(f) abuf->fields.fmt_empty.f
2144 int UNUSED written
= 0;
2145 IADDR UNUSED pc
= abuf
->addr
;
2147 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2151 SEM_BRANCH_FINI (vpc
);
2156 CASE (sem
, INSN_BC3TL
) : /* bc3tl $offset */
2158 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2159 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2160 #define FLD(f) abuf->fields.fmt_empty.f
2161 int UNUSED written
= 0;
2162 IADDR UNUSED pc
= abuf
->addr
;
2164 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2168 SEM_BRANCH_FINI (vpc
);
2173 CASE (sem
, INSN_CFC0
) : /* cfc0 $rt,$rd */
2175 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2176 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2177 #define FLD(f) abuf->fields.fmt_empty.f
2178 int UNUSED written
= 0;
2179 IADDR UNUSED pc
= abuf
->addr
;
2180 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2188 CASE (sem
, INSN_CFC1
) : /* cfc1 $rt,$rd */
2190 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2191 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2192 #define FLD(f) abuf->fields.fmt_empty.f
2193 int UNUSED written
= 0;
2194 IADDR UNUSED pc
= abuf
->addr
;
2195 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2203 CASE (sem
, INSN_CFC2
) : /* cfc2 $rt,$rd */
2205 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2206 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2207 #define FLD(f) abuf->fields.fmt_empty.f
2208 int UNUSED written
= 0;
2209 IADDR UNUSED pc
= abuf
->addr
;
2210 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2218 CASE (sem
, INSN_CFC3
) : /* cfc3 $rt,$rd */
2220 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2221 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2222 #define FLD(f) abuf->fields.fmt_empty.f
2223 int UNUSED written
= 0;
2224 IADDR UNUSED pc
= abuf
->addr
;
2225 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2233 CASE (sem
, INSN_CHKHDR
) : /* chkhdr $rd,$rt */
2235 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2236 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2237 #define FLD(f) abuf->fields.fmt_empty.f
2238 int UNUSED written
= 0;
2239 IADDR UNUSED pc
= abuf
->addr
;
2240 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2248 CASE (sem
, INSN_CTC0
) : /* ctc0 $rt,$rd */
2250 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2251 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2252 #define FLD(f) abuf->fields.fmt_empty.f
2253 int UNUSED written
= 0;
2254 IADDR UNUSED pc
= abuf
->addr
;
2255 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2263 CASE (sem
, INSN_CTC1
) : /* ctc1 $rt,$rd */
2265 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2266 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2267 #define FLD(f) abuf->fields.fmt_empty.f
2268 int UNUSED written
= 0;
2269 IADDR UNUSED pc
= abuf
->addr
;
2270 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2278 CASE (sem
, INSN_CTC2
) : /* ctc2 $rt,$rd */
2280 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2281 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2282 #define FLD(f) abuf->fields.fmt_empty.f
2283 int UNUSED written
= 0;
2284 IADDR UNUSED pc
= abuf
->addr
;
2285 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2293 CASE (sem
, INSN_CTC3
) : /* ctc3 $rt,$rd */
2295 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2296 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2297 #define FLD(f) abuf->fields.fmt_empty.f
2298 int UNUSED written
= 0;
2299 IADDR UNUSED pc
= abuf
->addr
;
2300 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2308 CASE (sem
, INSN_JCR
) : /* jcr $rs */
2310 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2311 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2312 #define FLD(f) abuf->fields.fmt_empty.f
2313 int UNUSED written
= 0;
2314 IADDR UNUSED pc
= abuf
->addr
;
2316 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2320 SEM_BRANCH_FINI (vpc
);
2325 CASE (sem
, INSN_LUC32
) : /* luc32 $rt,$rd */
2327 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2328 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2329 #define FLD(f) abuf->fields.fmt_empty.f
2330 int UNUSED written
= 0;
2331 IADDR UNUSED pc
= abuf
->addr
;
2332 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2340 CASE (sem
, INSN_LUC32L
) : /* luc32l $rt,$rd */
2342 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2343 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2344 #define FLD(f) abuf->fields.fmt_empty.f
2345 int UNUSED written
= 0;
2346 IADDR UNUSED pc
= abuf
->addr
;
2347 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2355 CASE (sem
, INSN_LUC64
) : /* luc64 $rt,$rd */
2357 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2358 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2359 #define FLD(f) abuf->fields.fmt_empty.f
2360 int UNUSED written
= 0;
2361 IADDR UNUSED pc
= abuf
->addr
;
2362 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2370 CASE (sem
, INSN_LUC64L
) : /* luc64l $rt,$rd */
2372 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2373 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2374 #define FLD(f) abuf->fields.fmt_empty.f
2375 int UNUSED written
= 0;
2376 IADDR UNUSED pc
= abuf
->addr
;
2377 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2385 CASE (sem
, INSN_LUK
) : /* luk $rt,$rd */
2387 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2388 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2389 #define FLD(f) abuf->fields.fmt_empty.f
2390 int UNUSED written
= 0;
2391 IADDR UNUSED pc
= abuf
->addr
;
2392 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2400 CASE (sem
, INSN_LULCK
) : /* lulck $rt */
2402 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2403 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2404 #define FLD(f) abuf->fields.fmt_empty.f
2405 int UNUSED written
= 0;
2406 IADDR UNUSED pc
= abuf
->addr
;
2407 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2415 CASE (sem
, INSN_LUM32
) : /* lum32 $rt,$rd */
2417 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2418 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2419 #define FLD(f) abuf->fields.fmt_empty.f
2420 int UNUSED written
= 0;
2421 IADDR UNUSED pc
= abuf
->addr
;
2422 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2430 CASE (sem
, INSN_LUM32L
) : /* lum32l $rt,$rd */
2432 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2433 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2434 #define FLD(f) abuf->fields.fmt_empty.f
2435 int UNUSED written
= 0;
2436 IADDR UNUSED pc
= abuf
->addr
;
2437 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2445 CASE (sem
, INSN_LUM64
) : /* lum64 $rt,$rd */
2447 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2448 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2449 #define FLD(f) abuf->fields.fmt_empty.f
2450 int UNUSED written
= 0;
2451 IADDR UNUSED pc
= abuf
->addr
;
2452 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2460 CASE (sem
, INSN_LUM64L
) : /* lum64l $rt,$rd */
2462 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2463 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2464 #define FLD(f) abuf->fields.fmt_empty.f
2465 int UNUSED written
= 0;
2466 IADDR UNUSED pc
= abuf
->addr
;
2467 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2475 CASE (sem
, INSN_LUR
) : /* lur $rt,$rd */
2477 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2478 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2479 #define FLD(f) abuf->fields.fmt_empty.f
2480 int UNUSED written
= 0;
2481 IADDR UNUSED pc
= abuf
->addr
;
2482 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2490 CASE (sem
, INSN_LURL
) : /* lurl $rt,$rd */
2492 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2493 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2494 #define FLD(f) abuf->fields.fmt_empty.f
2495 int UNUSED written
= 0;
2496 IADDR UNUSED pc
= abuf
->addr
;
2497 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2505 CASE (sem
, INSN_LUULCK
) : /* luulck $rt */
2507 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2508 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2509 #define FLD(f) abuf->fields.fmt_empty.f
2510 int UNUSED written
= 0;
2511 IADDR UNUSED pc
= abuf
->addr
;
2512 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2520 CASE (sem
, INSN_MFC0
) : /* mfc0 $rt,$rd */
2522 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2523 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2524 #define FLD(f) abuf->fields.fmt_empty.f
2525 int UNUSED written
= 0;
2526 IADDR UNUSED pc
= abuf
->addr
;
2527 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2535 CASE (sem
, INSN_MFC1
) : /* mfc1 $rt,$rd */
2537 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2538 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2539 #define FLD(f) abuf->fields.fmt_empty.f
2540 int UNUSED written
= 0;
2541 IADDR UNUSED pc
= abuf
->addr
;
2542 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2550 CASE (sem
, INSN_MFC2
) : /* mfc2 $rt,$rd */
2552 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2553 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2554 #define FLD(f) abuf->fields.fmt_empty.f
2555 int UNUSED written
= 0;
2556 IADDR UNUSED pc
= abuf
->addr
;
2557 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2565 CASE (sem
, INSN_MFC3
) : /* mfc3 $rt,$rd */
2567 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2568 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2569 #define FLD(f) abuf->fields.fmt_empty.f
2570 int UNUSED written
= 0;
2571 IADDR UNUSED pc
= abuf
->addr
;
2572 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2580 CASE (sem
, INSN_MTC0
) : /* mtc0 $rt,$rd */
2582 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2583 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2584 #define FLD(f) abuf->fields.fmt_empty.f
2585 int UNUSED written
= 0;
2586 IADDR UNUSED pc
= abuf
->addr
;
2587 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2595 CASE (sem
, INSN_MTC1
) : /* mtc1 $rt,$rd */
2597 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2598 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2599 #define FLD(f) abuf->fields.fmt_empty.f
2600 int UNUSED written
= 0;
2601 IADDR UNUSED pc
= abuf
->addr
;
2602 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2610 CASE (sem
, INSN_MTC2
) : /* mtc2 $rt,$rd */
2612 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2613 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2614 #define FLD(f) abuf->fields.fmt_empty.f
2615 int UNUSED written
= 0;
2616 IADDR UNUSED pc
= abuf
->addr
;
2617 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2625 CASE (sem
, INSN_MTC3
) : /* mtc3 $rt,$rd */
2627 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2628 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2629 #define FLD(f) abuf->fields.fmt_empty.f
2630 int UNUSED written
= 0;
2631 IADDR UNUSED pc
= abuf
->addr
;
2632 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2640 CASE (sem
, INSN_PKRL
) : /* pkrl $rd,$rt */
2642 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2643 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2644 #define FLD(f) abuf->fields.fmt_empty.f
2645 int UNUSED written
= 0;
2646 IADDR UNUSED pc
= abuf
->addr
;
2647 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2655 CASE (sem
, INSN_PKRLR1
) : /* pkrlr1 $rt,$index,$count */
2657 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2658 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2659 #define FLD(f) abuf->fields.fmt_empty.f
2660 int UNUSED written
= 0;
2661 IADDR UNUSED pc
= abuf
->addr
;
2662 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2670 CASE (sem
, INSN_PKRLR30
) : /* pkrlr30 $rt,$index,$count */
2672 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2673 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2674 #define FLD(f) abuf->fields.fmt_empty.f
2675 int UNUSED written
= 0;
2676 IADDR UNUSED pc
= abuf
->addr
;
2677 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2685 CASE (sem
, INSN_RB
) : /* rb $rd,$rt */
2687 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2688 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2689 #define FLD(f) abuf->fields.fmt_empty.f
2690 int UNUSED written
= 0;
2691 IADDR UNUSED pc
= abuf
->addr
;
2692 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2700 CASE (sem
, INSN_RBR1
) : /* rbr1 $rt,$index,$count */
2702 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2703 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2704 #define FLD(f) abuf->fields.fmt_empty.f
2705 int UNUSED written
= 0;
2706 IADDR UNUSED pc
= abuf
->addr
;
2707 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2715 CASE (sem
, INSN_RBR30
) : /* rbr30 $rt,$index,$count */
2717 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2718 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2719 #define FLD(f) abuf->fields.fmt_empty.f
2720 int UNUSED written
= 0;
2721 IADDR UNUSED pc
= abuf
->addr
;
2722 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2730 CASE (sem
, INSN_RFE
) : /* rfe */
2732 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2733 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2734 #define FLD(f) abuf->fields.fmt_empty.f
2735 int UNUSED written
= 0;
2736 IADDR UNUSED pc
= abuf
->addr
;
2737 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2745 CASE (sem
, INSN_RX
) : /* rx $rd,$rt */
2747 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2748 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2749 #define FLD(f) abuf->fields.fmt_empty.f
2750 int UNUSED written
= 0;
2751 IADDR UNUSED pc
= abuf
->addr
;
2752 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2760 CASE (sem
, INSN_RXR1
) : /* rxr1 $rt,$index,$count */
2762 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2763 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2764 #define FLD(f) abuf->fields.fmt_empty.f
2765 int UNUSED written
= 0;
2766 IADDR UNUSED pc
= abuf
->addr
;
2767 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2775 CASE (sem
, INSN_RXR30
) : /* rxr30 $rt,$index,$count */
2777 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2778 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2779 #define FLD(f) abuf->fields.fmt_empty.f
2780 int UNUSED written
= 0;
2781 IADDR UNUSED pc
= abuf
->addr
;
2782 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2790 CASE (sem
, INSN_SLEEP
) : /* sleep */
2792 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2793 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2794 #define FLD(f) abuf->fields.fmt_empty.f
2795 int UNUSED written
= 0;
2796 IADDR UNUSED pc
= abuf
->addr
;
2797 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2805 CASE (sem
, INSN_SRRD
) : /* srrd $rt */
2807 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2808 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2809 #define FLD(f) abuf->fields.fmt_empty.f
2810 int UNUSED written
= 0;
2811 IADDR UNUSED pc
= abuf
->addr
;
2812 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2820 CASE (sem
, INSN_SRRDL
) : /* srrdl $rt */
2822 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2823 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2824 #define FLD(f) abuf->fields.fmt_empty.f
2825 int UNUSED written
= 0;
2826 IADDR UNUSED pc
= abuf
->addr
;
2827 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2835 CASE (sem
, INSN_SRULCK
) : /* srulck $rt */
2837 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2838 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2839 #define FLD(f) abuf->fields.fmt_empty.f
2840 int UNUSED written
= 0;
2841 IADDR UNUSED pc
= abuf
->addr
;
2842 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2850 CASE (sem
, INSN_SRWR
) : /* srwr $rt,$rd */
2852 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2853 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2854 #define FLD(f) abuf->fields.fmt_empty.f
2855 int UNUSED written
= 0;
2856 IADDR UNUSED pc
= abuf
->addr
;
2857 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2865 CASE (sem
, INSN_SRWRU
) : /* srwru $rt,$rd */
2867 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2868 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2869 #define FLD(f) abuf->fields.fmt_empty.f
2870 int UNUSED written
= 0;
2871 IADDR UNUSED pc
= abuf
->addr
;
2872 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2880 CASE (sem
, INSN_TRAPQFL
) : /* trapqfl */
2882 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2883 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2884 #define FLD(f) abuf->fields.fmt_empty.f
2885 int UNUSED written
= 0;
2886 IADDR UNUSED pc
= abuf
->addr
;
2887 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2895 CASE (sem
, INSN_TRAPQNE
) : /* trapqne */
2897 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2898 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2899 #define FLD(f) abuf->fields.fmt_empty.f
2900 int UNUSED written
= 0;
2901 IADDR UNUSED pc
= abuf
->addr
;
2902 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2910 CASE (sem
, INSN_TRAPREL
) : /* traprel $rt */
2912 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2913 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2914 #define FLD(f) abuf->fields.fmt_empty.f
2915 int UNUSED written
= 0;
2916 IADDR UNUSED pc
= abuf
->addr
;
2917 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2925 CASE (sem
, INSN_WB
) : /* wb $rd,$rt */
2927 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2928 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2929 #define FLD(f) abuf->fields.fmt_empty.f
2930 int UNUSED written
= 0;
2931 IADDR UNUSED pc
= abuf
->addr
;
2932 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2940 CASE (sem
, INSN_WBU
) : /* wbu $rd,$rt */
2942 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2943 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2944 #define FLD(f) abuf->fields.fmt_empty.f
2945 int UNUSED written
= 0;
2946 IADDR UNUSED pc
= abuf
->addr
;
2947 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2955 CASE (sem
, INSN_WBR1
) : /* wbr1 $rt,$index,$count */
2957 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2958 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2959 #define FLD(f) abuf->fields.fmt_empty.f
2960 int UNUSED written
= 0;
2961 IADDR UNUSED pc
= abuf
->addr
;
2962 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2970 CASE (sem
, INSN_WBR1U
) : /* wbr1u $rt,$index,$count */
2972 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2973 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2974 #define FLD(f) abuf->fields.fmt_empty.f
2975 int UNUSED written
= 0;
2976 IADDR UNUSED pc
= abuf
->addr
;
2977 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
2985 CASE (sem
, INSN_WBR30
) : /* wbr30 $rt,$index,$count */
2987 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
2988 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
2989 #define FLD(f) abuf->fields.fmt_empty.f
2990 int UNUSED written
= 0;
2991 IADDR UNUSED pc
= abuf
->addr
;
2992 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3000 CASE (sem
, INSN_WBR30U
) : /* wbr30u $rt,$index,$count */
3002 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3003 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3004 #define FLD(f) abuf->fields.fmt_empty.f
3005 int UNUSED written
= 0;
3006 IADDR UNUSED pc
= abuf
->addr
;
3007 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3015 CASE (sem
, INSN_WX
) : /* wx $rd,$rt */
3017 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3018 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3019 #define FLD(f) abuf->fields.fmt_empty.f
3020 int UNUSED written
= 0;
3021 IADDR UNUSED pc
= abuf
->addr
;
3022 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3030 CASE (sem
, INSN_WXU
) : /* wxu $rd,$rt */
3032 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3033 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3034 #define FLD(f) abuf->fields.fmt_empty.f
3035 int UNUSED written
= 0;
3036 IADDR UNUSED pc
= abuf
->addr
;
3037 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3045 CASE (sem
, INSN_WXR1
) : /* wxr1 $rt,$index,$count */
3047 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3048 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3049 #define FLD(f) abuf->fields.fmt_empty.f
3050 int UNUSED written
= 0;
3051 IADDR UNUSED pc
= abuf
->addr
;
3052 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3060 CASE (sem
, INSN_WXR1U
) : /* wxr1u $rt,$index,$count */
3062 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3063 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3064 #define FLD(f) abuf->fields.fmt_empty.f
3065 int UNUSED written
= 0;
3066 IADDR UNUSED pc
= abuf
->addr
;
3067 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3075 CASE (sem
, INSN_WXR30
) : /* wxr30 $rt,$index,$count */
3077 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3078 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3079 #define FLD(f) abuf->fields.fmt_empty.f
3080 int UNUSED written
= 0;
3081 IADDR UNUSED pc
= abuf
->addr
;
3082 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3090 CASE (sem
, INSN_WXR30U
) : /* wxr30u $rt,$index,$count */
3092 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3093 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3094 #define FLD(f) abuf->fields.fmt_empty.f
3095 int UNUSED written
= 0;
3096 IADDR UNUSED pc
= abuf
->addr
;
3097 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3105 CASE (sem
, INSN_LDW
) : /* ldw $rt,$lo16($base) */
3107 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3108 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3109 #define FLD(f) abuf->fields.sfmt_addi.f
3110 int UNUSED written
= 0;
3111 IADDR UNUSED pc
= abuf
->addr
;
3112 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3116 tmp_addr
= ANDSI (ADDSI (GET_H_GR (FLD (f_rs
)), FLD (f_imm
)), INVSI (3));
3118 SI opval
= GETMEMSI (current_cpu
, pc
, tmp_addr
);
3119 SET_H_GR (ADDSI (FLD (f_rt
), 1), opval
);
3120 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3123 SI opval
= GETMEMSI (current_cpu
, pc
, ADDSI (tmp_addr
, 4));
3124 SET_H_GR (FLD (f_rt
), opval
);
3125 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3133 CASE (sem
, INSN_SDW
) : /* sdw $rt,$lo16($base) */
3135 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3136 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3137 #define FLD(f) abuf->fields.sfmt_addi.f
3138 int UNUSED written
= 0;
3139 IADDR UNUSED pc
= abuf
->addr
;
3140 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3144 tmp_addr
= ANDSI (ADDSI (GET_H_GR (FLD (f_rs
)), FLD (f_imm
)), INVSI (3));
3146 SI opval
= GET_H_GR (FLD (f_rt
));
3147 SETMEMSI (current_cpu
, pc
, ADDSI (tmp_addr
, 4), opval
);
3148 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3151 SI opval
= GET_H_GR (ADDSI (FLD (f_rt
), 1));
3152 SETMEMSI (current_cpu
, pc
, tmp_addr
, opval
);
3153 TRACE_RESULT (current_cpu
, abuf
, "memory", 'x', opval
);
3161 CASE (sem
, INSN_J
) : /* j $jmptarg */
3163 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3164 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3165 #define FLD(f) abuf->fields.sfmt_j.f
3166 int UNUSED written
= 0;
3167 IADDR UNUSED pc
= abuf
->addr
;
3169 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3173 USI opval
= FLD (i_jmptarg
);
3174 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3175 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3179 SEM_BRANCH_FINI (vpc
);
3184 CASE (sem
, INSN_JAL
) : /* jal $jmptarg */
3186 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3187 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3188 #define FLD(f) abuf->fields.sfmt_j.f
3189 int UNUSED written
= 0;
3190 IADDR UNUSED pc
= abuf
->addr
;
3192 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3197 SI opval
= ADDSI (pc
, 8);
3198 SET_H_GR (((UINT
) 31), opval
);
3199 TRACE_RESULT (current_cpu
, abuf
, "gr", 'x', opval
);
3202 USI opval
= FLD (i_jmptarg
);
3203 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3204 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3209 SEM_BRANCH_FINI (vpc
);
3214 CASE (sem
, INSN_BMB
) : /* bmb $rs,$rt,$offset */
3216 SEM_ARG sem_arg
= SEM_SEM_ARG (vpc
, sc
);
3217 ARGBUF
*abuf
= SEM_ARGBUF (sem_arg
);
3218 #define FLD(f) abuf->fields.sfmt_bbi.f
3219 int UNUSED written
= 0;
3220 IADDR UNUSED pc
= abuf
->addr
;
3222 vpc
= SEM_NEXT_VPC (sem_arg
, pc
, 4);
3227 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 255), ANDSI (GET_H_GR (FLD (f_rt
)), 255))) {
3230 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 65280), ANDSI (GET_H_GR (FLD (f_rt
)), 65280))) {
3233 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 16711680), ANDSI (GET_H_GR (FLD (f_rt
)), 16711680))) {
3236 if (EQSI (ANDSI (GET_H_GR (FLD (f_rs
)), 0xff000000), ANDSI (GET_H_GR (FLD (f_rt
)), 0xff000000))) {
3242 USI opval
= FLD (i_offset
);
3243 SEM_BRANCH_VIA_CACHE (current_cpu
, sem_arg
, opval
, vpc
);
3244 written
|= (1 << 3);
3245 TRACE_RESULT (current_cpu
, abuf
, "pc", 'x', opval
);
3251 abuf
->written
= written
;
3252 SEM_BRANCH_FINI (vpc
);
3259 ENDSWITCH (sem
) /* End of semantic switch. */
3262 /* At this point `vpc' contains the next insn to execute. */
3265 #undef DEFINE_SWITCH
3266 #endif /* DEFINE_SWITCH */