1 1.1 christos /* Simulator instruction semantics for iq2000bf. 2 1.1 christos 3 1.1 christos THIS FILE IS MACHINE GENERATED WITH CGEN. 4 1.1 christos 5 1.1.1.12 christos Copyright (C) 1996-2025 Free Software Foundation, Inc. 6 1.1 christos 7 1.1 christos This file is part of the GNU simulators. 8 1.1 christos 9 1.1 christos This file is free software; you can redistribute it and/or modify 10 1.1 christos it under the terms of the GNU General Public License as published by 11 1.1 christos the Free Software Foundation; either version 3, or (at your option) 12 1.1 christos any later version. 13 1.1 christos 14 1.1 christos It is distributed in the hope that it will be useful, but WITHOUT 15 1.1 christos ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16 1.1 christos or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 17 1.1 christos License for more details. 18 1.1 christos 19 1.1 christos You should have received a copy of the GNU General Public License along 20 1.1.1.11 christos with this program; if not, write to the Free Software Foundation, Inc., 21 1.1.1.11 christos 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 22 1.1 christos 23 1.1 christos */ 24 1.1 christos 25 1.1 christos #define WANT_CPU iq2000bf 26 1.1 christos #define WANT_CPU_IQ2000BF 27 1.1 christos 28 1.1 christos #include "sim-main.h" 29 1.1 christos #include "cgen-mem.h" 30 1.1 christos #include "cgen-ops.h" 31 1.1 christos 32 1.1 christos #undef GET_ATTR 33 1.1 christos #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr) 34 1.1 christos 35 1.1 christos /* This is used so that we can compile two copies of the semantic code, 36 1.1 christos one with full feature support and one without that runs fast(er). 37 1.1 christos FAST_P, when desired, is defined on the command line, -DFAST_P=1. */ 38 1.1 christos #if FAST_P 39 1.1 christos #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn) 40 1.1.1.5 christos #undef CGEN_TRACE_RESULT 41 1.1.1.5 christos #define CGEN_TRACE_RESULT(cpu, abuf, name, type, val) 42 1.1 christos #else 43 1.1 christos #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn) 44 1.1 christos #endif 45 1.1 christos 46 1.1 christos /* x-invalid: --invalid-- */ 47 1.1 christos 48 1.1 christos static SEM_PC 49 1.1 christos SEM_FN_NAME (iq2000bf,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 50 1.1 christos { 51 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 52 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 53 1.1 christos int UNUSED written = 0; 54 1.1 christos IADDR UNUSED pc = abuf->addr; 55 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0); 56 1.1 christos 57 1.1 christos { 58 1.1 christos /* Update the recorded pc in the cpu state struct. 59 1.1 christos Only necessary for WITH_SCACHE case, but to avoid the 60 1.1 christos conditional compilation .... */ 61 1.1 christos SET_H_PC (pc); 62 1.1 christos /* Virtual insns have zero size. Overwrite vpc with address of next insn 63 1.1 christos using the default-insn-bitsize spec. When executing insns in parallel 64 1.1 christos we may want to queue the fault and continue execution. */ 65 1.1 christos vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 66 1.1 christos vpc = sim_engine_invalid_insn (current_cpu, pc, vpc); 67 1.1 christos } 68 1.1 christos 69 1.1 christos return vpc; 70 1.1 christos #undef FLD 71 1.1 christos } 72 1.1 christos 73 1.1 christos /* x-after: --after-- */ 74 1.1 christos 75 1.1 christos static SEM_PC 76 1.1 christos SEM_FN_NAME (iq2000bf,x_after) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 77 1.1 christos { 78 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 79 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 80 1.1 christos int UNUSED written = 0; 81 1.1 christos IADDR UNUSED pc = abuf->addr; 82 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0); 83 1.1 christos 84 1.1 christos { 85 1.1 christos #if WITH_SCACHE_PBB_IQ2000BF 86 1.1 christos iq2000bf_pbb_after (current_cpu, sem_arg); 87 1.1 christos #endif 88 1.1 christos } 89 1.1 christos 90 1.1 christos return vpc; 91 1.1 christos #undef FLD 92 1.1 christos } 93 1.1 christos 94 1.1 christos /* x-before: --before-- */ 95 1.1 christos 96 1.1 christos static SEM_PC 97 1.1 christos SEM_FN_NAME (iq2000bf,x_before) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 98 1.1 christos { 99 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 100 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 101 1.1 christos int UNUSED written = 0; 102 1.1 christos IADDR UNUSED pc = abuf->addr; 103 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0); 104 1.1 christos 105 1.1 christos { 106 1.1 christos #if WITH_SCACHE_PBB_IQ2000BF 107 1.1 christos iq2000bf_pbb_before (current_cpu, sem_arg); 108 1.1 christos #endif 109 1.1 christos } 110 1.1 christos 111 1.1 christos return vpc; 112 1.1 christos #undef FLD 113 1.1 christos } 114 1.1 christos 115 1.1 christos /* x-cti-chain: --cti-chain-- */ 116 1.1 christos 117 1.1 christos static SEM_PC 118 1.1 christos SEM_FN_NAME (iq2000bf,x_cti_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 119 1.1 christos { 120 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 121 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 122 1.1 christos int UNUSED written = 0; 123 1.1 christos IADDR UNUSED pc = abuf->addr; 124 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0); 125 1.1 christos 126 1.1 christos { 127 1.1 christos #if WITH_SCACHE_PBB_IQ2000BF 128 1.1 christos #ifdef DEFINE_SWITCH 129 1.1 christos vpc = iq2000bf_pbb_cti_chain (current_cpu, sem_arg, 130 1.1 christos pbb_br_type, pbb_br_npc); 131 1.1 christos BREAK (sem); 132 1.1 christos #else 133 1.1 christos /* FIXME: Allow provision of explicit ifmt spec in insn spec. */ 134 1.1 christos vpc = iq2000bf_pbb_cti_chain (current_cpu, sem_arg, 135 1.1 christos CPU_PBB_BR_TYPE (current_cpu), 136 1.1 christos CPU_PBB_BR_NPC (current_cpu)); 137 1.1 christos #endif 138 1.1 christos #endif 139 1.1 christos } 140 1.1 christos 141 1.1 christos return vpc; 142 1.1 christos #undef FLD 143 1.1 christos } 144 1.1 christos 145 1.1 christos /* x-chain: --chain-- */ 146 1.1 christos 147 1.1 christos static SEM_PC 148 1.1 christos SEM_FN_NAME (iq2000bf,x_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 149 1.1 christos { 150 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 151 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 152 1.1 christos int UNUSED written = 0; 153 1.1 christos IADDR UNUSED pc = abuf->addr; 154 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0); 155 1.1 christos 156 1.1 christos { 157 1.1 christos #if WITH_SCACHE_PBB_IQ2000BF 158 1.1 christos vpc = iq2000bf_pbb_chain (current_cpu, sem_arg); 159 1.1 christos #ifdef DEFINE_SWITCH 160 1.1 christos BREAK (sem); 161 1.1 christos #endif 162 1.1 christos #endif 163 1.1 christos } 164 1.1 christos 165 1.1 christos return vpc; 166 1.1 christos #undef FLD 167 1.1 christos } 168 1.1 christos 169 1.1 christos /* x-begin: --begin-- */ 170 1.1 christos 171 1.1 christos static SEM_PC 172 1.1 christos SEM_FN_NAME (iq2000bf,x_begin) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 173 1.1 christos { 174 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 175 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 176 1.1 christos int UNUSED written = 0; 177 1.1 christos IADDR UNUSED pc = abuf->addr; 178 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0); 179 1.1 christos 180 1.1 christos { 181 1.1 christos #if WITH_SCACHE_PBB_IQ2000BF 182 1.1 christos #if defined DEFINE_SWITCH || defined FAST_P 183 1.1 christos /* In the switch case FAST_P is a constant, allowing several optimizations 184 1.1 christos in any called inline functions. */ 185 1.1 christos vpc = iq2000bf_pbb_begin (current_cpu, FAST_P); 186 1.1 christos #else 187 1.1 christos #if 0 /* cgen engine can't handle dynamic fast/full switching yet. */ 188 1.1 christos vpc = iq2000bf_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu))); 189 1.1 christos #else 190 1.1 christos vpc = iq2000bf_pbb_begin (current_cpu, 0); 191 1.1 christos #endif 192 1.1 christos #endif 193 1.1 christos #endif 194 1.1 christos } 195 1.1 christos 196 1.1 christos return vpc; 197 1.1 christos #undef FLD 198 1.1 christos } 199 1.1 christos 200 1.1 christos /* add: add $rd,$rs,$rt */ 201 1.1 christos 202 1.1 christos static SEM_PC 203 1.1 christos SEM_FN_NAME (iq2000bf,add) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 204 1.1 christos { 205 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 206 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 207 1.1 christos int UNUSED written = 0; 208 1.1 christos IADDR UNUSED pc = abuf->addr; 209 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 210 1.1 christos 211 1.1 christos { 212 1.1 christos SI opval = ADDSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt))); 213 1.1 christos SET_H_GR (FLD (f_rd), opval); 214 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 215 1.1 christos } 216 1.1 christos 217 1.1 christos return vpc; 218 1.1 christos #undef FLD 219 1.1 christos } 220 1.1 christos 221 1.1 christos /* addi: addi $rt,$rs,$lo16 */ 222 1.1 christos 223 1.1 christos static SEM_PC 224 1.1 christos SEM_FN_NAME (iq2000bf,addi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 225 1.1 christos { 226 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 227 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 228 1.1 christos int UNUSED written = 0; 229 1.1 christos IADDR UNUSED pc = abuf->addr; 230 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 231 1.1 christos 232 1.1 christos { 233 1.1 christos SI opval = ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))); 234 1.1 christos SET_H_GR (FLD (f_rt), opval); 235 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 236 1.1 christos } 237 1.1 christos 238 1.1 christos return vpc; 239 1.1 christos #undef FLD 240 1.1 christos } 241 1.1 christos 242 1.1 christos /* addiu: addiu $rt,$rs,$lo16 */ 243 1.1 christos 244 1.1 christos static SEM_PC 245 1.1 christos SEM_FN_NAME (iq2000bf,addiu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 246 1.1 christos { 247 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 248 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 249 1.1 christos int UNUSED written = 0; 250 1.1 christos IADDR UNUSED pc = abuf->addr; 251 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 252 1.1 christos 253 1.1 christos { 254 1.1 christos SI opval = ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))); 255 1.1 christos SET_H_GR (FLD (f_rt), opval); 256 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 257 1.1 christos } 258 1.1 christos 259 1.1 christos return vpc; 260 1.1 christos #undef FLD 261 1.1 christos } 262 1.1 christos 263 1.1 christos /* addu: addu $rd,$rs,$rt */ 264 1.1 christos 265 1.1 christos static SEM_PC 266 1.1 christos SEM_FN_NAME (iq2000bf,addu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 267 1.1 christos { 268 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 269 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 270 1.1 christos int UNUSED written = 0; 271 1.1 christos IADDR UNUSED pc = abuf->addr; 272 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 273 1.1 christos 274 1.1 christos { 275 1.1 christos SI opval = ADDSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt))); 276 1.1 christos SET_H_GR (FLD (f_rd), opval); 277 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 278 1.1 christos } 279 1.1 christos 280 1.1 christos return vpc; 281 1.1 christos #undef FLD 282 1.1 christos } 283 1.1 christos 284 1.1 christos /* ado16: ado16 $rd,$rs,$rt */ 285 1.1 christos 286 1.1 christos static SEM_PC 287 1.1 christos SEM_FN_NAME (iq2000bf,ado16) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 288 1.1 christos { 289 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 290 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 291 1.1 christos int UNUSED written = 0; 292 1.1 christos IADDR UNUSED pc = abuf->addr; 293 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 294 1.1 christos 295 1.1 christos { 296 1.1 christos HI tmp_high; 297 1.1 christos HI tmp_low; 298 1.1 christos tmp_low = ADDHI (ANDHI (GET_H_GR (FLD (f_rs)), 65535), ANDHI (GET_H_GR (FLD (f_rt)), 65535)); 299 1.1 christos tmp_high = ADDHI (SRLSI (GET_H_GR (FLD (f_rs)), 16), SRLSI (GET_H_GR (FLD (f_rt)), 16)); 300 1.1 christos { 301 1.1 christos SI opval = ORSI (SLLSI (tmp_high, 16), tmp_low); 302 1.1 christos SET_H_GR (FLD (f_rd), opval); 303 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 304 1.1 christos } 305 1.1 christos } 306 1.1 christos 307 1.1 christos return vpc; 308 1.1 christos #undef FLD 309 1.1 christos } 310 1.1 christos 311 1.1 christos /* and: and $rd,$rs,$rt */ 312 1.1 christos 313 1.1 christos static SEM_PC 314 1.1 christos SEM_FN_NAME (iq2000bf,and) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 315 1.1 christos { 316 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 317 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 318 1.1 christos int UNUSED written = 0; 319 1.1 christos IADDR UNUSED pc = abuf->addr; 320 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 321 1.1 christos 322 1.1 christos { 323 1.1 christos SI opval = ANDSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt))); 324 1.1 christos SET_H_GR (FLD (f_rd), opval); 325 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 326 1.1 christos } 327 1.1 christos 328 1.1 christos return vpc; 329 1.1 christos #undef FLD 330 1.1 christos } 331 1.1 christos 332 1.1 christos /* andi: andi $rt,$rs,$lo16 */ 333 1.1 christos 334 1.1 christos static SEM_PC 335 1.1 christos SEM_FN_NAME (iq2000bf,andi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 336 1.1 christos { 337 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 338 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 339 1.1 christos int UNUSED written = 0; 340 1.1 christos IADDR UNUSED pc = abuf->addr; 341 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 342 1.1 christos 343 1.1 christos { 344 1.1 christos SI opval = ANDSI (GET_H_GR (FLD (f_rs)), ZEXTSISI (FLD (f_imm))); 345 1.1 christos SET_H_GR (FLD (f_rt), opval); 346 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 347 1.1 christos } 348 1.1 christos 349 1.1 christos return vpc; 350 1.1 christos #undef FLD 351 1.1 christos } 352 1.1 christos 353 1.1 christos /* andoi: andoi $rt,$rs,$lo16 */ 354 1.1 christos 355 1.1 christos static SEM_PC 356 1.1 christos SEM_FN_NAME (iq2000bf,andoi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 357 1.1 christos { 358 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 359 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 360 1.1 christos int UNUSED written = 0; 361 1.1 christos IADDR UNUSED pc = abuf->addr; 362 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 363 1.1 christos 364 1.1 christos { 365 1.1 christos SI opval = ANDSI (GET_H_GR (FLD (f_rs)), ORSI (0xffff0000, EXTHISI (TRUNCSIHI (FLD (f_imm))))); 366 1.1 christos SET_H_GR (FLD (f_rt), opval); 367 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 368 1.1 christos } 369 1.1 christos 370 1.1 christos return vpc; 371 1.1 christos #undef FLD 372 1.1 christos } 373 1.1 christos 374 1.1 christos /* nor: nor $rd,$rs,$rt */ 375 1.1 christos 376 1.1 christos static SEM_PC 377 1.1 christos SEM_FN_NAME (iq2000bf,nor) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 378 1.1 christos { 379 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 380 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 381 1.1 christos int UNUSED written = 0; 382 1.1 christos IADDR UNUSED pc = abuf->addr; 383 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 384 1.1 christos 385 1.1 christos { 386 1.1 christos SI opval = INVSI (ORSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt)))); 387 1.1 christos SET_H_GR (FLD (f_rd), opval); 388 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 389 1.1 christos } 390 1.1 christos 391 1.1 christos return vpc; 392 1.1 christos #undef FLD 393 1.1 christos } 394 1.1 christos 395 1.1 christos /* or: or $rd,$rs,$rt */ 396 1.1 christos 397 1.1 christos static SEM_PC 398 1.1 christos SEM_FN_NAME (iq2000bf,or) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 399 1.1 christos { 400 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 401 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 402 1.1 christos int UNUSED written = 0; 403 1.1 christos IADDR UNUSED pc = abuf->addr; 404 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 405 1.1 christos 406 1.1 christos { 407 1.1 christos SI opval = ORSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt))); 408 1.1 christos SET_H_GR (FLD (f_rd), opval); 409 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 410 1.1 christos } 411 1.1 christos 412 1.1 christos return vpc; 413 1.1 christos #undef FLD 414 1.1 christos } 415 1.1 christos 416 1.1 christos /* ori: ori $rt,$rs,$lo16 */ 417 1.1 christos 418 1.1 christos static SEM_PC 419 1.1 christos SEM_FN_NAME (iq2000bf,ori) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 420 1.1 christos { 421 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 422 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 423 1.1 christos int UNUSED written = 0; 424 1.1 christos IADDR UNUSED pc = abuf->addr; 425 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 426 1.1 christos 427 1.1 christos { 428 1.1 christos SI opval = ORSI (GET_H_GR (FLD (f_rs)), ZEXTSISI (FLD (f_imm))); 429 1.1 christos SET_H_GR (FLD (f_rt), opval); 430 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 431 1.1 christos } 432 1.1 christos 433 1.1 christos return vpc; 434 1.1 christos #undef FLD 435 1.1 christos } 436 1.1 christos 437 1.1 christos /* ram: ram $rd,$rt,$shamt,$maskl,$maskr */ 438 1.1 christos 439 1.1 christos static SEM_PC 440 1.1 christos SEM_FN_NAME (iq2000bf,ram) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 441 1.1 christos { 442 1.1 christos #define FLD(f) abuf->fields.sfmt_ram.f 443 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 444 1.1 christos int UNUSED written = 0; 445 1.1 christos IADDR UNUSED pc = abuf->addr; 446 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 447 1.1 christos 448 1.1 christos { 449 1.1 christos { 450 1.1 christos SI opval = RORSI (GET_H_GR (FLD (f_rt)), FLD (f_shamt)); 451 1.1 christos SET_H_GR (FLD (f_rd), opval); 452 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 453 1.1 christos } 454 1.1 christos { 455 1.1 christos SI opval = ANDSI (GET_H_GR (FLD (f_rd)), SRLSI (0xffffffff, FLD (f_maskl))); 456 1.1 christos SET_H_GR (FLD (f_rd), opval); 457 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 458 1.1 christos } 459 1.1 christos { 460 1.1 christos SI opval = ANDSI (GET_H_GR (FLD (f_rd)), SLLSI (0xffffffff, FLD (f_rs))); 461 1.1 christos SET_H_GR (FLD (f_rd), opval); 462 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 463 1.1 christos } 464 1.1 christos } 465 1.1 christos 466 1.1 christos return vpc; 467 1.1 christos #undef FLD 468 1.1 christos } 469 1.1 christos 470 1.1 christos /* sll: sll $rd,$rt,$shamt */ 471 1.1 christos 472 1.1 christos static SEM_PC 473 1.1 christos SEM_FN_NAME (iq2000bf,sll) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 474 1.1 christos { 475 1.1 christos #define FLD(f) abuf->fields.sfmt_ram.f 476 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 477 1.1 christos int UNUSED written = 0; 478 1.1 christos IADDR UNUSED pc = abuf->addr; 479 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 480 1.1 christos 481 1.1 christos { 482 1.1 christos SI opval = SLLSI (GET_H_GR (FLD (f_rt)), FLD (f_shamt)); 483 1.1 christos SET_H_GR (FLD (f_rd), opval); 484 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 485 1.1 christos } 486 1.1 christos 487 1.1 christos return vpc; 488 1.1 christos #undef FLD 489 1.1 christos } 490 1.1 christos 491 1.1 christos /* sllv: sllv $rd,$rt,$rs */ 492 1.1 christos 493 1.1 christos static SEM_PC 494 1.1 christos SEM_FN_NAME (iq2000bf,sllv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 495 1.1 christos { 496 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 497 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 498 1.1 christos int UNUSED written = 0; 499 1.1 christos IADDR UNUSED pc = abuf->addr; 500 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 501 1.1 christos 502 1.1 christos { 503 1.1 christos SI opval = SLLSI (GET_H_GR (FLD (f_rt)), ANDSI (GET_H_GR (FLD (f_rs)), 31)); 504 1.1 christos SET_H_GR (FLD (f_rd), opval); 505 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 506 1.1 christos } 507 1.1 christos 508 1.1 christos return vpc; 509 1.1 christos #undef FLD 510 1.1 christos } 511 1.1 christos 512 1.1 christos /* slmv: slmv $rd,$rt,$rs,$shamt */ 513 1.1 christos 514 1.1 christos static SEM_PC 515 1.1 christos SEM_FN_NAME (iq2000bf,slmv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 516 1.1 christos { 517 1.1 christos #define FLD(f) abuf->fields.sfmt_ram.f 518 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 519 1.1 christos int UNUSED written = 0; 520 1.1 christos IADDR UNUSED pc = abuf->addr; 521 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 522 1.1 christos 523 1.1 christos { 524 1.1 christos SI opval = ANDSI (SLLSI (GET_H_GR (FLD (f_rt)), FLD (f_shamt)), SRLSI (0xffffffff, GET_H_GR (FLD (f_rs)))); 525 1.1 christos SET_H_GR (FLD (f_rd), opval); 526 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 527 1.1 christos } 528 1.1 christos 529 1.1 christos return vpc; 530 1.1 christos #undef FLD 531 1.1 christos } 532 1.1 christos 533 1.1 christos /* slt: slt $rd,$rs,$rt */ 534 1.1 christos 535 1.1 christos static SEM_PC 536 1.1 christos SEM_FN_NAME (iq2000bf,slt) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 537 1.1 christos { 538 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 539 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 540 1.1 christos int UNUSED written = 0; 541 1.1 christos IADDR UNUSED pc = abuf->addr; 542 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 543 1.1 christos 544 1.1 christos if (LTSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt)))) { 545 1.1 christos { 546 1.1 christos SI opval = 1; 547 1.1 christos SET_H_GR (FLD (f_rd), opval); 548 1.1 christos written |= (1 << 2); 549 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 550 1.1 christos } 551 1.1 christos } else { 552 1.1 christos { 553 1.1 christos SI opval = 0; 554 1.1 christos SET_H_GR (FLD (f_rd), opval); 555 1.1 christos written |= (1 << 2); 556 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 557 1.1 christos } 558 1.1 christos } 559 1.1 christos 560 1.1 christos abuf->written = written; 561 1.1 christos return vpc; 562 1.1 christos #undef FLD 563 1.1 christos } 564 1.1 christos 565 1.1 christos /* slti: slti $rt,$rs,$imm */ 566 1.1 christos 567 1.1 christos static SEM_PC 568 1.1 christos SEM_FN_NAME (iq2000bf,slti) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 569 1.1 christos { 570 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 571 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 572 1.1 christos int UNUSED written = 0; 573 1.1 christos IADDR UNUSED pc = abuf->addr; 574 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 575 1.1 christos 576 1.1 christos if (LTSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm))))) { 577 1.1 christos { 578 1.1 christos SI opval = 1; 579 1.1 christos SET_H_GR (FLD (f_rt), opval); 580 1.1 christos written |= (1 << 2); 581 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 582 1.1 christos } 583 1.1 christos } else { 584 1.1 christos { 585 1.1 christos SI opval = 0; 586 1.1 christos SET_H_GR (FLD (f_rt), opval); 587 1.1 christos written |= (1 << 2); 588 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 589 1.1 christos } 590 1.1 christos } 591 1.1 christos 592 1.1 christos abuf->written = written; 593 1.1 christos return vpc; 594 1.1 christos #undef FLD 595 1.1 christos } 596 1.1 christos 597 1.1 christos /* sltiu: sltiu $rt,$rs,$imm */ 598 1.1 christos 599 1.1 christos static SEM_PC 600 1.1 christos SEM_FN_NAME (iq2000bf,sltiu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 601 1.1 christos { 602 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 603 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 604 1.1 christos int UNUSED written = 0; 605 1.1 christos IADDR UNUSED pc = abuf->addr; 606 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 607 1.1 christos 608 1.1 christos if (LTUSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm))))) { 609 1.1 christos { 610 1.1 christos SI opval = 1; 611 1.1 christos SET_H_GR (FLD (f_rt), opval); 612 1.1 christos written |= (1 << 2); 613 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 614 1.1 christos } 615 1.1 christos } else { 616 1.1 christos { 617 1.1 christos SI opval = 0; 618 1.1 christos SET_H_GR (FLD (f_rt), opval); 619 1.1 christos written |= (1 << 2); 620 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 621 1.1 christos } 622 1.1 christos } 623 1.1 christos 624 1.1 christos abuf->written = written; 625 1.1 christos return vpc; 626 1.1 christos #undef FLD 627 1.1 christos } 628 1.1 christos 629 1.1 christos /* sltu: sltu $rd,$rs,$rt */ 630 1.1 christos 631 1.1 christos static SEM_PC 632 1.1 christos SEM_FN_NAME (iq2000bf,sltu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 633 1.1 christos { 634 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 635 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 636 1.1 christos int UNUSED written = 0; 637 1.1 christos IADDR UNUSED pc = abuf->addr; 638 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 639 1.1 christos 640 1.1 christos if (LTUSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt)))) { 641 1.1 christos { 642 1.1 christos SI opval = 1; 643 1.1 christos SET_H_GR (FLD (f_rd), opval); 644 1.1 christos written |= (1 << 2); 645 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 646 1.1 christos } 647 1.1 christos } else { 648 1.1 christos { 649 1.1 christos SI opval = 0; 650 1.1 christos SET_H_GR (FLD (f_rd), opval); 651 1.1 christos written |= (1 << 2); 652 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 653 1.1 christos } 654 1.1 christos } 655 1.1 christos 656 1.1 christos abuf->written = written; 657 1.1 christos return vpc; 658 1.1 christos #undef FLD 659 1.1 christos } 660 1.1 christos 661 1.1 christos /* sra: sra $rd,$rt,$shamt */ 662 1.1 christos 663 1.1 christos static SEM_PC 664 1.1 christos SEM_FN_NAME (iq2000bf,sra) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 665 1.1 christos { 666 1.1 christos #define FLD(f) abuf->fields.sfmt_ram.f 667 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 668 1.1 christos int UNUSED written = 0; 669 1.1 christos IADDR UNUSED pc = abuf->addr; 670 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 671 1.1 christos 672 1.1 christos { 673 1.1 christos SI opval = SRASI (GET_H_GR (FLD (f_rt)), FLD (f_shamt)); 674 1.1 christos SET_H_GR (FLD (f_rd), opval); 675 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 676 1.1 christos } 677 1.1 christos 678 1.1 christos return vpc; 679 1.1 christos #undef FLD 680 1.1 christos } 681 1.1 christos 682 1.1 christos /* srav: srav $rd,$rt,$rs */ 683 1.1 christos 684 1.1 christos static SEM_PC 685 1.1 christos SEM_FN_NAME (iq2000bf,srav) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 686 1.1 christos { 687 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 688 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 689 1.1 christos int UNUSED written = 0; 690 1.1 christos IADDR UNUSED pc = abuf->addr; 691 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 692 1.1 christos 693 1.1 christos { 694 1.1 christos SI opval = SRASI (GET_H_GR (FLD (f_rt)), ANDSI (GET_H_GR (FLD (f_rs)), 31)); 695 1.1 christos SET_H_GR (FLD (f_rd), opval); 696 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 697 1.1 christos } 698 1.1 christos 699 1.1 christos return vpc; 700 1.1 christos #undef FLD 701 1.1 christos } 702 1.1 christos 703 1.1 christos /* srl: srl $rd,$rt,$shamt */ 704 1.1 christos 705 1.1 christos static SEM_PC 706 1.1 christos SEM_FN_NAME (iq2000bf,srl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 707 1.1 christos { 708 1.1 christos #define FLD(f) abuf->fields.sfmt_ram.f 709 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 710 1.1 christos int UNUSED written = 0; 711 1.1 christos IADDR UNUSED pc = abuf->addr; 712 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 713 1.1 christos 714 1.1 christos { 715 1.1 christos SI opval = SRLSI (GET_H_GR (FLD (f_rt)), FLD (f_shamt)); 716 1.1 christos SET_H_GR (FLD (f_rd), opval); 717 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 718 1.1 christos } 719 1.1 christos 720 1.1 christos return vpc; 721 1.1 christos #undef FLD 722 1.1 christos } 723 1.1 christos 724 1.1 christos /* srlv: srlv $rd,$rt,$rs */ 725 1.1 christos 726 1.1 christos static SEM_PC 727 1.1 christos SEM_FN_NAME (iq2000bf,srlv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 728 1.1 christos { 729 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 730 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 731 1.1 christos int UNUSED written = 0; 732 1.1 christos IADDR UNUSED pc = abuf->addr; 733 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 734 1.1 christos 735 1.1 christos { 736 1.1 christos SI opval = SRLSI (GET_H_GR (FLD (f_rt)), ANDSI (GET_H_GR (FLD (f_rs)), 31)); 737 1.1 christos SET_H_GR (FLD (f_rd), opval); 738 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 739 1.1 christos } 740 1.1 christos 741 1.1 christos return vpc; 742 1.1 christos #undef FLD 743 1.1 christos } 744 1.1 christos 745 1.1 christos /* srmv: srmv $rd,$rt,$rs,$shamt */ 746 1.1 christos 747 1.1 christos static SEM_PC 748 1.1 christos SEM_FN_NAME (iq2000bf,srmv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 749 1.1 christos { 750 1.1 christos #define FLD(f) abuf->fields.sfmt_ram.f 751 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 752 1.1 christos int UNUSED written = 0; 753 1.1 christos IADDR UNUSED pc = abuf->addr; 754 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 755 1.1 christos 756 1.1 christos { 757 1.1 christos SI opval = ANDSI (SRLSI (GET_H_GR (FLD (f_rt)), FLD (f_shamt)), SLLSI (0xffffffff, GET_H_GR (FLD (f_rs)))); 758 1.1 christos SET_H_GR (FLD (f_rd), opval); 759 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 760 1.1 christos } 761 1.1 christos 762 1.1 christos return vpc; 763 1.1 christos #undef FLD 764 1.1 christos } 765 1.1 christos 766 1.1 christos /* sub: sub $rd,$rs,$rt */ 767 1.1 christos 768 1.1 christos static SEM_PC 769 1.1 christos SEM_FN_NAME (iq2000bf,sub) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 770 1.1 christos { 771 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 772 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 773 1.1 christos int UNUSED written = 0; 774 1.1 christos IADDR UNUSED pc = abuf->addr; 775 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 776 1.1 christos 777 1.1 christos { 778 1.1 christos SI opval = SUBSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt))); 779 1.1 christos SET_H_GR (FLD (f_rd), opval); 780 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 781 1.1 christos } 782 1.1 christos 783 1.1 christos return vpc; 784 1.1 christos #undef FLD 785 1.1 christos } 786 1.1 christos 787 1.1 christos /* subu: subu $rd,$rs,$rt */ 788 1.1 christos 789 1.1 christos static SEM_PC 790 1.1 christos SEM_FN_NAME (iq2000bf,subu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 791 1.1 christos { 792 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 793 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 794 1.1 christos int UNUSED written = 0; 795 1.1 christos IADDR UNUSED pc = abuf->addr; 796 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 797 1.1 christos 798 1.1 christos { 799 1.1 christos SI opval = SUBSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt))); 800 1.1 christos SET_H_GR (FLD (f_rd), opval); 801 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 802 1.1 christos } 803 1.1 christos 804 1.1 christos return vpc; 805 1.1 christos #undef FLD 806 1.1 christos } 807 1.1 christos 808 1.1 christos /* xor: xor $rd,$rs,$rt */ 809 1.1 christos 810 1.1 christos static SEM_PC 811 1.1 christos SEM_FN_NAME (iq2000bf,xor) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 812 1.1 christos { 813 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 814 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 815 1.1 christos int UNUSED written = 0; 816 1.1 christos IADDR UNUSED pc = abuf->addr; 817 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 818 1.1 christos 819 1.1 christos { 820 1.1 christos SI opval = XORSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt))); 821 1.1 christos SET_H_GR (FLD (f_rd), opval); 822 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 823 1.1 christos } 824 1.1 christos 825 1.1 christos return vpc; 826 1.1 christos #undef FLD 827 1.1 christos } 828 1.1 christos 829 1.1 christos /* xori: xori $rt,$rs,$lo16 */ 830 1.1 christos 831 1.1 christos static SEM_PC 832 1.1 christos SEM_FN_NAME (iq2000bf,xori) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 833 1.1 christos { 834 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 835 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 836 1.1 christos int UNUSED written = 0; 837 1.1 christos IADDR UNUSED pc = abuf->addr; 838 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 839 1.1 christos 840 1.1 christos { 841 1.1 christos SI opval = XORSI (GET_H_GR (FLD (f_rs)), ZEXTSISI (FLD (f_imm))); 842 1.1 christos SET_H_GR (FLD (f_rt), opval); 843 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 844 1.1 christos } 845 1.1 christos 846 1.1 christos return vpc; 847 1.1 christos #undef FLD 848 1.1 christos } 849 1.1 christos 850 1.1 christos /* bbi: bbi $rs($bitnum),$offset */ 851 1.1 christos 852 1.1 christos static SEM_PC 853 1.1 christos SEM_FN_NAME (iq2000bf,bbi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 854 1.1 christos { 855 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 856 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 857 1.1 christos int UNUSED written = 0; 858 1.1 christos IADDR UNUSED pc = abuf->addr; 859 1.1 christos SEM_BRANCH_INIT 860 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 861 1.1 christos 862 1.1 christos if (ANDSI (GET_H_GR (FLD (f_rs)), SLLSI (1, FLD (f_rt)))) { 863 1.1 christos { 864 1.1 christos { 865 1.1 christos USI opval = FLD (i_offset); 866 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 867 1.1 christos written |= (1 << 3); 868 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 869 1.1 christos } 870 1.1 christos } 871 1.1 christos } 872 1.1 christos 873 1.1 christos abuf->written = written; 874 1.1 christos SEM_BRANCH_FINI (vpc); 875 1.1 christos return vpc; 876 1.1 christos #undef FLD 877 1.1 christos } 878 1.1 christos 879 1.1 christos /* bbin: bbin $rs($bitnum),$offset */ 880 1.1 christos 881 1.1 christos static SEM_PC 882 1.1 christos SEM_FN_NAME (iq2000bf,bbin) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 883 1.1 christos { 884 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 885 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 886 1.1 christos int UNUSED written = 0; 887 1.1 christos IADDR UNUSED pc = abuf->addr; 888 1.1 christos SEM_BRANCH_INIT 889 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 890 1.1 christos 891 1.1 christos if (NOTSI (ANDSI (GET_H_GR (FLD (f_rs)), SLLSI (1, FLD (f_rt))))) { 892 1.1 christos { 893 1.1 christos { 894 1.1 christos USI opval = FLD (i_offset); 895 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 896 1.1 christos written |= (1 << 3); 897 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 898 1.1 christos } 899 1.1 christos } 900 1.1 christos } 901 1.1 christos 902 1.1 christos abuf->written = written; 903 1.1 christos SEM_BRANCH_FINI (vpc); 904 1.1 christos return vpc; 905 1.1 christos #undef FLD 906 1.1 christos } 907 1.1 christos 908 1.1 christos /* bbv: bbv $rs,$rt,$offset */ 909 1.1 christos 910 1.1 christos static SEM_PC 911 1.1 christos SEM_FN_NAME (iq2000bf,bbv) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 912 1.1 christos { 913 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 914 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 915 1.1 christos int UNUSED written = 0; 916 1.1 christos IADDR UNUSED pc = abuf->addr; 917 1.1 christos SEM_BRANCH_INIT 918 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 919 1.1 christos 920 1.1 christos if (ANDSI (GET_H_GR (FLD (f_rs)), SLLSI (1, ANDSI (GET_H_GR (FLD (f_rt)), 31)))) { 921 1.1 christos { 922 1.1 christos { 923 1.1 christos USI opval = FLD (i_offset); 924 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 925 1.1 christos written |= (1 << 3); 926 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 927 1.1 christos } 928 1.1 christos } 929 1.1 christos } 930 1.1 christos 931 1.1 christos abuf->written = written; 932 1.1 christos SEM_BRANCH_FINI (vpc); 933 1.1 christos return vpc; 934 1.1 christos #undef FLD 935 1.1 christos } 936 1.1 christos 937 1.1 christos /* bbvn: bbvn $rs,$rt,$offset */ 938 1.1 christos 939 1.1 christos static SEM_PC 940 1.1 christos SEM_FN_NAME (iq2000bf,bbvn) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 941 1.1 christos { 942 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 943 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 944 1.1 christos int UNUSED written = 0; 945 1.1 christos IADDR UNUSED pc = abuf->addr; 946 1.1 christos SEM_BRANCH_INIT 947 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 948 1.1 christos 949 1.1 christos if (NOTSI (ANDSI (GET_H_GR (FLD (f_rs)), SLLSI (1, ANDSI (GET_H_GR (FLD (f_rt)), 31))))) { 950 1.1 christos { 951 1.1 christos { 952 1.1 christos USI opval = FLD (i_offset); 953 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 954 1.1 christos written |= (1 << 3); 955 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 956 1.1 christos } 957 1.1 christos } 958 1.1 christos } 959 1.1 christos 960 1.1 christos abuf->written = written; 961 1.1 christos SEM_BRANCH_FINI (vpc); 962 1.1 christos return vpc; 963 1.1 christos #undef FLD 964 1.1 christos } 965 1.1 christos 966 1.1 christos /* beq: beq $rs,$rt,$offset */ 967 1.1 christos 968 1.1 christos static SEM_PC 969 1.1 christos SEM_FN_NAME (iq2000bf,beq) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 970 1.1 christos { 971 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 972 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 973 1.1 christos int UNUSED written = 0; 974 1.1 christos IADDR UNUSED pc = abuf->addr; 975 1.1 christos SEM_BRANCH_INIT 976 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 977 1.1 christos 978 1.1 christos if (EQSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt)))) { 979 1.1 christos { 980 1.1 christos { 981 1.1 christos USI opval = FLD (i_offset); 982 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 983 1.1 christos written |= (1 << 3); 984 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 985 1.1 christos } 986 1.1 christos } 987 1.1 christos } 988 1.1 christos 989 1.1 christos abuf->written = written; 990 1.1 christos SEM_BRANCH_FINI (vpc); 991 1.1 christos return vpc; 992 1.1 christos #undef FLD 993 1.1 christos } 994 1.1 christos 995 1.1 christos /* beql: beql $rs,$rt,$offset */ 996 1.1 christos 997 1.1 christos static SEM_PC 998 1.1 christos SEM_FN_NAME (iq2000bf,beql) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 999 1.1 christos { 1000 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1001 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1002 1.1 christos int UNUSED written = 0; 1003 1.1 christos IADDR UNUSED pc = abuf->addr; 1004 1.1 christos SEM_BRANCH_INIT 1005 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1006 1.1 christos 1007 1.1 christos if (EQSI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt)))) { 1008 1.1 christos { 1009 1.1 christos { 1010 1.1 christos USI opval = FLD (i_offset); 1011 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1012 1.1 christos written |= (1 << 3); 1013 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1014 1.1 christos } 1015 1.1 christos } 1016 1.1 christos } else { 1017 1.1 christos if (1) 1018 1.1 christos SEM_SKIP_INSN (current_cpu, sem_arg, vpc); 1019 1.1 christos } 1020 1.1 christos 1021 1.1 christos abuf->written = written; 1022 1.1 christos SEM_BRANCH_FINI (vpc); 1023 1.1 christos return vpc; 1024 1.1 christos #undef FLD 1025 1.1 christos } 1026 1.1 christos 1027 1.1 christos /* bgez: bgez $rs,$offset */ 1028 1.1 christos 1029 1.1 christos static SEM_PC 1030 1.1 christos SEM_FN_NAME (iq2000bf,bgez) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1031 1.1 christos { 1032 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1033 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1034 1.1 christos int UNUSED written = 0; 1035 1.1 christos IADDR UNUSED pc = abuf->addr; 1036 1.1 christos SEM_BRANCH_INIT 1037 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1038 1.1 christos 1039 1.1 christos if (GESI (GET_H_GR (FLD (f_rs)), 0)) { 1040 1.1 christos { 1041 1.1 christos { 1042 1.1 christos USI opval = FLD (i_offset); 1043 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1044 1.1 christos written |= (1 << 2); 1045 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1046 1.1 christos } 1047 1.1 christos } 1048 1.1 christos } 1049 1.1 christos 1050 1.1 christos abuf->written = written; 1051 1.1 christos SEM_BRANCH_FINI (vpc); 1052 1.1 christos return vpc; 1053 1.1 christos #undef FLD 1054 1.1 christos } 1055 1.1 christos 1056 1.1 christos /* bgezal: bgezal $rs,$offset */ 1057 1.1 christos 1058 1.1 christos static SEM_PC 1059 1.1 christos SEM_FN_NAME (iq2000bf,bgezal) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1060 1.1 christos { 1061 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1062 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1063 1.1 christos int UNUSED written = 0; 1064 1.1 christos IADDR UNUSED pc = abuf->addr; 1065 1.1 christos SEM_BRANCH_INIT 1066 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1067 1.1 christos 1068 1.1 christos if (GESI (GET_H_GR (FLD (f_rs)), 0)) { 1069 1.1 christos { 1070 1.1 christos { 1071 1.1 christos SI opval = ADDSI (pc, 8); 1072 1.1 christos SET_H_GR (((UINT) 31), opval); 1073 1.1 christos written |= (1 << 3); 1074 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1075 1.1 christos } 1076 1.1 christos { 1077 1.1 christos { 1078 1.1 christos USI opval = FLD (i_offset); 1079 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1080 1.1 christos written |= (1 << 4); 1081 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1082 1.1 christos } 1083 1.1 christos } 1084 1.1 christos } 1085 1.1 christos } 1086 1.1 christos 1087 1.1 christos abuf->written = written; 1088 1.1 christos SEM_BRANCH_FINI (vpc); 1089 1.1 christos return vpc; 1090 1.1 christos #undef FLD 1091 1.1 christos } 1092 1.1 christos 1093 1.1 christos /* bgezall: bgezall $rs,$offset */ 1094 1.1 christos 1095 1.1 christos static SEM_PC 1096 1.1 christos SEM_FN_NAME (iq2000bf,bgezall) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1097 1.1 christos { 1098 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1099 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1100 1.1 christos int UNUSED written = 0; 1101 1.1 christos IADDR UNUSED pc = abuf->addr; 1102 1.1 christos SEM_BRANCH_INIT 1103 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1104 1.1 christos 1105 1.1 christos if (GESI (GET_H_GR (FLD (f_rs)), 0)) { 1106 1.1 christos { 1107 1.1 christos { 1108 1.1 christos SI opval = ADDSI (pc, 8); 1109 1.1 christos SET_H_GR (((UINT) 31), opval); 1110 1.1 christos written |= (1 << 3); 1111 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1112 1.1 christos } 1113 1.1 christos { 1114 1.1 christos { 1115 1.1 christos USI opval = FLD (i_offset); 1116 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1117 1.1 christos written |= (1 << 4); 1118 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1119 1.1 christos } 1120 1.1 christos } 1121 1.1 christos } 1122 1.1 christos } else { 1123 1.1 christos if (1) 1124 1.1 christos SEM_SKIP_INSN (current_cpu, sem_arg, vpc); 1125 1.1 christos } 1126 1.1 christos 1127 1.1 christos abuf->written = written; 1128 1.1 christos SEM_BRANCH_FINI (vpc); 1129 1.1 christos return vpc; 1130 1.1 christos #undef FLD 1131 1.1 christos } 1132 1.1 christos 1133 1.1 christos /* bgezl: bgezl $rs,$offset */ 1134 1.1 christos 1135 1.1 christos static SEM_PC 1136 1.1 christos SEM_FN_NAME (iq2000bf,bgezl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1137 1.1 christos { 1138 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1139 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1140 1.1 christos int UNUSED written = 0; 1141 1.1 christos IADDR UNUSED pc = abuf->addr; 1142 1.1 christos SEM_BRANCH_INIT 1143 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1144 1.1 christos 1145 1.1 christos if (GESI (GET_H_GR (FLD (f_rs)), 0)) { 1146 1.1 christos { 1147 1.1 christos { 1148 1.1 christos USI opval = FLD (i_offset); 1149 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1150 1.1 christos written |= (1 << 2); 1151 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1152 1.1 christos } 1153 1.1 christos } 1154 1.1 christos } else { 1155 1.1 christos if (1) 1156 1.1 christos SEM_SKIP_INSN (current_cpu, sem_arg, vpc); 1157 1.1 christos } 1158 1.1 christos 1159 1.1 christos abuf->written = written; 1160 1.1 christos SEM_BRANCH_FINI (vpc); 1161 1.1 christos return vpc; 1162 1.1 christos #undef FLD 1163 1.1 christos } 1164 1.1 christos 1165 1.1 christos /* bltz: bltz $rs,$offset */ 1166 1.1 christos 1167 1.1 christos static SEM_PC 1168 1.1 christos SEM_FN_NAME (iq2000bf,bltz) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1169 1.1 christos { 1170 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1171 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1172 1.1 christos int UNUSED written = 0; 1173 1.1 christos IADDR UNUSED pc = abuf->addr; 1174 1.1 christos SEM_BRANCH_INIT 1175 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1176 1.1 christos 1177 1.1 christos if (LTSI (GET_H_GR (FLD (f_rs)), 0)) { 1178 1.1 christos { 1179 1.1 christos { 1180 1.1 christos USI opval = FLD (i_offset); 1181 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1182 1.1 christos written |= (1 << 2); 1183 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1184 1.1 christos } 1185 1.1 christos } 1186 1.1 christos } 1187 1.1 christos 1188 1.1 christos abuf->written = written; 1189 1.1 christos SEM_BRANCH_FINI (vpc); 1190 1.1 christos return vpc; 1191 1.1 christos #undef FLD 1192 1.1 christos } 1193 1.1 christos 1194 1.1 christos /* bltzl: bltzl $rs,$offset */ 1195 1.1 christos 1196 1.1 christos static SEM_PC 1197 1.1 christos SEM_FN_NAME (iq2000bf,bltzl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1198 1.1 christos { 1199 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1200 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1201 1.1 christos int UNUSED written = 0; 1202 1.1 christos IADDR UNUSED pc = abuf->addr; 1203 1.1 christos SEM_BRANCH_INIT 1204 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1205 1.1 christos 1206 1.1 christos if (LTSI (GET_H_GR (FLD (f_rs)), 0)) { 1207 1.1 christos { 1208 1.1 christos { 1209 1.1 christos USI opval = FLD (i_offset); 1210 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1211 1.1 christos written |= (1 << 2); 1212 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1213 1.1 christos } 1214 1.1 christos } 1215 1.1 christos } else { 1216 1.1 christos if (1) 1217 1.1 christos SEM_SKIP_INSN (current_cpu, sem_arg, vpc); 1218 1.1 christos } 1219 1.1 christos 1220 1.1 christos abuf->written = written; 1221 1.1 christos SEM_BRANCH_FINI (vpc); 1222 1.1 christos return vpc; 1223 1.1 christos #undef FLD 1224 1.1 christos } 1225 1.1 christos 1226 1.1 christos /* bltzal: bltzal $rs,$offset */ 1227 1.1 christos 1228 1.1 christos static SEM_PC 1229 1.1 christos SEM_FN_NAME (iq2000bf,bltzal) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1230 1.1 christos { 1231 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1232 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1233 1.1 christos int UNUSED written = 0; 1234 1.1 christos IADDR UNUSED pc = abuf->addr; 1235 1.1 christos SEM_BRANCH_INIT 1236 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1237 1.1 christos 1238 1.1 christos if (LTSI (GET_H_GR (FLD (f_rs)), 0)) { 1239 1.1 christos { 1240 1.1 christos { 1241 1.1 christos SI opval = ADDSI (pc, 8); 1242 1.1 christos SET_H_GR (((UINT) 31), opval); 1243 1.1 christos written |= (1 << 3); 1244 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1245 1.1 christos } 1246 1.1 christos { 1247 1.1 christos { 1248 1.1 christos USI opval = FLD (i_offset); 1249 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1250 1.1 christos written |= (1 << 4); 1251 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1252 1.1 christos } 1253 1.1 christos } 1254 1.1 christos } 1255 1.1 christos } 1256 1.1 christos 1257 1.1 christos abuf->written = written; 1258 1.1 christos SEM_BRANCH_FINI (vpc); 1259 1.1 christos return vpc; 1260 1.1 christos #undef FLD 1261 1.1 christos } 1262 1.1 christos 1263 1.1 christos /* bltzall: bltzall $rs,$offset */ 1264 1.1 christos 1265 1.1 christos static SEM_PC 1266 1.1 christos SEM_FN_NAME (iq2000bf,bltzall) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1267 1.1 christos { 1268 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1269 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1270 1.1 christos int UNUSED written = 0; 1271 1.1 christos IADDR UNUSED pc = abuf->addr; 1272 1.1 christos SEM_BRANCH_INIT 1273 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1274 1.1 christos 1275 1.1 christos if (LTSI (GET_H_GR (FLD (f_rs)), 0)) { 1276 1.1 christos { 1277 1.1 christos { 1278 1.1 christos SI opval = ADDSI (pc, 8); 1279 1.1 christos SET_H_GR (((UINT) 31), opval); 1280 1.1 christos written |= (1 << 3); 1281 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1282 1.1 christos } 1283 1.1 christos { 1284 1.1 christos { 1285 1.1 christos USI opval = FLD (i_offset); 1286 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1287 1.1 christos written |= (1 << 4); 1288 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1289 1.1 christos } 1290 1.1 christos } 1291 1.1 christos } 1292 1.1 christos } else { 1293 1.1 christos if (1) 1294 1.1 christos SEM_SKIP_INSN (current_cpu, sem_arg, vpc); 1295 1.1 christos } 1296 1.1 christos 1297 1.1 christos abuf->written = written; 1298 1.1 christos SEM_BRANCH_FINI (vpc); 1299 1.1 christos return vpc; 1300 1.1 christos #undef FLD 1301 1.1 christos } 1302 1.1 christos 1303 1.1 christos /* bmb0: bmb0 $rs,$rt,$offset */ 1304 1.1 christos 1305 1.1 christos static SEM_PC 1306 1.1 christos SEM_FN_NAME (iq2000bf,bmb0) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1307 1.1 christos { 1308 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1309 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1310 1.1 christos int UNUSED written = 0; 1311 1.1 christos IADDR UNUSED pc = abuf->addr; 1312 1.1 christos SEM_BRANCH_INIT 1313 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1314 1.1 christos 1315 1.1 christos if (EQSI (ANDSI (GET_H_GR (FLD (f_rs)), 255), ANDSI (GET_H_GR (FLD (f_rt)), 255))) { 1316 1.1 christos { 1317 1.1 christos { 1318 1.1 christos USI opval = FLD (i_offset); 1319 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1320 1.1 christos written |= (1 << 3); 1321 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1322 1.1 christos } 1323 1.1 christos } 1324 1.1 christos } 1325 1.1 christos 1326 1.1 christos abuf->written = written; 1327 1.1 christos SEM_BRANCH_FINI (vpc); 1328 1.1 christos return vpc; 1329 1.1 christos #undef FLD 1330 1.1 christos } 1331 1.1 christos 1332 1.1 christos /* bmb1: bmb1 $rs,$rt,$offset */ 1333 1.1 christos 1334 1.1 christos static SEM_PC 1335 1.1 christos SEM_FN_NAME (iq2000bf,bmb1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1336 1.1 christos { 1337 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1338 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1339 1.1 christos int UNUSED written = 0; 1340 1.1 christos IADDR UNUSED pc = abuf->addr; 1341 1.1 christos SEM_BRANCH_INIT 1342 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1343 1.1 christos 1344 1.1 christos if (EQSI (ANDSI (GET_H_GR (FLD (f_rs)), 65280), ANDSI (GET_H_GR (FLD (f_rt)), 65280))) { 1345 1.1 christos { 1346 1.1 christos { 1347 1.1 christos USI opval = FLD (i_offset); 1348 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1349 1.1 christos written |= (1 << 3); 1350 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1351 1.1 christos } 1352 1.1 christos } 1353 1.1 christos } 1354 1.1 christos 1355 1.1 christos abuf->written = written; 1356 1.1 christos SEM_BRANCH_FINI (vpc); 1357 1.1 christos return vpc; 1358 1.1 christos #undef FLD 1359 1.1 christos } 1360 1.1 christos 1361 1.1 christos /* bmb2: bmb2 $rs,$rt,$offset */ 1362 1.1 christos 1363 1.1 christos static SEM_PC 1364 1.1 christos SEM_FN_NAME (iq2000bf,bmb2) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1365 1.1 christos { 1366 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1367 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1368 1.1 christos int UNUSED written = 0; 1369 1.1 christos IADDR UNUSED pc = abuf->addr; 1370 1.1 christos SEM_BRANCH_INIT 1371 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1372 1.1 christos 1373 1.1 christos if (EQSI (ANDSI (GET_H_GR (FLD (f_rs)), 16711680), ANDSI (GET_H_GR (FLD (f_rt)), 16711680))) { 1374 1.1 christos { 1375 1.1 christos { 1376 1.1 christos USI opval = FLD (i_offset); 1377 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1378 1.1 christos written |= (1 << 3); 1379 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1380 1.1 christos } 1381 1.1 christos } 1382 1.1 christos } 1383 1.1 christos 1384 1.1 christos abuf->written = written; 1385 1.1 christos SEM_BRANCH_FINI (vpc); 1386 1.1 christos return vpc; 1387 1.1 christos #undef FLD 1388 1.1 christos } 1389 1.1 christos 1390 1.1 christos /* bmb3: bmb3 $rs,$rt,$offset */ 1391 1.1 christos 1392 1.1 christos static SEM_PC 1393 1.1 christos SEM_FN_NAME (iq2000bf,bmb3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1394 1.1 christos { 1395 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1396 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1397 1.1 christos int UNUSED written = 0; 1398 1.1 christos IADDR UNUSED pc = abuf->addr; 1399 1.1 christos SEM_BRANCH_INIT 1400 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1401 1.1 christos 1402 1.1 christos if (EQSI (ANDSI (GET_H_GR (FLD (f_rs)), 0xff000000), ANDSI (GET_H_GR (FLD (f_rt)), 0xff000000))) { 1403 1.1 christos { 1404 1.1 christos { 1405 1.1 christos USI opval = FLD (i_offset); 1406 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1407 1.1 christos written |= (1 << 3); 1408 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1409 1.1 christos } 1410 1.1 christos } 1411 1.1 christos } 1412 1.1 christos 1413 1.1 christos abuf->written = written; 1414 1.1 christos SEM_BRANCH_FINI (vpc); 1415 1.1 christos return vpc; 1416 1.1 christos #undef FLD 1417 1.1 christos } 1418 1.1 christos 1419 1.1 christos /* bne: bne $rs,$rt,$offset */ 1420 1.1 christos 1421 1.1 christos static SEM_PC 1422 1.1 christos SEM_FN_NAME (iq2000bf,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1423 1.1 christos { 1424 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1425 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1426 1.1 christos int UNUSED written = 0; 1427 1.1 christos IADDR UNUSED pc = abuf->addr; 1428 1.1 christos SEM_BRANCH_INIT 1429 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1430 1.1 christos 1431 1.1 christos if (NESI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt)))) { 1432 1.1 christos { 1433 1.1 christos { 1434 1.1 christos USI opval = FLD (i_offset); 1435 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1436 1.1 christos written |= (1 << 3); 1437 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1438 1.1 christos } 1439 1.1 christos } 1440 1.1 christos } 1441 1.1 christos 1442 1.1 christos abuf->written = written; 1443 1.1 christos SEM_BRANCH_FINI (vpc); 1444 1.1 christos return vpc; 1445 1.1 christos #undef FLD 1446 1.1 christos } 1447 1.1 christos 1448 1.1 christos /* bnel: bnel $rs,$rt,$offset */ 1449 1.1 christos 1450 1.1 christos static SEM_PC 1451 1.1 christos SEM_FN_NAME (iq2000bf,bnel) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1452 1.1 christos { 1453 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1454 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1455 1.1 christos int UNUSED written = 0; 1456 1.1 christos IADDR UNUSED pc = abuf->addr; 1457 1.1 christos SEM_BRANCH_INIT 1458 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1459 1.1 christos 1460 1.1 christos if (NESI (GET_H_GR (FLD (f_rs)), GET_H_GR (FLD (f_rt)))) { 1461 1.1 christos { 1462 1.1 christos { 1463 1.1 christos USI opval = FLD (i_offset); 1464 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1465 1.1 christos written |= (1 << 3); 1466 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1467 1.1 christos } 1468 1.1 christos } 1469 1.1 christos } else { 1470 1.1 christos if (1) 1471 1.1 christos SEM_SKIP_INSN (current_cpu, sem_arg, vpc); 1472 1.1 christos } 1473 1.1 christos 1474 1.1 christos abuf->written = written; 1475 1.1 christos SEM_BRANCH_FINI (vpc); 1476 1.1 christos return vpc; 1477 1.1 christos #undef FLD 1478 1.1 christos } 1479 1.1 christos 1480 1.1 christos /* jalr: jalr $rd,$rs */ 1481 1.1 christos 1482 1.1 christos static SEM_PC 1483 1.1 christos SEM_FN_NAME (iq2000bf,jalr) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1484 1.1 christos { 1485 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 1486 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1487 1.1 christos int UNUSED written = 0; 1488 1.1 christos IADDR UNUSED pc = abuf->addr; 1489 1.1 christos SEM_BRANCH_INIT 1490 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1491 1.1 christos 1492 1.1 christos { 1493 1.1 christos { 1494 1.1 christos { 1495 1.1 christos SI opval = ADDSI (pc, 8); 1496 1.1 christos SET_H_GR (FLD (f_rd), opval); 1497 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1498 1.1 christos } 1499 1.1 christos { 1500 1.1 christos USI opval = GET_H_GR (FLD (f_rs)); 1501 1.1 christos SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); 1502 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1503 1.1 christos } 1504 1.1 christos } 1505 1.1 christos } 1506 1.1 christos 1507 1.1 christos SEM_BRANCH_FINI (vpc); 1508 1.1 christos return vpc; 1509 1.1 christos #undef FLD 1510 1.1 christos } 1511 1.1 christos 1512 1.1 christos /* jr: jr $rs */ 1513 1.1 christos 1514 1.1 christos static SEM_PC 1515 1.1 christos SEM_FN_NAME (iq2000bf,jr) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1516 1.1 christos { 1517 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1518 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1519 1.1 christos int UNUSED written = 0; 1520 1.1 christos IADDR UNUSED pc = abuf->addr; 1521 1.1 christos SEM_BRANCH_INIT 1522 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1523 1.1 christos 1524 1.1 christos { 1525 1.1 christos { 1526 1.1 christos USI opval = GET_H_GR (FLD (f_rs)); 1527 1.1 christos SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); 1528 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1529 1.1 christos } 1530 1.1 christos } 1531 1.1 christos 1532 1.1 christos SEM_BRANCH_FINI (vpc); 1533 1.1 christos return vpc; 1534 1.1 christos #undef FLD 1535 1.1 christos } 1536 1.1 christos 1537 1.1 christos /* lb: lb $rt,$lo16($base) */ 1538 1.1 christos 1539 1.1 christos static SEM_PC 1540 1.1 christos SEM_FN_NAME (iq2000bf,lb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1541 1.1 christos { 1542 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1543 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1544 1.1 christos int UNUSED written = 0; 1545 1.1 christos IADDR UNUSED pc = abuf->addr; 1546 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1547 1.1 christos 1548 1.1 christos { 1549 1.1 christos SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); 1550 1.1 christos SET_H_GR (FLD (f_rt), opval); 1551 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1552 1.1 christos } 1553 1.1 christos 1554 1.1 christos return vpc; 1555 1.1 christos #undef FLD 1556 1.1 christos } 1557 1.1 christos 1558 1.1 christos /* lbu: lbu $rt,$lo16($base) */ 1559 1.1 christos 1560 1.1 christos static SEM_PC 1561 1.1 christos SEM_FN_NAME (iq2000bf,lbu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1562 1.1 christos { 1563 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1564 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1565 1.1 christos int UNUSED written = 0; 1566 1.1 christos IADDR UNUSED pc = abuf->addr; 1567 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1568 1.1 christos 1569 1.1 christos { 1570 1.1 christos SI opval = ZEXTQISI (GETMEMQI (current_cpu, pc, ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); 1571 1.1 christos SET_H_GR (FLD (f_rt), opval); 1572 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1573 1.1 christos } 1574 1.1 christos 1575 1.1 christos return vpc; 1576 1.1 christos #undef FLD 1577 1.1 christos } 1578 1.1 christos 1579 1.1 christos /* lh: lh $rt,$lo16($base) */ 1580 1.1 christos 1581 1.1 christos static SEM_PC 1582 1.1 christos SEM_FN_NAME (iq2000bf,lh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1583 1.1 christos { 1584 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1585 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1586 1.1 christos int UNUSED written = 0; 1587 1.1 christos IADDR UNUSED pc = abuf->addr; 1588 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1589 1.1 christos 1590 1.1 christos { 1591 1.1 christos SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); 1592 1.1 christos SET_H_GR (FLD (f_rt), opval); 1593 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1594 1.1 christos } 1595 1.1 christos 1596 1.1 christos return vpc; 1597 1.1 christos #undef FLD 1598 1.1 christos } 1599 1.1 christos 1600 1.1 christos /* lhu: lhu $rt,$lo16($base) */ 1601 1.1 christos 1602 1.1 christos static SEM_PC 1603 1.1 christos SEM_FN_NAME (iq2000bf,lhu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1604 1.1 christos { 1605 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1606 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1607 1.1 christos int UNUSED written = 0; 1608 1.1 christos IADDR UNUSED pc = abuf->addr; 1609 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1610 1.1 christos 1611 1.1 christos { 1612 1.1 christos SI opval = ZEXTHISI (GETMEMHI (current_cpu, pc, ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); 1613 1.1 christos SET_H_GR (FLD (f_rt), opval); 1614 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1615 1.1 christos } 1616 1.1 christos 1617 1.1 christos return vpc; 1618 1.1 christos #undef FLD 1619 1.1 christos } 1620 1.1 christos 1621 1.1 christos /* lui: lui $rt,$hi16 */ 1622 1.1 christos 1623 1.1 christos static SEM_PC 1624 1.1 christos SEM_FN_NAME (iq2000bf,lui) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1625 1.1 christos { 1626 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1627 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1628 1.1 christos int UNUSED written = 0; 1629 1.1 christos IADDR UNUSED pc = abuf->addr; 1630 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1631 1.1 christos 1632 1.1 christos { 1633 1.1 christos SI opval = SLLSI (FLD (f_imm), 16); 1634 1.1 christos SET_H_GR (FLD (f_rt), opval); 1635 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1636 1.1 christos } 1637 1.1 christos 1638 1.1 christos return vpc; 1639 1.1 christos #undef FLD 1640 1.1 christos } 1641 1.1 christos 1642 1.1 christos /* lw: lw $rt,$lo16($base) */ 1643 1.1 christos 1644 1.1 christos static SEM_PC 1645 1.1 christos SEM_FN_NAME (iq2000bf,lw) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1646 1.1 christos { 1647 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1648 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1649 1.1 christos int UNUSED written = 0; 1650 1.1 christos IADDR UNUSED pc = abuf->addr; 1651 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1652 1.1 christos 1653 1.1 christos { 1654 1.1 christos SI opval = GETMEMSI (current_cpu, pc, ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm))))); 1655 1.1 christos SET_H_GR (FLD (f_rt), opval); 1656 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1657 1.1 christos } 1658 1.1 christos 1659 1.1 christos return vpc; 1660 1.1 christos #undef FLD 1661 1.1 christos } 1662 1.1 christos 1663 1.1 christos /* sb: sb $rt,$lo16($base) */ 1664 1.1 christos 1665 1.1 christos static SEM_PC 1666 1.1 christos SEM_FN_NAME (iq2000bf,sb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1667 1.1 christos { 1668 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1669 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1670 1.1 christos int UNUSED written = 0; 1671 1.1 christos IADDR UNUSED pc = abuf->addr; 1672 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1673 1.1 christos 1674 1.1 christos { 1675 1.1 christos QI opval = ANDQI (GET_H_GR (FLD (f_rt)), 255); 1676 1.1 christos SETMEMQI (current_cpu, pc, ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); 1677 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); 1678 1.1 christos } 1679 1.1 christos 1680 1.1 christos return vpc; 1681 1.1 christos #undef FLD 1682 1.1 christos } 1683 1.1 christos 1684 1.1 christos /* sh: sh $rt,$lo16($base) */ 1685 1.1 christos 1686 1.1 christos static SEM_PC 1687 1.1 christos SEM_FN_NAME (iq2000bf,sh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1688 1.1 christos { 1689 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1690 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1691 1.1 christos int UNUSED written = 0; 1692 1.1 christos IADDR UNUSED pc = abuf->addr; 1693 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1694 1.1 christos 1695 1.1 christos { 1696 1.1 christos HI opval = ANDHI (GET_H_GR (FLD (f_rt)), 65535); 1697 1.1 christos SETMEMHI (current_cpu, pc, ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); 1698 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); 1699 1.1 christos } 1700 1.1 christos 1701 1.1 christos return vpc; 1702 1.1 christos #undef FLD 1703 1.1 christos } 1704 1.1 christos 1705 1.1 christos /* sw: sw $rt,$lo16($base) */ 1706 1.1 christos 1707 1.1 christos static SEM_PC 1708 1.1 christos SEM_FN_NAME (iq2000bf,sw) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1709 1.1 christos { 1710 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1711 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1712 1.1 christos int UNUSED written = 0; 1713 1.1 christos IADDR UNUSED pc = abuf->addr; 1714 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1715 1.1 christos 1716 1.1 christos { 1717 1.1 christos SI opval = GET_H_GR (FLD (f_rt)); 1718 1.1 christos SETMEMSI (current_cpu, pc, ADDSI (GET_H_GR (FLD (f_rs)), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); 1719 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); 1720 1.1 christos } 1721 1.1 christos 1722 1.1 christos return vpc; 1723 1.1 christos #undef FLD 1724 1.1 christos } 1725 1.1 christos 1726 1.1 christos /* break: break */ 1727 1.1 christos 1728 1.1 christos static SEM_PC 1729 1.1 christos SEM_FN_NAME (iq2000bf,break) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1730 1.1 christos { 1731 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 1732 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1733 1.1 christos int UNUSED written = 0; 1734 1.1 christos IADDR UNUSED pc = abuf->addr; 1735 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1736 1.1 christos 1737 1.1 christos do_break (current_cpu, pc); 1738 1.1 christos 1739 1.1 christos return vpc; 1740 1.1 christos #undef FLD 1741 1.1 christos } 1742 1.1 christos 1743 1.1 christos /* syscall: syscall */ 1744 1.1 christos 1745 1.1 christos static SEM_PC 1746 1.1 christos SEM_FN_NAME (iq2000bf,syscall) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1747 1.1 christos { 1748 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 1749 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1750 1.1 christos int UNUSED written = 0; 1751 1.1.1.11 christos IADDR UNUSED pc = abuf->addr; 1752 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1753 1.1 christos 1754 1.1.1.11 christos do_syscall (current_cpu, pc); 1755 1.1 christos 1756 1.1 christos return vpc; 1757 1.1 christos #undef FLD 1758 1.1 christos } 1759 1.1 christos 1760 1.1 christos /* andoui: andoui $rt,$rs,$hi16 */ 1761 1.1 christos 1762 1.1 christos static SEM_PC 1763 1.1 christos SEM_FN_NAME (iq2000bf,andoui) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1764 1.1 christos { 1765 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1766 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1767 1.1 christos int UNUSED written = 0; 1768 1.1 christos IADDR UNUSED pc = abuf->addr; 1769 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1770 1.1 christos 1771 1.1 christos { 1772 1.1 christos SI opval = ANDSI (GET_H_GR (FLD (f_rs)), ORSI (SLLSI (FLD (f_imm), 16), 65535)); 1773 1.1 christos SET_H_GR (FLD (f_rt), opval); 1774 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1775 1.1 christos } 1776 1.1 christos 1777 1.1 christos return vpc; 1778 1.1 christos #undef FLD 1779 1.1 christos } 1780 1.1 christos 1781 1.1 christos /* orui: orui $rt,$rs,$hi16 */ 1782 1.1 christos 1783 1.1 christos static SEM_PC 1784 1.1 christos SEM_FN_NAME (iq2000bf,orui) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1785 1.1 christos { 1786 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 1787 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1788 1.1 christos int UNUSED written = 0; 1789 1.1 christos IADDR UNUSED pc = abuf->addr; 1790 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1791 1.1 christos 1792 1.1 christos { 1793 1.1 christos SI opval = ORSI (GET_H_GR (FLD (f_rs)), SLLSI (FLD (f_imm), 16)); 1794 1.1 christos SET_H_GR (FLD (f_rt), opval); 1795 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1796 1.1 christos } 1797 1.1 christos 1798 1.1 christos return vpc; 1799 1.1 christos #undef FLD 1800 1.1 christos } 1801 1.1 christos 1802 1.1 christos /* bgtz: bgtz $rs,$offset */ 1803 1.1 christos 1804 1.1 christos static SEM_PC 1805 1.1 christos SEM_FN_NAME (iq2000bf,bgtz) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1806 1.1 christos { 1807 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1808 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1809 1.1 christos int UNUSED written = 0; 1810 1.1 christos IADDR UNUSED pc = abuf->addr; 1811 1.1 christos SEM_BRANCH_INIT 1812 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1813 1.1 christos 1814 1.1 christos if (GTSI (GET_H_GR (FLD (f_rs)), 0)) { 1815 1.1 christos { 1816 1.1 christos { 1817 1.1 christos USI opval = FLD (i_offset); 1818 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1819 1.1 christos written |= (1 << 2); 1820 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1821 1.1 christos } 1822 1.1 christos } 1823 1.1 christos } 1824 1.1 christos 1825 1.1 christos abuf->written = written; 1826 1.1 christos SEM_BRANCH_FINI (vpc); 1827 1.1 christos return vpc; 1828 1.1 christos #undef FLD 1829 1.1 christos } 1830 1.1 christos 1831 1.1 christos /* bgtzl: bgtzl $rs,$offset */ 1832 1.1 christos 1833 1.1 christos static SEM_PC 1834 1.1 christos SEM_FN_NAME (iq2000bf,bgtzl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1835 1.1 christos { 1836 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1837 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1838 1.1 christos int UNUSED written = 0; 1839 1.1 christos IADDR UNUSED pc = abuf->addr; 1840 1.1 christos SEM_BRANCH_INIT 1841 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1842 1.1 christos 1843 1.1 christos if (GTSI (GET_H_GR (FLD (f_rs)), 0)) { 1844 1.1 christos { 1845 1.1 christos { 1846 1.1 christos USI opval = FLD (i_offset); 1847 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1848 1.1 christos written |= (1 << 2); 1849 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1850 1.1 christos } 1851 1.1 christos } 1852 1.1 christos } else { 1853 1.1 christos if (1) 1854 1.1 christos SEM_SKIP_INSN (current_cpu, sem_arg, vpc); 1855 1.1 christos } 1856 1.1 christos 1857 1.1 christos abuf->written = written; 1858 1.1 christos SEM_BRANCH_FINI (vpc); 1859 1.1 christos return vpc; 1860 1.1 christos #undef FLD 1861 1.1 christos } 1862 1.1 christos 1863 1.1 christos /* blez: blez $rs,$offset */ 1864 1.1 christos 1865 1.1 christos static SEM_PC 1866 1.1 christos SEM_FN_NAME (iq2000bf,blez) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1867 1.1 christos { 1868 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1869 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1870 1.1 christos int UNUSED written = 0; 1871 1.1 christos IADDR UNUSED pc = abuf->addr; 1872 1.1 christos SEM_BRANCH_INIT 1873 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1874 1.1 christos 1875 1.1 christos if (LESI (GET_H_GR (FLD (f_rs)), 0)) { 1876 1.1 christos { 1877 1.1 christos { 1878 1.1 christos USI opval = FLD (i_offset); 1879 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1880 1.1 christos written |= (1 << 2); 1881 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1882 1.1 christos } 1883 1.1 christos } 1884 1.1 christos } 1885 1.1 christos 1886 1.1 christos abuf->written = written; 1887 1.1 christos SEM_BRANCH_FINI (vpc); 1888 1.1 christos return vpc; 1889 1.1 christos #undef FLD 1890 1.1 christos } 1891 1.1 christos 1892 1.1 christos /* blezl: blezl $rs,$offset */ 1893 1.1 christos 1894 1.1 christos static SEM_PC 1895 1.1 christos SEM_FN_NAME (iq2000bf,blezl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1896 1.1 christos { 1897 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 1898 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1899 1.1 christos int UNUSED written = 0; 1900 1.1 christos IADDR UNUSED pc = abuf->addr; 1901 1.1 christos SEM_BRANCH_INIT 1902 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1903 1.1 christos 1904 1.1 christos if (LESI (GET_H_GR (FLD (f_rs)), 0)) { 1905 1.1 christos { 1906 1.1 christos { 1907 1.1 christos USI opval = FLD (i_offset); 1908 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 1909 1.1 christos written |= (1 << 2); 1910 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 1911 1.1 christos } 1912 1.1 christos } 1913 1.1 christos } else { 1914 1.1 christos if (1) 1915 1.1 christos SEM_SKIP_INSN (current_cpu, sem_arg, vpc); 1916 1.1 christos } 1917 1.1 christos 1918 1.1 christos abuf->written = written; 1919 1.1 christos SEM_BRANCH_FINI (vpc); 1920 1.1 christos return vpc; 1921 1.1 christos #undef FLD 1922 1.1 christos } 1923 1.1 christos 1924 1.1 christos /* mrgb: mrgb $rd,$rs,$rt,$mask */ 1925 1.1 christos 1926 1.1 christos static SEM_PC 1927 1.1 christos SEM_FN_NAME (iq2000bf,mrgb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1928 1.1 christos { 1929 1.1 christos #define FLD(f) abuf->fields.sfmt_mrgb.f 1930 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1931 1.1 christos int UNUSED written = 0; 1932 1.1 christos IADDR UNUSED pc = abuf->addr; 1933 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1934 1.1 christos 1935 1.1 christos { 1936 1.1 christos SI tmp_temp; 1937 1.1 christos if (NOTSI (ANDSI (FLD (f_mask), SLLSI (1, 0)))) { 1938 1.1 christos tmp_temp = ANDSI (GET_H_GR (FLD (f_rs)), 255); 1939 1.1 christos } else { 1940 1.1 christos tmp_temp = ANDSI (GET_H_GR (FLD (f_rt)), 255); 1941 1.1 christos } 1942 1.1 christos if (NOTSI (ANDSI (FLD (f_mask), SLLSI (1, 1)))) { 1943 1.1 christos tmp_temp = ORSI (tmp_temp, ANDSI (GET_H_GR (FLD (f_rs)), 65280)); 1944 1.1 christos } else { 1945 1.1 christos tmp_temp = ORSI (tmp_temp, ANDSI (GET_H_GR (FLD (f_rt)), 65280)); 1946 1.1 christos } 1947 1.1 christos if (NOTSI (ANDSI (FLD (f_mask), SLLSI (1, 2)))) { 1948 1.1 christos tmp_temp = ORSI (tmp_temp, ANDSI (GET_H_GR (FLD (f_rs)), 16711680)); 1949 1.1 christos } else { 1950 1.1 christos tmp_temp = ORSI (tmp_temp, ANDSI (GET_H_GR (FLD (f_rt)), 16711680)); 1951 1.1 christos } 1952 1.1 christos if (NOTSI (ANDSI (FLD (f_mask), SLLSI (1, 3)))) { 1953 1.1 christos tmp_temp = ORSI (tmp_temp, ANDSI (GET_H_GR (FLD (f_rs)), 0xff000000)); 1954 1.1 christos } else { 1955 1.1 christos tmp_temp = ORSI (tmp_temp, ANDSI (GET_H_GR (FLD (f_rt)), 0xff000000)); 1956 1.1 christos } 1957 1.1 christos { 1958 1.1 christos SI opval = tmp_temp; 1959 1.1 christos SET_H_GR (FLD (f_rd), opval); 1960 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 1961 1.1 christos } 1962 1.1 christos } 1963 1.1 christos 1964 1.1 christos return vpc; 1965 1.1 christos #undef FLD 1966 1.1 christos } 1967 1.1 christos 1968 1.1 christos /* bctxt: bctxt $rs,$offset */ 1969 1.1 christos 1970 1.1 christos static SEM_PC 1971 1.1 christos SEM_FN_NAME (iq2000bf,bctxt) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1972 1.1 christos { 1973 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 1974 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1975 1.1 christos int UNUSED written = 0; 1976 1.1 christos IADDR UNUSED pc = abuf->addr; 1977 1.1 christos SEM_BRANCH_INIT 1978 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1979 1.1 christos 1980 1.1 christos ((void) 0); /*nop*/ 1981 1.1 christos 1982 1.1 christos SEM_BRANCH_FINI (vpc); 1983 1.1 christos return vpc; 1984 1.1 christos #undef FLD 1985 1.1 christos } 1986 1.1 christos 1987 1.1 christos /* bc0f: bc0f $offset */ 1988 1.1 christos 1989 1.1 christos static SEM_PC 1990 1.1 christos SEM_FN_NAME (iq2000bf,bc0f) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 1991 1.1 christos { 1992 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 1993 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 1994 1.1 christos int UNUSED written = 0; 1995 1.1 christos IADDR UNUSED pc = abuf->addr; 1996 1.1 christos SEM_BRANCH_INIT 1997 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 1998 1.1 christos 1999 1.1 christos ((void) 0); /*nop*/ 2000 1.1 christos 2001 1.1 christos SEM_BRANCH_FINI (vpc); 2002 1.1 christos return vpc; 2003 1.1 christos #undef FLD 2004 1.1 christos } 2005 1.1 christos 2006 1.1 christos /* bc0fl: bc0fl $offset */ 2007 1.1 christos 2008 1.1 christos static SEM_PC 2009 1.1 christos SEM_FN_NAME (iq2000bf,bc0fl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2010 1.1 christos { 2011 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2012 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2013 1.1 christos int UNUSED written = 0; 2014 1.1 christos IADDR UNUSED pc = abuf->addr; 2015 1.1 christos SEM_BRANCH_INIT 2016 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2017 1.1 christos 2018 1.1 christos ((void) 0); /*nop*/ 2019 1.1 christos 2020 1.1 christos SEM_BRANCH_FINI (vpc); 2021 1.1 christos return vpc; 2022 1.1 christos #undef FLD 2023 1.1 christos } 2024 1.1 christos 2025 1.1 christos /* bc3f: bc3f $offset */ 2026 1.1 christos 2027 1.1 christos static SEM_PC 2028 1.1 christos SEM_FN_NAME (iq2000bf,bc3f) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2029 1.1 christos { 2030 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2031 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2032 1.1 christos int UNUSED written = 0; 2033 1.1 christos IADDR UNUSED pc = abuf->addr; 2034 1.1 christos SEM_BRANCH_INIT 2035 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2036 1.1 christos 2037 1.1 christos ((void) 0); /*nop*/ 2038 1.1 christos 2039 1.1 christos SEM_BRANCH_FINI (vpc); 2040 1.1 christos return vpc; 2041 1.1 christos #undef FLD 2042 1.1 christos } 2043 1.1 christos 2044 1.1 christos /* bc3fl: bc3fl $offset */ 2045 1.1 christos 2046 1.1 christos static SEM_PC 2047 1.1 christos SEM_FN_NAME (iq2000bf,bc3fl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2048 1.1 christos { 2049 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2050 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2051 1.1 christos int UNUSED written = 0; 2052 1.1 christos IADDR UNUSED pc = abuf->addr; 2053 1.1 christos SEM_BRANCH_INIT 2054 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2055 1.1 christos 2056 1.1 christos ((void) 0); /*nop*/ 2057 1.1 christos 2058 1.1 christos SEM_BRANCH_FINI (vpc); 2059 1.1 christos return vpc; 2060 1.1 christos #undef FLD 2061 1.1 christos } 2062 1.1 christos 2063 1.1 christos /* bc0t: bc0t $offset */ 2064 1.1 christos 2065 1.1 christos static SEM_PC 2066 1.1 christos SEM_FN_NAME (iq2000bf,bc0t) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2067 1.1 christos { 2068 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2069 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2070 1.1 christos int UNUSED written = 0; 2071 1.1 christos IADDR UNUSED pc = abuf->addr; 2072 1.1 christos SEM_BRANCH_INIT 2073 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2074 1.1 christos 2075 1.1 christos ((void) 0); /*nop*/ 2076 1.1 christos 2077 1.1 christos SEM_BRANCH_FINI (vpc); 2078 1.1 christos return vpc; 2079 1.1 christos #undef FLD 2080 1.1 christos } 2081 1.1 christos 2082 1.1 christos /* bc0tl: bc0tl $offset */ 2083 1.1 christos 2084 1.1 christos static SEM_PC 2085 1.1 christos SEM_FN_NAME (iq2000bf,bc0tl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2086 1.1 christos { 2087 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2088 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2089 1.1 christos int UNUSED written = 0; 2090 1.1 christos IADDR UNUSED pc = abuf->addr; 2091 1.1 christos SEM_BRANCH_INIT 2092 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2093 1.1 christos 2094 1.1 christos ((void) 0); /*nop*/ 2095 1.1 christos 2096 1.1 christos SEM_BRANCH_FINI (vpc); 2097 1.1 christos return vpc; 2098 1.1 christos #undef FLD 2099 1.1 christos } 2100 1.1 christos 2101 1.1 christos /* bc3t: bc3t $offset */ 2102 1.1 christos 2103 1.1 christos static SEM_PC 2104 1.1 christos SEM_FN_NAME (iq2000bf,bc3t) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2105 1.1 christos { 2106 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2107 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2108 1.1 christos int UNUSED written = 0; 2109 1.1 christos IADDR UNUSED pc = abuf->addr; 2110 1.1 christos SEM_BRANCH_INIT 2111 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2112 1.1 christos 2113 1.1 christos ((void) 0); /*nop*/ 2114 1.1 christos 2115 1.1 christos SEM_BRANCH_FINI (vpc); 2116 1.1 christos return vpc; 2117 1.1 christos #undef FLD 2118 1.1 christos } 2119 1.1 christos 2120 1.1 christos /* bc3tl: bc3tl $offset */ 2121 1.1 christos 2122 1.1 christos static SEM_PC 2123 1.1 christos SEM_FN_NAME (iq2000bf,bc3tl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2124 1.1 christos { 2125 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2126 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2127 1.1 christos int UNUSED written = 0; 2128 1.1 christos IADDR UNUSED pc = abuf->addr; 2129 1.1 christos SEM_BRANCH_INIT 2130 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2131 1.1 christos 2132 1.1 christos ((void) 0); /*nop*/ 2133 1.1 christos 2134 1.1 christos SEM_BRANCH_FINI (vpc); 2135 1.1 christos return vpc; 2136 1.1 christos #undef FLD 2137 1.1 christos } 2138 1.1 christos 2139 1.1 christos /* cfc0: cfc0 $rt,$rd */ 2140 1.1 christos 2141 1.1 christos static SEM_PC 2142 1.1 christos SEM_FN_NAME (iq2000bf,cfc0) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2143 1.1 christos { 2144 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2145 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2146 1.1 christos int UNUSED written = 0; 2147 1.1 christos IADDR UNUSED pc = abuf->addr; 2148 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2149 1.1 christos 2150 1.1 christos ((void) 0); /*nop*/ 2151 1.1 christos 2152 1.1 christos return vpc; 2153 1.1 christos #undef FLD 2154 1.1 christos } 2155 1.1 christos 2156 1.1 christos /* cfc1: cfc1 $rt,$rd */ 2157 1.1 christos 2158 1.1 christos static SEM_PC 2159 1.1 christos SEM_FN_NAME (iq2000bf,cfc1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2160 1.1 christos { 2161 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2162 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2163 1.1 christos int UNUSED written = 0; 2164 1.1 christos IADDR UNUSED pc = abuf->addr; 2165 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2166 1.1 christos 2167 1.1 christos ((void) 0); /*nop*/ 2168 1.1 christos 2169 1.1 christos return vpc; 2170 1.1 christos #undef FLD 2171 1.1 christos } 2172 1.1 christos 2173 1.1 christos /* cfc2: cfc2 $rt,$rd */ 2174 1.1 christos 2175 1.1 christos static SEM_PC 2176 1.1 christos SEM_FN_NAME (iq2000bf,cfc2) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2177 1.1 christos { 2178 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2179 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2180 1.1 christos int UNUSED written = 0; 2181 1.1 christos IADDR UNUSED pc = abuf->addr; 2182 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2183 1.1 christos 2184 1.1 christos ((void) 0); /*nop*/ 2185 1.1 christos 2186 1.1 christos return vpc; 2187 1.1 christos #undef FLD 2188 1.1 christos } 2189 1.1 christos 2190 1.1 christos /* cfc3: cfc3 $rt,$rd */ 2191 1.1 christos 2192 1.1 christos static SEM_PC 2193 1.1 christos SEM_FN_NAME (iq2000bf,cfc3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2194 1.1 christos { 2195 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2196 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2197 1.1 christos int UNUSED written = 0; 2198 1.1 christos IADDR UNUSED pc = abuf->addr; 2199 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2200 1.1 christos 2201 1.1 christos ((void) 0); /*nop*/ 2202 1.1 christos 2203 1.1 christos return vpc; 2204 1.1 christos #undef FLD 2205 1.1 christos } 2206 1.1 christos 2207 1.1 christos /* chkhdr: chkhdr $rd,$rt */ 2208 1.1 christos 2209 1.1 christos static SEM_PC 2210 1.1 christos SEM_FN_NAME (iq2000bf,chkhdr) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2211 1.1 christos { 2212 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2213 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2214 1.1 christos int UNUSED written = 0; 2215 1.1 christos IADDR UNUSED pc = abuf->addr; 2216 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2217 1.1 christos 2218 1.1 christos ((void) 0); /*nop*/ 2219 1.1 christos 2220 1.1 christos return vpc; 2221 1.1 christos #undef FLD 2222 1.1 christos } 2223 1.1 christos 2224 1.1 christos /* ctc0: ctc0 $rt,$rd */ 2225 1.1 christos 2226 1.1 christos static SEM_PC 2227 1.1 christos SEM_FN_NAME (iq2000bf,ctc0) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2228 1.1 christos { 2229 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2230 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2231 1.1 christos int UNUSED written = 0; 2232 1.1 christos IADDR UNUSED pc = abuf->addr; 2233 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2234 1.1 christos 2235 1.1 christos ((void) 0); /*nop*/ 2236 1.1 christos 2237 1.1 christos return vpc; 2238 1.1 christos #undef FLD 2239 1.1 christos } 2240 1.1 christos 2241 1.1 christos /* ctc1: ctc1 $rt,$rd */ 2242 1.1 christos 2243 1.1 christos static SEM_PC 2244 1.1 christos SEM_FN_NAME (iq2000bf,ctc1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2245 1.1 christos { 2246 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2247 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2248 1.1 christos int UNUSED written = 0; 2249 1.1 christos IADDR UNUSED pc = abuf->addr; 2250 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2251 1.1 christos 2252 1.1 christos ((void) 0); /*nop*/ 2253 1.1 christos 2254 1.1 christos return vpc; 2255 1.1 christos #undef FLD 2256 1.1 christos } 2257 1.1 christos 2258 1.1 christos /* ctc2: ctc2 $rt,$rd */ 2259 1.1 christos 2260 1.1 christos static SEM_PC 2261 1.1 christos SEM_FN_NAME (iq2000bf,ctc2) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2262 1.1 christos { 2263 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2264 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2265 1.1 christos int UNUSED written = 0; 2266 1.1 christos IADDR UNUSED pc = abuf->addr; 2267 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2268 1.1 christos 2269 1.1 christos ((void) 0); /*nop*/ 2270 1.1 christos 2271 1.1 christos return vpc; 2272 1.1 christos #undef FLD 2273 1.1 christos } 2274 1.1 christos 2275 1.1 christos /* ctc3: ctc3 $rt,$rd */ 2276 1.1 christos 2277 1.1 christos static SEM_PC 2278 1.1 christos SEM_FN_NAME (iq2000bf,ctc3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2279 1.1 christos { 2280 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2281 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2282 1.1 christos int UNUSED written = 0; 2283 1.1 christos IADDR UNUSED pc = abuf->addr; 2284 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2285 1.1 christos 2286 1.1 christos ((void) 0); /*nop*/ 2287 1.1 christos 2288 1.1 christos return vpc; 2289 1.1 christos #undef FLD 2290 1.1 christos } 2291 1.1 christos 2292 1.1 christos /* jcr: jcr $rs */ 2293 1.1 christos 2294 1.1 christos static SEM_PC 2295 1.1 christos SEM_FN_NAME (iq2000bf,jcr) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2296 1.1 christos { 2297 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2298 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2299 1.1 christos int UNUSED written = 0; 2300 1.1 christos IADDR UNUSED pc = abuf->addr; 2301 1.1 christos SEM_BRANCH_INIT 2302 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2303 1.1 christos 2304 1.1 christos ((void) 0); /*nop*/ 2305 1.1 christos 2306 1.1 christos SEM_BRANCH_FINI (vpc); 2307 1.1 christos return vpc; 2308 1.1 christos #undef FLD 2309 1.1 christos } 2310 1.1 christos 2311 1.1 christos /* luc32: luc32 $rt,$rd */ 2312 1.1 christos 2313 1.1 christos static SEM_PC 2314 1.1 christos SEM_FN_NAME (iq2000bf,luc32) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2315 1.1 christos { 2316 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2317 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2318 1.1 christos int UNUSED written = 0; 2319 1.1 christos IADDR UNUSED pc = abuf->addr; 2320 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2321 1.1 christos 2322 1.1 christos ((void) 0); /*nop*/ 2323 1.1 christos 2324 1.1 christos return vpc; 2325 1.1 christos #undef FLD 2326 1.1 christos } 2327 1.1 christos 2328 1.1 christos /* luc32l: luc32l $rt,$rd */ 2329 1.1 christos 2330 1.1 christos static SEM_PC 2331 1.1 christos SEM_FN_NAME (iq2000bf,luc32l) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2332 1.1 christos { 2333 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2334 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2335 1.1 christos int UNUSED written = 0; 2336 1.1 christos IADDR UNUSED pc = abuf->addr; 2337 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2338 1.1 christos 2339 1.1 christos ((void) 0); /*nop*/ 2340 1.1 christos 2341 1.1 christos return vpc; 2342 1.1 christos #undef FLD 2343 1.1 christos } 2344 1.1 christos 2345 1.1 christos /* luc64: luc64 $rt,$rd */ 2346 1.1 christos 2347 1.1 christos static SEM_PC 2348 1.1 christos SEM_FN_NAME (iq2000bf,luc64) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2349 1.1 christos { 2350 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2351 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2352 1.1 christos int UNUSED written = 0; 2353 1.1 christos IADDR UNUSED pc = abuf->addr; 2354 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2355 1.1 christos 2356 1.1 christos ((void) 0); /*nop*/ 2357 1.1 christos 2358 1.1 christos return vpc; 2359 1.1 christos #undef FLD 2360 1.1 christos } 2361 1.1 christos 2362 1.1 christos /* luc64l: luc64l $rt,$rd */ 2363 1.1 christos 2364 1.1 christos static SEM_PC 2365 1.1 christos SEM_FN_NAME (iq2000bf,luc64l) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2366 1.1 christos { 2367 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2368 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2369 1.1 christos int UNUSED written = 0; 2370 1.1 christos IADDR UNUSED pc = abuf->addr; 2371 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2372 1.1 christos 2373 1.1 christos ((void) 0); /*nop*/ 2374 1.1 christos 2375 1.1 christos return vpc; 2376 1.1 christos #undef FLD 2377 1.1 christos } 2378 1.1 christos 2379 1.1 christos /* luk: luk $rt,$rd */ 2380 1.1 christos 2381 1.1 christos static SEM_PC 2382 1.1 christos SEM_FN_NAME (iq2000bf,luk) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2383 1.1 christos { 2384 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2385 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2386 1.1 christos int UNUSED written = 0; 2387 1.1 christos IADDR UNUSED pc = abuf->addr; 2388 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2389 1.1 christos 2390 1.1 christos ((void) 0); /*nop*/ 2391 1.1 christos 2392 1.1 christos return vpc; 2393 1.1 christos #undef FLD 2394 1.1 christos } 2395 1.1 christos 2396 1.1 christos /* lulck: lulck $rt */ 2397 1.1 christos 2398 1.1 christos static SEM_PC 2399 1.1 christos SEM_FN_NAME (iq2000bf,lulck) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2400 1.1 christos { 2401 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2402 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2403 1.1 christos int UNUSED written = 0; 2404 1.1 christos IADDR UNUSED pc = abuf->addr; 2405 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2406 1.1 christos 2407 1.1 christos ((void) 0); /*nop*/ 2408 1.1 christos 2409 1.1 christos return vpc; 2410 1.1 christos #undef FLD 2411 1.1 christos } 2412 1.1 christos 2413 1.1 christos /* lum32: lum32 $rt,$rd */ 2414 1.1 christos 2415 1.1 christos static SEM_PC 2416 1.1 christos SEM_FN_NAME (iq2000bf,lum32) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2417 1.1 christos { 2418 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2419 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2420 1.1 christos int UNUSED written = 0; 2421 1.1 christos IADDR UNUSED pc = abuf->addr; 2422 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2423 1.1 christos 2424 1.1 christos ((void) 0); /*nop*/ 2425 1.1 christos 2426 1.1 christos return vpc; 2427 1.1 christos #undef FLD 2428 1.1 christos } 2429 1.1 christos 2430 1.1 christos /* lum32l: lum32l $rt,$rd */ 2431 1.1 christos 2432 1.1 christos static SEM_PC 2433 1.1 christos SEM_FN_NAME (iq2000bf,lum32l) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2434 1.1 christos { 2435 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2436 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2437 1.1 christos int UNUSED written = 0; 2438 1.1 christos IADDR UNUSED pc = abuf->addr; 2439 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2440 1.1 christos 2441 1.1 christos ((void) 0); /*nop*/ 2442 1.1 christos 2443 1.1 christos return vpc; 2444 1.1 christos #undef FLD 2445 1.1 christos } 2446 1.1 christos 2447 1.1 christos /* lum64: lum64 $rt,$rd */ 2448 1.1 christos 2449 1.1 christos static SEM_PC 2450 1.1 christos SEM_FN_NAME (iq2000bf,lum64) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2451 1.1 christos { 2452 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2453 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2454 1.1 christos int UNUSED written = 0; 2455 1.1 christos IADDR UNUSED pc = abuf->addr; 2456 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2457 1.1 christos 2458 1.1 christos ((void) 0); /*nop*/ 2459 1.1 christos 2460 1.1 christos return vpc; 2461 1.1 christos #undef FLD 2462 1.1 christos } 2463 1.1 christos 2464 1.1 christos /* lum64l: lum64l $rt,$rd */ 2465 1.1 christos 2466 1.1 christos static SEM_PC 2467 1.1 christos SEM_FN_NAME (iq2000bf,lum64l) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2468 1.1 christos { 2469 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2470 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2471 1.1 christos int UNUSED written = 0; 2472 1.1 christos IADDR UNUSED pc = abuf->addr; 2473 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2474 1.1 christos 2475 1.1 christos ((void) 0); /*nop*/ 2476 1.1 christos 2477 1.1 christos return vpc; 2478 1.1 christos #undef FLD 2479 1.1 christos } 2480 1.1 christos 2481 1.1 christos /* lur: lur $rt,$rd */ 2482 1.1 christos 2483 1.1 christos static SEM_PC 2484 1.1 christos SEM_FN_NAME (iq2000bf,lur) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2485 1.1 christos { 2486 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2487 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2488 1.1 christos int UNUSED written = 0; 2489 1.1 christos IADDR UNUSED pc = abuf->addr; 2490 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2491 1.1 christos 2492 1.1 christos ((void) 0); /*nop*/ 2493 1.1 christos 2494 1.1 christos return vpc; 2495 1.1 christos #undef FLD 2496 1.1 christos } 2497 1.1 christos 2498 1.1 christos /* lurl: lurl $rt,$rd */ 2499 1.1 christos 2500 1.1 christos static SEM_PC 2501 1.1 christos SEM_FN_NAME (iq2000bf,lurl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2502 1.1 christos { 2503 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2504 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2505 1.1 christos int UNUSED written = 0; 2506 1.1 christos IADDR UNUSED pc = abuf->addr; 2507 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2508 1.1 christos 2509 1.1 christos ((void) 0); /*nop*/ 2510 1.1 christos 2511 1.1 christos return vpc; 2512 1.1 christos #undef FLD 2513 1.1 christos } 2514 1.1 christos 2515 1.1 christos /* luulck: luulck $rt */ 2516 1.1 christos 2517 1.1 christos static SEM_PC 2518 1.1 christos SEM_FN_NAME (iq2000bf,luulck) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2519 1.1 christos { 2520 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2521 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2522 1.1 christos int UNUSED written = 0; 2523 1.1 christos IADDR UNUSED pc = abuf->addr; 2524 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2525 1.1 christos 2526 1.1 christos ((void) 0); /*nop*/ 2527 1.1 christos 2528 1.1 christos return vpc; 2529 1.1 christos #undef FLD 2530 1.1 christos } 2531 1.1 christos 2532 1.1 christos /* mfc0: mfc0 $rt,$rd */ 2533 1.1 christos 2534 1.1 christos static SEM_PC 2535 1.1 christos SEM_FN_NAME (iq2000bf,mfc0) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2536 1.1 christos { 2537 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2538 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2539 1.1 christos int UNUSED written = 0; 2540 1.1 christos IADDR UNUSED pc = abuf->addr; 2541 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2542 1.1 christos 2543 1.1 christos ((void) 0); /*nop*/ 2544 1.1 christos 2545 1.1 christos return vpc; 2546 1.1 christos #undef FLD 2547 1.1 christos } 2548 1.1 christos 2549 1.1 christos /* mfc1: mfc1 $rt,$rd */ 2550 1.1 christos 2551 1.1 christos static SEM_PC 2552 1.1 christos SEM_FN_NAME (iq2000bf,mfc1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2553 1.1 christos { 2554 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2555 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2556 1.1 christos int UNUSED written = 0; 2557 1.1 christos IADDR UNUSED pc = abuf->addr; 2558 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2559 1.1 christos 2560 1.1 christos ((void) 0); /*nop*/ 2561 1.1 christos 2562 1.1 christos return vpc; 2563 1.1 christos #undef FLD 2564 1.1 christos } 2565 1.1 christos 2566 1.1 christos /* mfc2: mfc2 $rt,$rd */ 2567 1.1 christos 2568 1.1 christos static SEM_PC 2569 1.1 christos SEM_FN_NAME (iq2000bf,mfc2) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2570 1.1 christos { 2571 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2572 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2573 1.1 christos int UNUSED written = 0; 2574 1.1 christos IADDR UNUSED pc = abuf->addr; 2575 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2576 1.1 christos 2577 1.1 christos ((void) 0); /*nop*/ 2578 1.1 christos 2579 1.1 christos return vpc; 2580 1.1 christos #undef FLD 2581 1.1 christos } 2582 1.1 christos 2583 1.1 christos /* mfc3: mfc3 $rt,$rd */ 2584 1.1 christos 2585 1.1 christos static SEM_PC 2586 1.1 christos SEM_FN_NAME (iq2000bf,mfc3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2587 1.1 christos { 2588 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2589 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2590 1.1 christos int UNUSED written = 0; 2591 1.1 christos IADDR UNUSED pc = abuf->addr; 2592 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2593 1.1 christos 2594 1.1 christos ((void) 0); /*nop*/ 2595 1.1 christos 2596 1.1 christos return vpc; 2597 1.1 christos #undef FLD 2598 1.1 christos } 2599 1.1 christos 2600 1.1 christos /* mtc0: mtc0 $rt,$rd */ 2601 1.1 christos 2602 1.1 christos static SEM_PC 2603 1.1 christos SEM_FN_NAME (iq2000bf,mtc0) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2604 1.1 christos { 2605 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2606 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2607 1.1 christos int UNUSED written = 0; 2608 1.1 christos IADDR UNUSED pc = abuf->addr; 2609 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2610 1.1 christos 2611 1.1 christos ((void) 0); /*nop*/ 2612 1.1 christos 2613 1.1 christos return vpc; 2614 1.1 christos #undef FLD 2615 1.1 christos } 2616 1.1 christos 2617 1.1 christos /* mtc1: mtc1 $rt,$rd */ 2618 1.1 christos 2619 1.1 christos static SEM_PC 2620 1.1 christos SEM_FN_NAME (iq2000bf,mtc1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2621 1.1 christos { 2622 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2623 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2624 1.1 christos int UNUSED written = 0; 2625 1.1 christos IADDR UNUSED pc = abuf->addr; 2626 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2627 1.1 christos 2628 1.1 christos ((void) 0); /*nop*/ 2629 1.1 christos 2630 1.1 christos return vpc; 2631 1.1 christos #undef FLD 2632 1.1 christos } 2633 1.1 christos 2634 1.1 christos /* mtc2: mtc2 $rt,$rd */ 2635 1.1 christos 2636 1.1 christos static SEM_PC 2637 1.1 christos SEM_FN_NAME (iq2000bf,mtc2) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2638 1.1 christos { 2639 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2640 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2641 1.1 christos int UNUSED written = 0; 2642 1.1 christos IADDR UNUSED pc = abuf->addr; 2643 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2644 1.1 christos 2645 1.1 christos ((void) 0); /*nop*/ 2646 1.1 christos 2647 1.1 christos return vpc; 2648 1.1 christos #undef FLD 2649 1.1 christos } 2650 1.1 christos 2651 1.1 christos /* mtc3: mtc3 $rt,$rd */ 2652 1.1 christos 2653 1.1 christos static SEM_PC 2654 1.1 christos SEM_FN_NAME (iq2000bf,mtc3) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2655 1.1 christos { 2656 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2657 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2658 1.1 christos int UNUSED written = 0; 2659 1.1 christos IADDR UNUSED pc = abuf->addr; 2660 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2661 1.1 christos 2662 1.1 christos ((void) 0); /*nop*/ 2663 1.1 christos 2664 1.1 christos return vpc; 2665 1.1 christos #undef FLD 2666 1.1 christos } 2667 1.1 christos 2668 1.1 christos /* pkrl: pkrl $rd,$rt */ 2669 1.1 christos 2670 1.1 christos static SEM_PC 2671 1.1 christos SEM_FN_NAME (iq2000bf,pkrl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2672 1.1 christos { 2673 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2674 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2675 1.1 christos int UNUSED written = 0; 2676 1.1 christos IADDR UNUSED pc = abuf->addr; 2677 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2678 1.1 christos 2679 1.1 christos ((void) 0); /*nop*/ 2680 1.1 christos 2681 1.1 christos return vpc; 2682 1.1 christos #undef FLD 2683 1.1 christos } 2684 1.1 christos 2685 1.1 christos /* pkrlr1: pkrlr1 $rt,$_index,$count */ 2686 1.1 christos 2687 1.1 christos static SEM_PC 2688 1.1 christos SEM_FN_NAME (iq2000bf,pkrlr1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2689 1.1 christos { 2690 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2691 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2692 1.1 christos int UNUSED written = 0; 2693 1.1 christos IADDR UNUSED pc = abuf->addr; 2694 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2695 1.1 christos 2696 1.1 christos ((void) 0); /*nop*/ 2697 1.1 christos 2698 1.1 christos return vpc; 2699 1.1 christos #undef FLD 2700 1.1 christos } 2701 1.1 christos 2702 1.1 christos /* pkrlr30: pkrlr30 $rt,$_index,$count */ 2703 1.1 christos 2704 1.1 christos static SEM_PC 2705 1.1 christos SEM_FN_NAME (iq2000bf,pkrlr30) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2706 1.1 christos { 2707 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2708 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2709 1.1 christos int UNUSED written = 0; 2710 1.1 christos IADDR UNUSED pc = abuf->addr; 2711 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2712 1.1 christos 2713 1.1 christos ((void) 0); /*nop*/ 2714 1.1 christos 2715 1.1 christos return vpc; 2716 1.1 christos #undef FLD 2717 1.1 christos } 2718 1.1 christos 2719 1.1 christos /* rb: rb $rd,$rt */ 2720 1.1 christos 2721 1.1 christos static SEM_PC 2722 1.1 christos SEM_FN_NAME (iq2000bf,rb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2723 1.1 christos { 2724 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2725 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2726 1.1 christos int UNUSED written = 0; 2727 1.1 christos IADDR UNUSED pc = abuf->addr; 2728 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2729 1.1 christos 2730 1.1 christos ((void) 0); /*nop*/ 2731 1.1 christos 2732 1.1 christos return vpc; 2733 1.1 christos #undef FLD 2734 1.1 christos } 2735 1.1 christos 2736 1.1 christos /* rbr1: rbr1 $rt,$_index,$count */ 2737 1.1 christos 2738 1.1 christos static SEM_PC 2739 1.1 christos SEM_FN_NAME (iq2000bf,rbr1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2740 1.1 christos { 2741 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2742 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2743 1.1 christos int UNUSED written = 0; 2744 1.1 christos IADDR UNUSED pc = abuf->addr; 2745 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2746 1.1 christos 2747 1.1 christos ((void) 0); /*nop*/ 2748 1.1 christos 2749 1.1 christos return vpc; 2750 1.1 christos #undef FLD 2751 1.1 christos } 2752 1.1 christos 2753 1.1 christos /* rbr30: rbr30 $rt,$_index,$count */ 2754 1.1 christos 2755 1.1 christos static SEM_PC 2756 1.1 christos SEM_FN_NAME (iq2000bf,rbr30) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2757 1.1 christos { 2758 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2759 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2760 1.1 christos int UNUSED written = 0; 2761 1.1 christos IADDR UNUSED pc = abuf->addr; 2762 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2763 1.1 christos 2764 1.1 christos ((void) 0); /*nop*/ 2765 1.1 christos 2766 1.1 christos return vpc; 2767 1.1 christos #undef FLD 2768 1.1 christos } 2769 1.1 christos 2770 1.1 christos /* rfe: rfe */ 2771 1.1 christos 2772 1.1 christos static SEM_PC 2773 1.1 christos SEM_FN_NAME (iq2000bf,rfe) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2774 1.1 christos { 2775 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2776 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2777 1.1 christos int UNUSED written = 0; 2778 1.1 christos IADDR UNUSED pc = abuf->addr; 2779 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2780 1.1 christos 2781 1.1 christos ((void) 0); /*nop*/ 2782 1.1 christos 2783 1.1 christos return vpc; 2784 1.1 christos #undef FLD 2785 1.1 christos } 2786 1.1 christos 2787 1.1 christos /* rx: rx $rd,$rt */ 2788 1.1 christos 2789 1.1 christos static SEM_PC 2790 1.1 christos SEM_FN_NAME (iq2000bf,rx) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2791 1.1 christos { 2792 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2793 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2794 1.1 christos int UNUSED written = 0; 2795 1.1 christos IADDR UNUSED pc = abuf->addr; 2796 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2797 1.1 christos 2798 1.1 christos ((void) 0); /*nop*/ 2799 1.1 christos 2800 1.1 christos return vpc; 2801 1.1 christos #undef FLD 2802 1.1 christos } 2803 1.1 christos 2804 1.1 christos /* rxr1: rxr1 $rt,$_index,$count */ 2805 1.1 christos 2806 1.1 christos static SEM_PC 2807 1.1 christos SEM_FN_NAME (iq2000bf,rxr1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2808 1.1 christos { 2809 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2810 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2811 1.1 christos int UNUSED written = 0; 2812 1.1 christos IADDR UNUSED pc = abuf->addr; 2813 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2814 1.1 christos 2815 1.1 christos ((void) 0); /*nop*/ 2816 1.1 christos 2817 1.1 christos return vpc; 2818 1.1 christos #undef FLD 2819 1.1 christos } 2820 1.1 christos 2821 1.1 christos /* rxr30: rxr30 $rt,$_index,$count */ 2822 1.1 christos 2823 1.1 christos static SEM_PC 2824 1.1 christos SEM_FN_NAME (iq2000bf,rxr30) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2825 1.1 christos { 2826 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2827 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2828 1.1 christos int UNUSED written = 0; 2829 1.1 christos IADDR UNUSED pc = abuf->addr; 2830 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2831 1.1 christos 2832 1.1 christos ((void) 0); /*nop*/ 2833 1.1 christos 2834 1.1 christos return vpc; 2835 1.1 christos #undef FLD 2836 1.1 christos } 2837 1.1 christos 2838 1.1 christos /* sleep: sleep */ 2839 1.1 christos 2840 1.1 christos static SEM_PC 2841 1.1 christos SEM_FN_NAME (iq2000bf,sleep) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2842 1.1 christos { 2843 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2844 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2845 1.1 christos int UNUSED written = 0; 2846 1.1 christos IADDR UNUSED pc = abuf->addr; 2847 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2848 1.1 christos 2849 1.1 christos ((void) 0); /*nop*/ 2850 1.1 christos 2851 1.1 christos return vpc; 2852 1.1 christos #undef FLD 2853 1.1 christos } 2854 1.1 christos 2855 1.1 christos /* srrd: srrd $rt */ 2856 1.1 christos 2857 1.1 christos static SEM_PC 2858 1.1 christos SEM_FN_NAME (iq2000bf,srrd) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2859 1.1 christos { 2860 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2861 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2862 1.1 christos int UNUSED written = 0; 2863 1.1 christos IADDR UNUSED pc = abuf->addr; 2864 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2865 1.1 christos 2866 1.1 christos ((void) 0); /*nop*/ 2867 1.1 christos 2868 1.1 christos return vpc; 2869 1.1 christos #undef FLD 2870 1.1 christos } 2871 1.1 christos 2872 1.1 christos /* srrdl: srrdl $rt */ 2873 1.1 christos 2874 1.1 christos static SEM_PC 2875 1.1 christos SEM_FN_NAME (iq2000bf,srrdl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2876 1.1 christos { 2877 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2878 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2879 1.1 christos int UNUSED written = 0; 2880 1.1 christos IADDR UNUSED pc = abuf->addr; 2881 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2882 1.1 christos 2883 1.1 christos ((void) 0); /*nop*/ 2884 1.1 christos 2885 1.1 christos return vpc; 2886 1.1 christos #undef FLD 2887 1.1 christos } 2888 1.1 christos 2889 1.1 christos /* srulck: srulck $rt */ 2890 1.1 christos 2891 1.1 christos static SEM_PC 2892 1.1 christos SEM_FN_NAME (iq2000bf,srulck) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2893 1.1 christos { 2894 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2895 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2896 1.1 christos int UNUSED written = 0; 2897 1.1 christos IADDR UNUSED pc = abuf->addr; 2898 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2899 1.1 christos 2900 1.1 christos ((void) 0); /*nop*/ 2901 1.1 christos 2902 1.1 christos return vpc; 2903 1.1 christos #undef FLD 2904 1.1 christos } 2905 1.1 christos 2906 1.1 christos /* srwr: srwr $rt,$rd */ 2907 1.1 christos 2908 1.1 christos static SEM_PC 2909 1.1 christos SEM_FN_NAME (iq2000bf,srwr) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2910 1.1 christos { 2911 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2912 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2913 1.1 christos int UNUSED written = 0; 2914 1.1 christos IADDR UNUSED pc = abuf->addr; 2915 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2916 1.1 christos 2917 1.1 christos ((void) 0); /*nop*/ 2918 1.1 christos 2919 1.1 christos return vpc; 2920 1.1 christos #undef FLD 2921 1.1 christos } 2922 1.1 christos 2923 1.1 christos /* srwru: srwru $rt,$rd */ 2924 1.1 christos 2925 1.1 christos static SEM_PC 2926 1.1 christos SEM_FN_NAME (iq2000bf,srwru) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2927 1.1 christos { 2928 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2929 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2930 1.1 christos int UNUSED written = 0; 2931 1.1 christos IADDR UNUSED pc = abuf->addr; 2932 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2933 1.1 christos 2934 1.1 christos ((void) 0); /*nop*/ 2935 1.1 christos 2936 1.1 christos return vpc; 2937 1.1 christos #undef FLD 2938 1.1 christos } 2939 1.1 christos 2940 1.1 christos /* trapqfl: trapqfl */ 2941 1.1 christos 2942 1.1 christos static SEM_PC 2943 1.1 christos SEM_FN_NAME (iq2000bf,trapqfl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2944 1.1 christos { 2945 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2946 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2947 1.1 christos int UNUSED written = 0; 2948 1.1 christos IADDR UNUSED pc = abuf->addr; 2949 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2950 1.1 christos 2951 1.1 christos ((void) 0); /*nop*/ 2952 1.1 christos 2953 1.1 christos return vpc; 2954 1.1 christos #undef FLD 2955 1.1 christos } 2956 1.1 christos 2957 1.1 christos /* trapqne: trapqne */ 2958 1.1 christos 2959 1.1 christos static SEM_PC 2960 1.1 christos SEM_FN_NAME (iq2000bf,trapqne) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2961 1.1 christos { 2962 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2963 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2964 1.1 christos int UNUSED written = 0; 2965 1.1 christos IADDR UNUSED pc = abuf->addr; 2966 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2967 1.1 christos 2968 1.1 christos ((void) 0); /*nop*/ 2969 1.1 christos 2970 1.1 christos return vpc; 2971 1.1 christos #undef FLD 2972 1.1 christos } 2973 1.1 christos 2974 1.1 christos /* traprel: traprel $rt */ 2975 1.1 christos 2976 1.1 christos static SEM_PC 2977 1.1 christos SEM_FN_NAME (iq2000bf,traprel) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2978 1.1 christos { 2979 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2980 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2981 1.1 christos int UNUSED written = 0; 2982 1.1 christos IADDR UNUSED pc = abuf->addr; 2983 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 2984 1.1 christos 2985 1.1 christos ((void) 0); /*nop*/ 2986 1.1 christos 2987 1.1 christos return vpc; 2988 1.1 christos #undef FLD 2989 1.1 christos } 2990 1.1 christos 2991 1.1 christos /* wb: wb $rd,$rt */ 2992 1.1 christos 2993 1.1 christos static SEM_PC 2994 1.1 christos SEM_FN_NAME (iq2000bf,wb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 2995 1.1 christos { 2996 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 2997 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 2998 1.1 christos int UNUSED written = 0; 2999 1.1 christos IADDR UNUSED pc = abuf->addr; 3000 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3001 1.1 christos 3002 1.1 christos ((void) 0); /*nop*/ 3003 1.1 christos 3004 1.1 christos return vpc; 3005 1.1 christos #undef FLD 3006 1.1 christos } 3007 1.1 christos 3008 1.1 christos /* wbu: wbu $rd,$rt */ 3009 1.1 christos 3010 1.1 christos static SEM_PC 3011 1.1 christos SEM_FN_NAME (iq2000bf,wbu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3012 1.1 christos { 3013 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3014 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3015 1.1 christos int UNUSED written = 0; 3016 1.1 christos IADDR UNUSED pc = abuf->addr; 3017 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3018 1.1 christos 3019 1.1 christos ((void) 0); /*nop*/ 3020 1.1 christos 3021 1.1 christos return vpc; 3022 1.1 christos #undef FLD 3023 1.1 christos } 3024 1.1 christos 3025 1.1 christos /* wbr1: wbr1 $rt,$_index,$count */ 3026 1.1 christos 3027 1.1 christos static SEM_PC 3028 1.1 christos SEM_FN_NAME (iq2000bf,wbr1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3029 1.1 christos { 3030 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3031 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3032 1.1 christos int UNUSED written = 0; 3033 1.1 christos IADDR UNUSED pc = abuf->addr; 3034 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3035 1.1 christos 3036 1.1 christos ((void) 0); /*nop*/ 3037 1.1 christos 3038 1.1 christos return vpc; 3039 1.1 christos #undef FLD 3040 1.1 christos } 3041 1.1 christos 3042 1.1 christos /* wbr1u: wbr1u $rt,$_index,$count */ 3043 1.1 christos 3044 1.1 christos static SEM_PC 3045 1.1 christos SEM_FN_NAME (iq2000bf,wbr1u) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3046 1.1 christos { 3047 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3048 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3049 1.1 christos int UNUSED written = 0; 3050 1.1 christos IADDR UNUSED pc = abuf->addr; 3051 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3052 1.1 christos 3053 1.1 christos ((void) 0); /*nop*/ 3054 1.1 christos 3055 1.1 christos return vpc; 3056 1.1 christos #undef FLD 3057 1.1 christos } 3058 1.1 christos 3059 1.1 christos /* wbr30: wbr30 $rt,$_index,$count */ 3060 1.1 christos 3061 1.1 christos static SEM_PC 3062 1.1 christos SEM_FN_NAME (iq2000bf,wbr30) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3063 1.1 christos { 3064 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3065 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3066 1.1 christos int UNUSED written = 0; 3067 1.1 christos IADDR UNUSED pc = abuf->addr; 3068 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3069 1.1 christos 3070 1.1 christos ((void) 0); /*nop*/ 3071 1.1 christos 3072 1.1 christos return vpc; 3073 1.1 christos #undef FLD 3074 1.1 christos } 3075 1.1 christos 3076 1.1 christos /* wbr30u: wbr30u $rt,$_index,$count */ 3077 1.1 christos 3078 1.1 christos static SEM_PC 3079 1.1 christos SEM_FN_NAME (iq2000bf,wbr30u) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3080 1.1 christos { 3081 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3082 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3083 1.1 christos int UNUSED written = 0; 3084 1.1 christos IADDR UNUSED pc = abuf->addr; 3085 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3086 1.1 christos 3087 1.1 christos ((void) 0); /*nop*/ 3088 1.1 christos 3089 1.1 christos return vpc; 3090 1.1 christos #undef FLD 3091 1.1 christos } 3092 1.1 christos 3093 1.1 christos /* wx: wx $rd,$rt */ 3094 1.1 christos 3095 1.1 christos static SEM_PC 3096 1.1 christos SEM_FN_NAME (iq2000bf,wx) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3097 1.1 christos { 3098 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3099 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3100 1.1 christos int UNUSED written = 0; 3101 1.1 christos IADDR UNUSED pc = abuf->addr; 3102 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3103 1.1 christos 3104 1.1 christos ((void) 0); /*nop*/ 3105 1.1 christos 3106 1.1 christos return vpc; 3107 1.1 christos #undef FLD 3108 1.1 christos } 3109 1.1 christos 3110 1.1 christos /* wxu: wxu $rd,$rt */ 3111 1.1 christos 3112 1.1 christos static SEM_PC 3113 1.1 christos SEM_FN_NAME (iq2000bf,wxu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3114 1.1 christos { 3115 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3116 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3117 1.1 christos int UNUSED written = 0; 3118 1.1 christos IADDR UNUSED pc = abuf->addr; 3119 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3120 1.1 christos 3121 1.1 christos ((void) 0); /*nop*/ 3122 1.1 christos 3123 1.1 christos return vpc; 3124 1.1 christos #undef FLD 3125 1.1 christos } 3126 1.1 christos 3127 1.1 christos /* wxr1: wxr1 $rt,$_index,$count */ 3128 1.1 christos 3129 1.1 christos static SEM_PC 3130 1.1 christos SEM_FN_NAME (iq2000bf,wxr1) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3131 1.1 christos { 3132 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3133 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3134 1.1 christos int UNUSED written = 0; 3135 1.1 christos IADDR UNUSED pc = abuf->addr; 3136 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3137 1.1 christos 3138 1.1 christos ((void) 0); /*nop*/ 3139 1.1 christos 3140 1.1 christos return vpc; 3141 1.1 christos #undef FLD 3142 1.1 christos } 3143 1.1 christos 3144 1.1 christos /* wxr1u: wxr1u $rt,$_index,$count */ 3145 1.1 christos 3146 1.1 christos static SEM_PC 3147 1.1 christos SEM_FN_NAME (iq2000bf,wxr1u) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3148 1.1 christos { 3149 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3150 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3151 1.1 christos int UNUSED written = 0; 3152 1.1 christos IADDR UNUSED pc = abuf->addr; 3153 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3154 1.1 christos 3155 1.1 christos ((void) 0); /*nop*/ 3156 1.1 christos 3157 1.1 christos return vpc; 3158 1.1 christos #undef FLD 3159 1.1 christos } 3160 1.1 christos 3161 1.1 christos /* wxr30: wxr30 $rt,$_index,$count */ 3162 1.1 christos 3163 1.1 christos static SEM_PC 3164 1.1 christos SEM_FN_NAME (iq2000bf,wxr30) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3165 1.1 christos { 3166 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3167 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3168 1.1 christos int UNUSED written = 0; 3169 1.1 christos IADDR UNUSED pc = abuf->addr; 3170 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3171 1.1 christos 3172 1.1 christos ((void) 0); /*nop*/ 3173 1.1 christos 3174 1.1 christos return vpc; 3175 1.1 christos #undef FLD 3176 1.1 christos } 3177 1.1 christos 3178 1.1 christos /* wxr30u: wxr30u $rt,$_index,$count */ 3179 1.1 christos 3180 1.1 christos static SEM_PC 3181 1.1 christos SEM_FN_NAME (iq2000bf,wxr30u) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3182 1.1 christos { 3183 1.1 christos #define FLD(f) abuf->fields.sfmt_empty.f 3184 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3185 1.1 christos int UNUSED written = 0; 3186 1.1 christos IADDR UNUSED pc = abuf->addr; 3187 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3188 1.1 christos 3189 1.1 christos ((void) 0); /*nop*/ 3190 1.1 christos 3191 1.1 christos return vpc; 3192 1.1 christos #undef FLD 3193 1.1 christos } 3194 1.1 christos 3195 1.1 christos /* ldw: ldw $rt,$lo16($base) */ 3196 1.1 christos 3197 1.1 christos static SEM_PC 3198 1.1 christos SEM_FN_NAME (iq2000bf,ldw) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3199 1.1 christos { 3200 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 3201 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3202 1.1 christos int UNUSED written = 0; 3203 1.1 christos IADDR UNUSED pc = abuf->addr; 3204 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3205 1.1 christos 3206 1.1 christos { 3207 1.1 christos SI tmp_addr; 3208 1.1 christos tmp_addr = ANDSI (ADDSI (GET_H_GR (FLD (f_rs)), FLD (f_imm)), INVSI (3)); 3209 1.1 christos { 3210 1.1 christos SI opval = GETMEMSI (current_cpu, pc, tmp_addr); 3211 1.1 christos SET_H_GR (ADDSI (FLD (f_rt), 1), opval); 3212 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 3213 1.1 christos } 3214 1.1 christos { 3215 1.1 christos SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_addr, 4)); 3216 1.1 christos SET_H_GR (FLD (f_rt), opval); 3217 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 3218 1.1 christos } 3219 1.1 christos } 3220 1.1 christos 3221 1.1 christos return vpc; 3222 1.1 christos #undef FLD 3223 1.1 christos } 3224 1.1 christos 3225 1.1 christos /* sdw: sdw $rt,$lo16($base) */ 3226 1.1 christos 3227 1.1 christos static SEM_PC 3228 1.1 christos SEM_FN_NAME (iq2000bf,sdw) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3229 1.1 christos { 3230 1.1 christos #define FLD(f) abuf->fields.sfmt_addi.f 3231 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3232 1.1 christos int UNUSED written = 0; 3233 1.1 christos IADDR UNUSED pc = abuf->addr; 3234 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3235 1.1 christos 3236 1.1 christos { 3237 1.1 christos SI tmp_addr; 3238 1.1 christos tmp_addr = ANDSI (ADDSI (GET_H_GR (FLD (f_rs)), FLD (f_imm)), INVSI (3)); 3239 1.1 christos { 3240 1.1 christos SI opval = GET_H_GR (FLD (f_rt)); 3241 1.1 christos SETMEMSI (current_cpu, pc, ADDSI (tmp_addr, 4), opval); 3242 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); 3243 1.1 christos } 3244 1.1 christos { 3245 1.1 christos SI opval = GET_H_GR (ADDSI (FLD (f_rt), 1)); 3246 1.1 christos SETMEMSI (current_cpu, pc, tmp_addr, opval); 3247 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); 3248 1.1 christos } 3249 1.1 christos } 3250 1.1 christos 3251 1.1 christos return vpc; 3252 1.1 christos #undef FLD 3253 1.1 christos } 3254 1.1 christos 3255 1.1 christos /* j: j $jmptarg */ 3256 1.1 christos 3257 1.1 christos static SEM_PC 3258 1.1 christos SEM_FN_NAME (iq2000bf,j) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3259 1.1 christos { 3260 1.1 christos #define FLD(f) abuf->fields.sfmt_j.f 3261 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3262 1.1 christos int UNUSED written = 0; 3263 1.1 christos IADDR UNUSED pc = abuf->addr; 3264 1.1 christos SEM_BRANCH_INIT 3265 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3266 1.1 christos 3267 1.1 christos { 3268 1.1 christos { 3269 1.1 christos USI opval = FLD (i_jmptarg); 3270 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 3271 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 3272 1.1 christos } 3273 1.1 christos } 3274 1.1 christos 3275 1.1 christos SEM_BRANCH_FINI (vpc); 3276 1.1 christos return vpc; 3277 1.1 christos #undef FLD 3278 1.1 christos } 3279 1.1 christos 3280 1.1 christos /* jal: jal $jmptarg */ 3281 1.1 christos 3282 1.1 christos static SEM_PC 3283 1.1 christos SEM_FN_NAME (iq2000bf,jal) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3284 1.1 christos { 3285 1.1 christos #define FLD(f) abuf->fields.sfmt_j.f 3286 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3287 1.1 christos int UNUSED written = 0; 3288 1.1 christos IADDR UNUSED pc = abuf->addr; 3289 1.1 christos SEM_BRANCH_INIT 3290 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3291 1.1 christos 3292 1.1 christos { 3293 1.1 christos { 3294 1.1 christos { 3295 1.1 christos SI opval = ADDSI (pc, 8); 3296 1.1 christos SET_H_GR (((UINT) 31), opval); 3297 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); 3298 1.1 christos } 3299 1.1 christos { 3300 1.1 christos USI opval = FLD (i_jmptarg); 3301 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 3302 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 3303 1.1 christos } 3304 1.1 christos } 3305 1.1 christos } 3306 1.1 christos 3307 1.1 christos SEM_BRANCH_FINI (vpc); 3308 1.1 christos return vpc; 3309 1.1 christos #undef FLD 3310 1.1 christos } 3311 1.1 christos 3312 1.1 christos /* bmb: bmb $rs,$rt,$offset */ 3313 1.1 christos 3314 1.1 christos static SEM_PC 3315 1.1 christos SEM_FN_NAME (iq2000bf,bmb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) 3316 1.1 christos { 3317 1.1 christos #define FLD(f) abuf->fields.sfmt_bbi.f 3318 1.1 christos ARGBUF *abuf = SEM_ARGBUF (sem_arg); 3319 1.1 christos int UNUSED written = 0; 3320 1.1 christos IADDR UNUSED pc = abuf->addr; 3321 1.1 christos SEM_BRANCH_INIT 3322 1.1 christos SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4); 3323 1.1 christos 3324 1.1 christos { 3325 1.1 christos BI tmp_branch_; 3326 1.1 christos tmp_branch_ = 0; 3327 1.1 christos if (EQSI (ANDSI (GET_H_GR (FLD (f_rs)), 255), ANDSI (GET_H_GR (FLD (f_rt)), 255))) { 3328 1.1 christos tmp_branch_ = 1; 3329 1.1 christos } 3330 1.1 christos if (EQSI (ANDSI (GET_H_GR (FLD (f_rs)), 65280), ANDSI (GET_H_GR (FLD (f_rt)), 65280))) { 3331 1.1 christos tmp_branch_ = 1; 3332 1.1 christos } 3333 1.1 christos if (EQSI (ANDSI (GET_H_GR (FLD (f_rs)), 16711680), ANDSI (GET_H_GR (FLD (f_rt)), 16711680))) { 3334 1.1 christos tmp_branch_ = 1; 3335 1.1 christos } 3336 1.1 christos if (EQSI (ANDSI (GET_H_GR (FLD (f_rs)), 0xff000000), ANDSI (GET_H_GR (FLD (f_rt)), 0xff000000))) { 3337 1.1 christos tmp_branch_ = 1; 3338 1.1 christos } 3339 1.1 christos if (tmp_branch_) { 3340 1.1 christos { 3341 1.1 christos { 3342 1.1 christos USI opval = FLD (i_offset); 3343 1.1 christos SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); 3344 1.1 christos written |= (1 << 3); 3345 1.1.1.5 christos CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); 3346 1.1 christos } 3347 1.1 christos } 3348 1.1 christos } 3349 1.1 christos } 3350 1.1 christos 3351 1.1 christos abuf->written = written; 3352 1.1 christos SEM_BRANCH_FINI (vpc); 3353 1.1 christos return vpc; 3354 1.1 christos #undef FLD 3355 1.1 christos } 3356 1.1 christos 3357 1.1 christos /* Table of all semantic fns. */ 3358 1.1 christos 3359 1.1 christos static const struct sem_fn_desc sem_fns[] = { 3360 1.1 christos { IQ2000BF_INSN_X_INVALID, SEM_FN_NAME (iq2000bf,x_invalid) }, 3361 1.1 christos { IQ2000BF_INSN_X_AFTER, SEM_FN_NAME (iq2000bf,x_after) }, 3362 1.1 christos { IQ2000BF_INSN_X_BEFORE, SEM_FN_NAME (iq2000bf,x_before) }, 3363 1.1 christos { IQ2000BF_INSN_X_CTI_CHAIN, SEM_FN_NAME (iq2000bf,x_cti_chain) }, 3364 1.1 christos { IQ2000BF_INSN_X_CHAIN, SEM_FN_NAME (iq2000bf,x_chain) }, 3365 1.1 christos { IQ2000BF_INSN_X_BEGIN, SEM_FN_NAME (iq2000bf,x_begin) }, 3366 1.1 christos { IQ2000BF_INSN_ADD, SEM_FN_NAME (iq2000bf,add) }, 3367 1.1 christos { IQ2000BF_INSN_ADDI, SEM_FN_NAME (iq2000bf,addi) }, 3368 1.1 christos { IQ2000BF_INSN_ADDIU, SEM_FN_NAME (iq2000bf,addiu) }, 3369 1.1 christos { IQ2000BF_INSN_ADDU, SEM_FN_NAME (iq2000bf,addu) }, 3370 1.1 christos { IQ2000BF_INSN_ADO16, SEM_FN_NAME (iq2000bf,ado16) }, 3371 1.1 christos { IQ2000BF_INSN_AND, SEM_FN_NAME (iq2000bf,and) }, 3372 1.1 christos { IQ2000BF_INSN_ANDI, SEM_FN_NAME (iq2000bf,andi) }, 3373 1.1 christos { IQ2000BF_INSN_ANDOI, SEM_FN_NAME (iq2000bf,andoi) }, 3374 1.1 christos { IQ2000BF_INSN_NOR, SEM_FN_NAME (iq2000bf,nor) }, 3375 1.1 christos { IQ2000BF_INSN_OR, SEM_FN_NAME (iq2000bf,or) }, 3376 1.1 christos { IQ2000BF_INSN_ORI, SEM_FN_NAME (iq2000bf,ori) }, 3377 1.1 christos { IQ2000BF_INSN_RAM, SEM_FN_NAME (iq2000bf,ram) }, 3378 1.1 christos { IQ2000BF_INSN_SLL, SEM_FN_NAME (iq2000bf,sll) }, 3379 1.1 christos { IQ2000BF_INSN_SLLV, SEM_FN_NAME (iq2000bf,sllv) }, 3380 1.1 christos { IQ2000BF_INSN_SLMV, SEM_FN_NAME (iq2000bf,slmv) }, 3381 1.1 christos { IQ2000BF_INSN_SLT, SEM_FN_NAME (iq2000bf,slt) }, 3382 1.1 christos { IQ2000BF_INSN_SLTI, SEM_FN_NAME (iq2000bf,slti) }, 3383 1.1 christos { IQ2000BF_INSN_SLTIU, SEM_FN_NAME (iq2000bf,sltiu) }, 3384 1.1 christos { IQ2000BF_INSN_SLTU, SEM_FN_NAME (iq2000bf,sltu) }, 3385 1.1 christos { IQ2000BF_INSN_SRA, SEM_FN_NAME (iq2000bf,sra) }, 3386 1.1 christos { IQ2000BF_INSN_SRAV, SEM_FN_NAME (iq2000bf,srav) }, 3387 1.1 christos { IQ2000BF_INSN_SRL, SEM_FN_NAME (iq2000bf,srl) }, 3388 1.1 christos { IQ2000BF_INSN_SRLV, SEM_FN_NAME (iq2000bf,srlv) }, 3389 1.1 christos { IQ2000BF_INSN_SRMV, SEM_FN_NAME (iq2000bf,srmv) }, 3390 1.1 christos { IQ2000BF_INSN_SUB, SEM_FN_NAME (iq2000bf,sub) }, 3391 1.1 christos { IQ2000BF_INSN_SUBU, SEM_FN_NAME (iq2000bf,subu) }, 3392 1.1 christos { IQ2000BF_INSN_XOR, SEM_FN_NAME (iq2000bf,xor) }, 3393 1.1 christos { IQ2000BF_INSN_XORI, SEM_FN_NAME (iq2000bf,xori) }, 3394 1.1 christos { IQ2000BF_INSN_BBI, SEM_FN_NAME (iq2000bf,bbi) }, 3395 1.1 christos { IQ2000BF_INSN_BBIN, SEM_FN_NAME (iq2000bf,bbin) }, 3396 1.1 christos { IQ2000BF_INSN_BBV, SEM_FN_NAME (iq2000bf,bbv) }, 3397 1.1 christos { IQ2000BF_INSN_BBVN, SEM_FN_NAME (iq2000bf,bbvn) }, 3398 1.1 christos { IQ2000BF_INSN_BEQ, SEM_FN_NAME (iq2000bf,beq) }, 3399 1.1 christos { IQ2000BF_INSN_BEQL, SEM_FN_NAME (iq2000bf,beql) }, 3400 1.1 christos { IQ2000BF_INSN_BGEZ, SEM_FN_NAME (iq2000bf,bgez) }, 3401 1.1 christos { IQ2000BF_INSN_BGEZAL, SEM_FN_NAME (iq2000bf,bgezal) }, 3402 1.1 christos { IQ2000BF_INSN_BGEZALL, SEM_FN_NAME (iq2000bf,bgezall) }, 3403 1.1 christos { IQ2000BF_INSN_BGEZL, SEM_FN_NAME (iq2000bf,bgezl) }, 3404 1.1 christos { IQ2000BF_INSN_BLTZ, SEM_FN_NAME (iq2000bf,bltz) }, 3405 1.1 christos { IQ2000BF_INSN_BLTZL, SEM_FN_NAME (iq2000bf,bltzl) }, 3406 1.1 christos { IQ2000BF_INSN_BLTZAL, SEM_FN_NAME (iq2000bf,bltzal) }, 3407 1.1 christos { IQ2000BF_INSN_BLTZALL, SEM_FN_NAME (iq2000bf,bltzall) }, 3408 1.1 christos { IQ2000BF_INSN_BMB0, SEM_FN_NAME (iq2000bf,bmb0) }, 3409 1.1 christos { IQ2000BF_INSN_BMB1, SEM_FN_NAME (iq2000bf,bmb1) }, 3410 1.1 christos { IQ2000BF_INSN_BMB2, SEM_FN_NAME (iq2000bf,bmb2) }, 3411 1.1 christos { IQ2000BF_INSN_BMB3, SEM_FN_NAME (iq2000bf,bmb3) }, 3412 1.1 christos { IQ2000BF_INSN_BNE, SEM_FN_NAME (iq2000bf,bne) }, 3413 1.1 christos { IQ2000BF_INSN_BNEL, SEM_FN_NAME (iq2000bf,bnel) }, 3414 1.1 christos { IQ2000BF_INSN_JALR, SEM_FN_NAME (iq2000bf,jalr) }, 3415 1.1 christos { IQ2000BF_INSN_JR, SEM_FN_NAME (iq2000bf,jr) }, 3416 1.1 christos { IQ2000BF_INSN_LB, SEM_FN_NAME (iq2000bf,lb) }, 3417 1.1 christos { IQ2000BF_INSN_LBU, SEM_FN_NAME (iq2000bf,lbu) }, 3418 1.1 christos { IQ2000BF_INSN_LH, SEM_FN_NAME (iq2000bf,lh) }, 3419 1.1 christos { IQ2000BF_INSN_LHU, SEM_FN_NAME (iq2000bf,lhu) }, 3420 1.1 christos { IQ2000BF_INSN_LUI, SEM_FN_NAME (iq2000bf,lui) }, 3421 1.1 christos { IQ2000BF_INSN_LW, SEM_FN_NAME (iq2000bf,lw) }, 3422 1.1 christos { IQ2000BF_INSN_SB, SEM_FN_NAME (iq2000bf,sb) }, 3423 1.1 christos { IQ2000BF_INSN_SH, SEM_FN_NAME (iq2000bf,sh) }, 3424 1.1 christos { IQ2000BF_INSN_SW, SEM_FN_NAME (iq2000bf,sw) }, 3425 1.1 christos { IQ2000BF_INSN_BREAK, SEM_FN_NAME (iq2000bf,break) }, 3426 1.1 christos { IQ2000BF_INSN_SYSCALL, SEM_FN_NAME (iq2000bf,syscall) }, 3427 1.1 christos { IQ2000BF_INSN_ANDOUI, SEM_FN_NAME (iq2000bf,andoui) }, 3428 1.1 christos { IQ2000BF_INSN_ORUI, SEM_FN_NAME (iq2000bf,orui) }, 3429 1.1 christos { IQ2000BF_INSN_BGTZ, SEM_FN_NAME (iq2000bf,bgtz) }, 3430 1.1 christos { IQ2000BF_INSN_BGTZL, SEM_FN_NAME (iq2000bf,bgtzl) }, 3431 1.1 christos { IQ2000BF_INSN_BLEZ, SEM_FN_NAME (iq2000bf,blez) }, 3432 1.1 christos { IQ2000BF_INSN_BLEZL, SEM_FN_NAME (iq2000bf,blezl) }, 3433 1.1 christos { IQ2000BF_INSN_MRGB, SEM_FN_NAME (iq2000bf,mrgb) }, 3434 1.1 christos { IQ2000BF_INSN_BCTXT, SEM_FN_NAME (iq2000bf,bctxt) }, 3435 1.1 christos { IQ2000BF_INSN_BC0F, SEM_FN_NAME (iq2000bf,bc0f) }, 3436 1.1 christos { IQ2000BF_INSN_BC0FL, SEM_FN_NAME (iq2000bf,bc0fl) }, 3437 1.1 christos { IQ2000BF_INSN_BC3F, SEM_FN_NAME (iq2000bf,bc3f) }, 3438 1.1 christos { IQ2000BF_INSN_BC3FL, SEM_FN_NAME (iq2000bf,bc3fl) }, 3439 1.1 christos { IQ2000BF_INSN_BC0T, SEM_FN_NAME (iq2000bf,bc0t) }, 3440 1.1 christos { IQ2000BF_INSN_BC0TL, SEM_FN_NAME (iq2000bf,bc0tl) }, 3441 1.1 christos { IQ2000BF_INSN_BC3T, SEM_FN_NAME (iq2000bf,bc3t) }, 3442 1.1 christos { IQ2000BF_INSN_BC3TL, SEM_FN_NAME (iq2000bf,bc3tl) }, 3443 1.1 christos { IQ2000BF_INSN_CFC0, SEM_FN_NAME (iq2000bf,cfc0) }, 3444 1.1 christos { IQ2000BF_INSN_CFC1, SEM_FN_NAME (iq2000bf,cfc1) }, 3445 1.1 christos { IQ2000BF_INSN_CFC2, SEM_FN_NAME (iq2000bf,cfc2) }, 3446 1.1 christos { IQ2000BF_INSN_CFC3, SEM_FN_NAME (iq2000bf,cfc3) }, 3447 1.1 christos { IQ2000BF_INSN_CHKHDR, SEM_FN_NAME (iq2000bf,chkhdr) }, 3448 1.1 christos { IQ2000BF_INSN_CTC0, SEM_FN_NAME (iq2000bf,ctc0) }, 3449 1.1 christos { IQ2000BF_INSN_CTC1, SEM_FN_NAME (iq2000bf,ctc1) }, 3450 1.1 christos { IQ2000BF_INSN_CTC2, SEM_FN_NAME (iq2000bf,ctc2) }, 3451 1.1 christos { IQ2000BF_INSN_CTC3, SEM_FN_NAME (iq2000bf,ctc3) }, 3452 1.1 christos { IQ2000BF_INSN_JCR, SEM_FN_NAME (iq2000bf,jcr) }, 3453 1.1 christos { IQ2000BF_INSN_LUC32, SEM_FN_NAME (iq2000bf,luc32) }, 3454 1.1 christos { IQ2000BF_INSN_LUC32L, SEM_FN_NAME (iq2000bf,luc32l) }, 3455 1.1 christos { IQ2000BF_INSN_LUC64, SEM_FN_NAME (iq2000bf,luc64) }, 3456 1.1 christos { IQ2000BF_INSN_LUC64L, SEM_FN_NAME (iq2000bf,luc64l) }, 3457 1.1 christos { IQ2000BF_INSN_LUK, SEM_FN_NAME (iq2000bf,luk) }, 3458 1.1 christos { IQ2000BF_INSN_LULCK, SEM_FN_NAME (iq2000bf,lulck) }, 3459 1.1 christos { IQ2000BF_INSN_LUM32, SEM_FN_NAME (iq2000bf,lum32) }, 3460 1.1 christos { IQ2000BF_INSN_LUM32L, SEM_FN_NAME (iq2000bf,lum32l) }, 3461 1.1 christos { IQ2000BF_INSN_LUM64, SEM_FN_NAME (iq2000bf,lum64) }, 3462 1.1 christos { IQ2000BF_INSN_LUM64L, SEM_FN_NAME (iq2000bf,lum64l) }, 3463 1.1 christos { IQ2000BF_INSN_LUR, SEM_FN_NAME (iq2000bf,lur) }, 3464 1.1 christos { IQ2000BF_INSN_LURL, SEM_FN_NAME (iq2000bf,lurl) }, 3465 1.1 christos { IQ2000BF_INSN_LUULCK, SEM_FN_NAME (iq2000bf,luulck) }, 3466 1.1 christos { IQ2000BF_INSN_MFC0, SEM_FN_NAME (iq2000bf,mfc0) }, 3467 1.1 christos { IQ2000BF_INSN_MFC1, SEM_FN_NAME (iq2000bf,mfc1) }, 3468 1.1 christos { IQ2000BF_INSN_MFC2, SEM_FN_NAME (iq2000bf,mfc2) }, 3469 1.1 christos { IQ2000BF_INSN_MFC3, SEM_FN_NAME (iq2000bf,mfc3) }, 3470 1.1 christos { IQ2000BF_INSN_MTC0, SEM_FN_NAME (iq2000bf,mtc0) }, 3471 1.1 christos { IQ2000BF_INSN_MTC1, SEM_FN_NAME (iq2000bf,mtc1) }, 3472 1.1 christos { IQ2000BF_INSN_MTC2, SEM_FN_NAME (iq2000bf,mtc2) }, 3473 1.1 christos { IQ2000BF_INSN_MTC3, SEM_FN_NAME (iq2000bf,mtc3) }, 3474 1.1 christos { IQ2000BF_INSN_PKRL, SEM_FN_NAME (iq2000bf,pkrl) }, 3475 1.1 christos { IQ2000BF_INSN_PKRLR1, SEM_FN_NAME (iq2000bf,pkrlr1) }, 3476 1.1 christos { IQ2000BF_INSN_PKRLR30, SEM_FN_NAME (iq2000bf,pkrlr30) }, 3477 1.1 christos { IQ2000BF_INSN_RB, SEM_FN_NAME (iq2000bf,rb) }, 3478 1.1 christos { IQ2000BF_INSN_RBR1, SEM_FN_NAME (iq2000bf,rbr1) }, 3479 1.1 christos { IQ2000BF_INSN_RBR30, SEM_FN_NAME (iq2000bf,rbr30) }, 3480 1.1 christos { IQ2000BF_INSN_RFE, SEM_FN_NAME (iq2000bf,rfe) }, 3481 1.1 christos { IQ2000BF_INSN_RX, SEM_FN_NAME (iq2000bf,rx) }, 3482 1.1 christos { IQ2000BF_INSN_RXR1, SEM_FN_NAME (iq2000bf,rxr1) }, 3483 1.1 christos { IQ2000BF_INSN_RXR30, SEM_FN_NAME (iq2000bf,rxr30) }, 3484 1.1 christos { IQ2000BF_INSN_SLEEP, SEM_FN_NAME (iq2000bf,sleep) }, 3485 1.1 christos { IQ2000BF_INSN_SRRD, SEM_FN_NAME (iq2000bf,srrd) }, 3486 1.1 christos { IQ2000BF_INSN_SRRDL, SEM_FN_NAME (iq2000bf,srrdl) }, 3487 1.1 christos { IQ2000BF_INSN_SRULCK, SEM_FN_NAME (iq2000bf,srulck) }, 3488 1.1 christos { IQ2000BF_INSN_SRWR, SEM_FN_NAME (iq2000bf,srwr) }, 3489 1.1 christos { IQ2000BF_INSN_SRWRU, SEM_FN_NAME (iq2000bf,srwru) }, 3490 1.1 christos { IQ2000BF_INSN_TRAPQFL, SEM_FN_NAME (iq2000bf,trapqfl) }, 3491 1.1 christos { IQ2000BF_INSN_TRAPQNE, SEM_FN_NAME (iq2000bf,trapqne) }, 3492 1.1 christos { IQ2000BF_INSN_TRAPREL, SEM_FN_NAME (iq2000bf,traprel) }, 3493 1.1 christos { IQ2000BF_INSN_WB, SEM_FN_NAME (iq2000bf,wb) }, 3494 1.1 christos { IQ2000BF_INSN_WBU, SEM_FN_NAME (iq2000bf,wbu) }, 3495 1.1 christos { IQ2000BF_INSN_WBR1, SEM_FN_NAME (iq2000bf,wbr1) }, 3496 1.1 christos { IQ2000BF_INSN_WBR1U, SEM_FN_NAME (iq2000bf,wbr1u) }, 3497 1.1 christos { IQ2000BF_INSN_WBR30, SEM_FN_NAME (iq2000bf,wbr30) }, 3498 1.1 christos { IQ2000BF_INSN_WBR30U, SEM_FN_NAME (iq2000bf,wbr30u) }, 3499 1.1 christos { IQ2000BF_INSN_WX, SEM_FN_NAME (iq2000bf,wx) }, 3500 1.1 christos { IQ2000BF_INSN_WXU, SEM_FN_NAME (iq2000bf,wxu) }, 3501 1.1 christos { IQ2000BF_INSN_WXR1, SEM_FN_NAME (iq2000bf,wxr1) }, 3502 1.1 christos { IQ2000BF_INSN_WXR1U, SEM_FN_NAME (iq2000bf,wxr1u) }, 3503 1.1 christos { IQ2000BF_INSN_WXR30, SEM_FN_NAME (iq2000bf,wxr30) }, 3504 1.1 christos { IQ2000BF_INSN_WXR30U, SEM_FN_NAME (iq2000bf,wxr30u) }, 3505 1.1 christos { IQ2000BF_INSN_LDW, SEM_FN_NAME (iq2000bf,ldw) }, 3506 1.1 christos { IQ2000BF_INSN_SDW, SEM_FN_NAME (iq2000bf,sdw) }, 3507 1.1 christos { IQ2000BF_INSN_J, SEM_FN_NAME (iq2000bf,j) }, 3508 1.1 christos { IQ2000BF_INSN_JAL, SEM_FN_NAME (iq2000bf,jal) }, 3509 1.1 christos { IQ2000BF_INSN_BMB, SEM_FN_NAME (iq2000bf,bmb) }, 3510 1.1 christos { 0, 0 } 3511 1.1 christos }; 3512 1.1 christos 3513 1.1 christos /* Add the semantic fns to IDESC_TABLE. */ 3514 1.1 christos 3515 1.1 christos void 3516 1.1 christos SEM_FN_NAME (iq2000bf,init_idesc_table) (SIM_CPU *current_cpu) 3517 1.1 christos { 3518 1.1 christos IDESC *idesc_table = CPU_IDESC (current_cpu); 3519 1.1 christos const struct sem_fn_desc *sf; 3520 1.1 christos int mach_num = MACH_NUM (CPU_MACH (current_cpu)); 3521 1.1 christos 3522 1.1 christos for (sf = &sem_fns[0]; sf->fn != 0; ++sf) 3523 1.1 christos { 3524 1.1 christos const CGEN_INSN *insn = idesc_table[sf->index].idata; 3525 1.1 christos int valid_p = (CGEN_INSN_VIRTUAL_P (insn) 3526 1.1 christos || CGEN_INSN_MACH_HAS_P (insn, mach_num)); 3527 1.1 christos #if FAST_P 3528 1.1 christos if (valid_p) 3529 1.1 christos idesc_table[sf->index].sem_fast = sf->fn; 3530 1.1 christos else 3531 1.1 christos idesc_table[sf->index].sem_fast = SEM_FN_NAME (iq2000bf,x_invalid); 3532 1.1 christos #else 3533 1.1 christos if (valid_p) 3534 1.1 christos idesc_table[sf->index].sem_full = sf->fn; 3535 1.1 christos else 3536 1.1 christos idesc_table[sf->index].sem_full = SEM_FN_NAME (iq2000bf,x_invalid); 3537 1.1 christos #endif 3538 1.1 christos } 3539 1.1 christos } 3540 1.1 christos 3541