Home | History | Annotate | Line # | Download | only in iq2000
model.c revision 1.1.1.5
      1      1.1  christos /* Simulator model support 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.5  christos Copyright 1996-2016 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.2  christos    with this program; if not, see <http://www.gnu.org/licenses/>.
     21      1.1  christos 
     22      1.1  christos */
     23      1.1  christos 
     24      1.1  christos #define WANT_CPU iq2000bf
     25      1.1  christos #define WANT_CPU_IQ2000BF
     26      1.1  christos 
     27      1.1  christos #include "sim-main.h"
     28      1.1  christos 
     29      1.1  christos /* The profiling data is recorded here, but is accessed via the profiling
     30      1.1  christos    mechanism.  After all, this is information for profiling.  */
     31      1.1  christos 
     32      1.1  christos #if WITH_PROFILE_MODEL_P
     33      1.1  christos 
     34      1.1  christos /* Model handlers for each insn.  */
     35      1.1  christos 
     36      1.1  christos static int
     37      1.1  christos model_iq2000_add (SIM_CPU *current_cpu, void *sem_arg)
     38      1.1  christos {
     39      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
     40      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
     41      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
     42      1.1  christos   int cycles = 0;
     43      1.1  christos   {
     44      1.1  christos     int referenced = 0;
     45      1.1  christos     int UNUSED insn_referenced = abuf->written;
     46      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
     47      1.1  christos   }
     48      1.1  christos   return cycles;
     49      1.1  christos #undef FLD
     50      1.1  christos }
     51      1.1  christos 
     52      1.1  christos static int
     53      1.1  christos model_iq2000_addi (SIM_CPU *current_cpu, void *sem_arg)
     54      1.1  christos {
     55      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
     56      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
     57      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
     58      1.1  christos   int cycles = 0;
     59      1.1  christos   {
     60      1.1  christos     int referenced = 0;
     61      1.1  christos     int UNUSED insn_referenced = abuf->written;
     62      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
     63      1.1  christos   }
     64      1.1  christos   return cycles;
     65      1.1  christos #undef FLD
     66      1.1  christos }
     67      1.1  christos 
     68      1.1  christos static int
     69      1.1  christos model_iq2000_addiu (SIM_CPU *current_cpu, void *sem_arg)
     70      1.1  christos {
     71      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
     72      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
     73      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
     74      1.1  christos   int cycles = 0;
     75      1.1  christos   {
     76      1.1  christos     int referenced = 0;
     77      1.1  christos     int UNUSED insn_referenced = abuf->written;
     78      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
     79      1.1  christos   }
     80      1.1  christos   return cycles;
     81      1.1  christos #undef FLD
     82      1.1  christos }
     83      1.1  christos 
     84      1.1  christos static int
     85      1.1  christos model_iq2000_addu (SIM_CPU *current_cpu, void *sem_arg)
     86      1.1  christos {
     87      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
     88      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
     89      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
     90      1.1  christos   int cycles = 0;
     91      1.1  christos   {
     92      1.1  christos     int referenced = 0;
     93      1.1  christos     int UNUSED insn_referenced = abuf->written;
     94      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
     95      1.1  christos   }
     96      1.1  christos   return cycles;
     97      1.1  christos #undef FLD
     98      1.1  christos }
     99      1.1  christos 
    100      1.1  christos static int
    101      1.1  christos model_iq2000_ado16 (SIM_CPU *current_cpu, void *sem_arg)
    102      1.1  christos {
    103      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    104      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    105      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    106      1.1  christos   int cycles = 0;
    107      1.1  christos   {
    108      1.1  christos     int referenced = 0;
    109      1.1  christos     int UNUSED insn_referenced = abuf->written;
    110      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    111      1.1  christos   }
    112      1.1  christos   return cycles;
    113      1.1  christos #undef FLD
    114      1.1  christos }
    115      1.1  christos 
    116      1.1  christos static int
    117      1.1  christos model_iq2000_and (SIM_CPU *current_cpu, void *sem_arg)
    118      1.1  christos {
    119      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    120      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    121      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    122      1.1  christos   int cycles = 0;
    123      1.1  christos   {
    124      1.1  christos     int referenced = 0;
    125      1.1  christos     int UNUSED insn_referenced = abuf->written;
    126      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    127      1.1  christos   }
    128      1.1  christos   return cycles;
    129      1.1  christos #undef FLD
    130      1.1  christos }
    131      1.1  christos 
    132      1.1  christos static int
    133      1.1  christos model_iq2000_andi (SIM_CPU *current_cpu, void *sem_arg)
    134      1.1  christos {
    135      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    136      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    137      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    138      1.1  christos   int cycles = 0;
    139      1.1  christos   {
    140      1.1  christos     int referenced = 0;
    141      1.1  christos     int UNUSED insn_referenced = abuf->written;
    142      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    143      1.1  christos   }
    144      1.1  christos   return cycles;
    145      1.1  christos #undef FLD
    146      1.1  christos }
    147      1.1  christos 
    148      1.1  christos static int
    149      1.1  christos model_iq2000_andoi (SIM_CPU *current_cpu, void *sem_arg)
    150      1.1  christos {
    151      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    152      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    153      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    154      1.1  christos   int cycles = 0;
    155      1.1  christos   {
    156      1.1  christos     int referenced = 0;
    157      1.1  christos     int UNUSED insn_referenced = abuf->written;
    158      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    159      1.1  christos   }
    160      1.1  christos   return cycles;
    161      1.1  christos #undef FLD
    162      1.1  christos }
    163      1.1  christos 
    164      1.1  christos static int
    165      1.1  christos model_iq2000_nor (SIM_CPU *current_cpu, void *sem_arg)
    166      1.1  christos {
    167      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    168      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    169      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    170      1.1  christos   int cycles = 0;
    171      1.1  christos   {
    172      1.1  christos     int referenced = 0;
    173      1.1  christos     int UNUSED insn_referenced = abuf->written;
    174      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    175      1.1  christos   }
    176      1.1  christos   return cycles;
    177      1.1  christos #undef FLD
    178      1.1  christos }
    179      1.1  christos 
    180      1.1  christos static int
    181      1.1  christos model_iq2000_or (SIM_CPU *current_cpu, void *sem_arg)
    182      1.1  christos {
    183      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    184      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    185      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    186      1.1  christos   int cycles = 0;
    187      1.1  christos   {
    188      1.1  christos     int referenced = 0;
    189      1.1  christos     int UNUSED insn_referenced = abuf->written;
    190      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    191      1.1  christos   }
    192      1.1  christos   return cycles;
    193      1.1  christos #undef FLD
    194      1.1  christos }
    195      1.1  christos 
    196      1.1  christos static int
    197      1.1  christos model_iq2000_ori (SIM_CPU *current_cpu, void *sem_arg)
    198      1.1  christos {
    199      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    200      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    201      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    202      1.1  christos   int cycles = 0;
    203      1.1  christos   {
    204      1.1  christos     int referenced = 0;
    205      1.1  christos     int UNUSED insn_referenced = abuf->written;
    206      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    207      1.1  christos   }
    208      1.1  christos   return cycles;
    209      1.1  christos #undef FLD
    210      1.1  christos }
    211      1.1  christos 
    212      1.1  christos static int
    213      1.1  christos model_iq2000_ram (SIM_CPU *current_cpu, void *sem_arg)
    214      1.1  christos {
    215      1.1  christos #define FLD(f) abuf->fields.sfmt_ram.f
    216      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    217      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    218      1.1  christos   int cycles = 0;
    219      1.1  christos   {
    220      1.1  christos     int referenced = 0;
    221      1.1  christos     int UNUSED insn_referenced = abuf->written;
    222      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    223      1.1  christos   }
    224      1.1  christos   return cycles;
    225      1.1  christos #undef FLD
    226      1.1  christos }
    227      1.1  christos 
    228      1.1  christos static int
    229      1.1  christos model_iq2000_sll (SIM_CPU *current_cpu, void *sem_arg)
    230      1.1  christos {
    231      1.1  christos #define FLD(f) abuf->fields.sfmt_ram.f
    232      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    233      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    234      1.1  christos   int cycles = 0;
    235      1.1  christos   {
    236      1.1  christos     int referenced = 0;
    237      1.1  christos     int UNUSED insn_referenced = abuf->written;
    238      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    239      1.1  christos   }
    240      1.1  christos   return cycles;
    241      1.1  christos #undef FLD
    242      1.1  christos }
    243      1.1  christos 
    244      1.1  christos static int
    245      1.1  christos model_iq2000_sllv (SIM_CPU *current_cpu, void *sem_arg)
    246      1.1  christos {
    247      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    248      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    249      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    250      1.1  christos   int cycles = 0;
    251      1.1  christos   {
    252      1.1  christos     int referenced = 0;
    253      1.1  christos     int UNUSED insn_referenced = abuf->written;
    254      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    255      1.1  christos   }
    256      1.1  christos   return cycles;
    257      1.1  christos #undef FLD
    258      1.1  christos }
    259      1.1  christos 
    260      1.1  christos static int
    261      1.1  christos model_iq2000_slmv (SIM_CPU *current_cpu, void *sem_arg)
    262      1.1  christos {
    263      1.1  christos #define FLD(f) abuf->fields.sfmt_ram.f
    264      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    265      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    266      1.1  christos   int cycles = 0;
    267      1.1  christos   {
    268      1.1  christos     int referenced = 0;
    269      1.1  christos     int UNUSED insn_referenced = abuf->written;
    270      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    271      1.1  christos   }
    272      1.1  christos   return cycles;
    273      1.1  christos #undef FLD
    274      1.1  christos }
    275      1.1  christos 
    276      1.1  christos static int
    277      1.1  christos model_iq2000_slt (SIM_CPU *current_cpu, void *sem_arg)
    278      1.1  christos {
    279      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    280      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    281      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    282      1.1  christos   int cycles = 0;
    283      1.1  christos   {
    284      1.1  christos     int referenced = 0;
    285      1.1  christos     int UNUSED insn_referenced = abuf->written;
    286      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    287      1.1  christos   }
    288      1.1  christos   return cycles;
    289      1.1  christos #undef FLD
    290      1.1  christos }
    291      1.1  christos 
    292      1.1  christos static int
    293      1.1  christos model_iq2000_slti (SIM_CPU *current_cpu, void *sem_arg)
    294      1.1  christos {
    295      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    296      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    297      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    298      1.1  christos   int cycles = 0;
    299      1.1  christos   {
    300      1.1  christos     int referenced = 0;
    301      1.1  christos     int UNUSED insn_referenced = abuf->written;
    302      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    303      1.1  christos   }
    304      1.1  christos   return cycles;
    305      1.1  christos #undef FLD
    306      1.1  christos }
    307      1.1  christos 
    308      1.1  christos static int
    309      1.1  christos model_iq2000_sltiu (SIM_CPU *current_cpu, void *sem_arg)
    310      1.1  christos {
    311      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    312      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    313      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    314      1.1  christos   int cycles = 0;
    315      1.1  christos   {
    316      1.1  christos     int referenced = 0;
    317      1.1  christos     int UNUSED insn_referenced = abuf->written;
    318      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    319      1.1  christos   }
    320      1.1  christos   return cycles;
    321      1.1  christos #undef FLD
    322      1.1  christos }
    323      1.1  christos 
    324      1.1  christos static int
    325      1.1  christos model_iq2000_sltu (SIM_CPU *current_cpu, void *sem_arg)
    326      1.1  christos {
    327      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    328      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    329      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    330      1.1  christos   int cycles = 0;
    331      1.1  christos   {
    332      1.1  christos     int referenced = 0;
    333      1.1  christos     int UNUSED insn_referenced = abuf->written;
    334      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    335      1.1  christos   }
    336      1.1  christos   return cycles;
    337      1.1  christos #undef FLD
    338      1.1  christos }
    339      1.1  christos 
    340      1.1  christos static int
    341      1.1  christos model_iq2000_sra (SIM_CPU *current_cpu, void *sem_arg)
    342      1.1  christos {
    343      1.1  christos #define FLD(f) abuf->fields.sfmt_ram.f
    344      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    345      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    346      1.1  christos   int cycles = 0;
    347      1.1  christos   {
    348      1.1  christos     int referenced = 0;
    349      1.1  christos     int UNUSED insn_referenced = abuf->written;
    350      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    351      1.1  christos   }
    352      1.1  christos   return cycles;
    353      1.1  christos #undef FLD
    354      1.1  christos }
    355      1.1  christos 
    356      1.1  christos static int
    357      1.1  christos model_iq2000_srav (SIM_CPU *current_cpu, void *sem_arg)
    358      1.1  christos {
    359      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    360      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    361      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    362      1.1  christos   int cycles = 0;
    363      1.1  christos   {
    364      1.1  christos     int referenced = 0;
    365      1.1  christos     int UNUSED insn_referenced = abuf->written;
    366      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    367      1.1  christos   }
    368      1.1  christos   return cycles;
    369      1.1  christos #undef FLD
    370      1.1  christos }
    371      1.1  christos 
    372      1.1  christos static int
    373      1.1  christos model_iq2000_srl (SIM_CPU *current_cpu, void *sem_arg)
    374      1.1  christos {
    375      1.1  christos #define FLD(f) abuf->fields.sfmt_ram.f
    376      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    377      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    378      1.1  christos   int cycles = 0;
    379      1.1  christos   {
    380      1.1  christos     int referenced = 0;
    381      1.1  christos     int UNUSED insn_referenced = abuf->written;
    382      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    383      1.1  christos   }
    384      1.1  christos   return cycles;
    385      1.1  christos #undef FLD
    386      1.1  christos }
    387      1.1  christos 
    388      1.1  christos static int
    389      1.1  christos model_iq2000_srlv (SIM_CPU *current_cpu, void *sem_arg)
    390      1.1  christos {
    391      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    392      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    393      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    394      1.1  christos   int cycles = 0;
    395      1.1  christos   {
    396      1.1  christos     int referenced = 0;
    397      1.1  christos     int UNUSED insn_referenced = abuf->written;
    398      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    399      1.1  christos   }
    400      1.1  christos   return cycles;
    401      1.1  christos #undef FLD
    402      1.1  christos }
    403      1.1  christos 
    404      1.1  christos static int
    405      1.1  christos model_iq2000_srmv (SIM_CPU *current_cpu, void *sem_arg)
    406      1.1  christos {
    407      1.1  christos #define FLD(f) abuf->fields.sfmt_ram.f
    408      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    409      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    410      1.1  christos   int cycles = 0;
    411      1.1  christos   {
    412      1.1  christos     int referenced = 0;
    413      1.1  christos     int UNUSED insn_referenced = abuf->written;
    414      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    415      1.1  christos   }
    416      1.1  christos   return cycles;
    417      1.1  christos #undef FLD
    418      1.1  christos }
    419      1.1  christos 
    420      1.1  christos static int
    421      1.1  christos model_iq2000_sub (SIM_CPU *current_cpu, void *sem_arg)
    422      1.1  christos {
    423      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    424      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    425      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    426      1.1  christos   int cycles = 0;
    427      1.1  christos   {
    428      1.1  christos     int referenced = 0;
    429      1.1  christos     int UNUSED insn_referenced = abuf->written;
    430      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    431      1.1  christos   }
    432      1.1  christos   return cycles;
    433      1.1  christos #undef FLD
    434      1.1  christos }
    435      1.1  christos 
    436      1.1  christos static int
    437      1.1  christos model_iq2000_subu (SIM_CPU *current_cpu, void *sem_arg)
    438      1.1  christos {
    439      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    440      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    441      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    442      1.1  christos   int cycles = 0;
    443      1.1  christos   {
    444      1.1  christos     int referenced = 0;
    445      1.1  christos     int UNUSED insn_referenced = abuf->written;
    446      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    447      1.1  christos   }
    448      1.1  christos   return cycles;
    449      1.1  christos #undef FLD
    450      1.1  christos }
    451      1.1  christos 
    452      1.1  christos static int
    453      1.1  christos model_iq2000_xor (SIM_CPU *current_cpu, void *sem_arg)
    454      1.1  christos {
    455      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    456      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    457      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    458      1.1  christos   int cycles = 0;
    459      1.1  christos   {
    460      1.1  christos     int referenced = 0;
    461      1.1  christos     int UNUSED insn_referenced = abuf->written;
    462      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    463      1.1  christos   }
    464      1.1  christos   return cycles;
    465      1.1  christos #undef FLD
    466      1.1  christos }
    467      1.1  christos 
    468      1.1  christos static int
    469      1.1  christos model_iq2000_xori (SIM_CPU *current_cpu, void *sem_arg)
    470      1.1  christos {
    471      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    472      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    473      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    474      1.1  christos   int cycles = 0;
    475      1.1  christos   {
    476      1.1  christos     int referenced = 0;
    477      1.1  christos     int UNUSED insn_referenced = abuf->written;
    478      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    479      1.1  christos   }
    480      1.1  christos   return cycles;
    481      1.1  christos #undef FLD
    482      1.1  christos }
    483      1.1  christos 
    484      1.1  christos static int
    485      1.1  christos model_iq2000_bbi (SIM_CPU *current_cpu, void *sem_arg)
    486      1.1  christos {
    487      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    488      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    489      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    490      1.1  christos   int cycles = 0;
    491      1.1  christos   {
    492      1.1  christos     int referenced = 0;
    493      1.1  christos     int UNUSED insn_referenced = abuf->written;
    494      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    495      1.1  christos   }
    496      1.1  christos   return cycles;
    497      1.1  christos #undef FLD
    498      1.1  christos }
    499      1.1  christos 
    500      1.1  christos static int
    501      1.1  christos model_iq2000_bbin (SIM_CPU *current_cpu, void *sem_arg)
    502      1.1  christos {
    503      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    504      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    505      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    506      1.1  christos   int cycles = 0;
    507      1.1  christos   {
    508      1.1  christos     int referenced = 0;
    509      1.1  christos     int UNUSED insn_referenced = abuf->written;
    510      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    511      1.1  christos   }
    512      1.1  christos   return cycles;
    513      1.1  christos #undef FLD
    514      1.1  christos }
    515      1.1  christos 
    516      1.1  christos static int
    517      1.1  christos model_iq2000_bbv (SIM_CPU *current_cpu, void *sem_arg)
    518      1.1  christos {
    519      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    520      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    521      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    522      1.1  christos   int cycles = 0;
    523      1.1  christos   {
    524      1.1  christos     int referenced = 0;
    525      1.1  christos     int UNUSED insn_referenced = abuf->written;
    526      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    527      1.1  christos   }
    528      1.1  christos   return cycles;
    529      1.1  christos #undef FLD
    530      1.1  christos }
    531      1.1  christos 
    532      1.1  christos static int
    533      1.1  christos model_iq2000_bbvn (SIM_CPU *current_cpu, void *sem_arg)
    534      1.1  christos {
    535      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    536      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    537      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    538      1.1  christos   int cycles = 0;
    539      1.1  christos   {
    540      1.1  christos     int referenced = 0;
    541      1.1  christos     int UNUSED insn_referenced = abuf->written;
    542      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    543      1.1  christos   }
    544      1.1  christos   return cycles;
    545      1.1  christos #undef FLD
    546      1.1  christos }
    547      1.1  christos 
    548      1.1  christos static int
    549      1.1  christos model_iq2000_beq (SIM_CPU *current_cpu, void *sem_arg)
    550      1.1  christos {
    551      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    552      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    553      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    554      1.1  christos   int cycles = 0;
    555      1.1  christos   {
    556      1.1  christos     int referenced = 0;
    557      1.1  christos     int UNUSED insn_referenced = abuf->written;
    558      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    559      1.1  christos   }
    560      1.1  christos   return cycles;
    561      1.1  christos #undef FLD
    562      1.1  christos }
    563      1.1  christos 
    564      1.1  christos static int
    565      1.1  christos model_iq2000_beql (SIM_CPU *current_cpu, void *sem_arg)
    566      1.1  christos {
    567      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    568      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    569      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    570      1.1  christos   int cycles = 0;
    571      1.1  christos   {
    572      1.1  christos     int referenced = 0;
    573      1.1  christos     int UNUSED insn_referenced = abuf->written;
    574      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    575      1.1  christos   }
    576      1.1  christos   return cycles;
    577      1.1  christos #undef FLD
    578      1.1  christos }
    579      1.1  christos 
    580      1.1  christos static int
    581      1.1  christos model_iq2000_bgez (SIM_CPU *current_cpu, void *sem_arg)
    582      1.1  christos {
    583      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    584      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    585      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    586      1.1  christos   int cycles = 0;
    587      1.1  christos   {
    588      1.1  christos     int referenced = 0;
    589      1.1  christos     int UNUSED insn_referenced = abuf->written;
    590      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    591      1.1  christos   }
    592      1.1  christos   return cycles;
    593      1.1  christos #undef FLD
    594      1.1  christos }
    595      1.1  christos 
    596      1.1  christos static int
    597      1.1  christos model_iq2000_bgezal (SIM_CPU *current_cpu, void *sem_arg)
    598      1.1  christos {
    599      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    600      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    601      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    602      1.1  christos   int cycles = 0;
    603      1.1  christos   {
    604      1.1  christos     int referenced = 0;
    605      1.1  christos     int UNUSED insn_referenced = abuf->written;
    606      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    607      1.1  christos   }
    608      1.1  christos   return cycles;
    609      1.1  christos #undef FLD
    610      1.1  christos }
    611      1.1  christos 
    612      1.1  christos static int
    613      1.1  christos model_iq2000_bgezall (SIM_CPU *current_cpu, void *sem_arg)
    614      1.1  christos {
    615      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    616      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    617      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    618      1.1  christos   int cycles = 0;
    619      1.1  christos   {
    620      1.1  christos     int referenced = 0;
    621      1.1  christos     int UNUSED insn_referenced = abuf->written;
    622      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    623      1.1  christos   }
    624      1.1  christos   return cycles;
    625      1.1  christos #undef FLD
    626      1.1  christos }
    627      1.1  christos 
    628      1.1  christos static int
    629      1.1  christos model_iq2000_bgezl (SIM_CPU *current_cpu, void *sem_arg)
    630      1.1  christos {
    631      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    632      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    633      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    634      1.1  christos   int cycles = 0;
    635      1.1  christos   {
    636      1.1  christos     int referenced = 0;
    637      1.1  christos     int UNUSED insn_referenced = abuf->written;
    638      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    639      1.1  christos   }
    640      1.1  christos   return cycles;
    641      1.1  christos #undef FLD
    642      1.1  christos }
    643      1.1  christos 
    644      1.1  christos static int
    645      1.1  christos model_iq2000_bltz (SIM_CPU *current_cpu, void *sem_arg)
    646      1.1  christos {
    647      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    648      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    649      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    650      1.1  christos   int cycles = 0;
    651      1.1  christos   {
    652      1.1  christos     int referenced = 0;
    653      1.1  christos     int UNUSED insn_referenced = abuf->written;
    654      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    655      1.1  christos   }
    656      1.1  christos   return cycles;
    657      1.1  christos #undef FLD
    658      1.1  christos }
    659      1.1  christos 
    660      1.1  christos static int
    661      1.1  christos model_iq2000_bltzl (SIM_CPU *current_cpu, void *sem_arg)
    662      1.1  christos {
    663      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    664      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    665      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    666      1.1  christos   int cycles = 0;
    667      1.1  christos   {
    668      1.1  christos     int referenced = 0;
    669      1.1  christos     int UNUSED insn_referenced = abuf->written;
    670      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    671      1.1  christos   }
    672      1.1  christos   return cycles;
    673      1.1  christos #undef FLD
    674      1.1  christos }
    675      1.1  christos 
    676      1.1  christos static int
    677      1.1  christos model_iq2000_bltzal (SIM_CPU *current_cpu, void *sem_arg)
    678      1.1  christos {
    679      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    680      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    681      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    682      1.1  christos   int cycles = 0;
    683      1.1  christos   {
    684      1.1  christos     int referenced = 0;
    685      1.1  christos     int UNUSED insn_referenced = abuf->written;
    686      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    687      1.1  christos   }
    688      1.1  christos   return cycles;
    689      1.1  christos #undef FLD
    690      1.1  christos }
    691      1.1  christos 
    692      1.1  christos static int
    693      1.1  christos model_iq2000_bltzall (SIM_CPU *current_cpu, void *sem_arg)
    694      1.1  christos {
    695      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    696      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    697      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    698      1.1  christos   int cycles = 0;
    699      1.1  christos   {
    700      1.1  christos     int referenced = 0;
    701      1.1  christos     int UNUSED insn_referenced = abuf->written;
    702      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    703      1.1  christos   }
    704      1.1  christos   return cycles;
    705      1.1  christos #undef FLD
    706      1.1  christos }
    707      1.1  christos 
    708      1.1  christos static int
    709      1.1  christos model_iq2000_bmb0 (SIM_CPU *current_cpu, void *sem_arg)
    710      1.1  christos {
    711      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    712      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    713      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    714      1.1  christos   int cycles = 0;
    715      1.1  christos   {
    716      1.1  christos     int referenced = 0;
    717      1.1  christos     int UNUSED insn_referenced = abuf->written;
    718      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    719      1.1  christos   }
    720      1.1  christos   return cycles;
    721      1.1  christos #undef FLD
    722      1.1  christos }
    723      1.1  christos 
    724      1.1  christos static int
    725      1.1  christos model_iq2000_bmb1 (SIM_CPU *current_cpu, void *sem_arg)
    726      1.1  christos {
    727      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    728      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    729      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    730      1.1  christos   int cycles = 0;
    731      1.1  christos   {
    732      1.1  christos     int referenced = 0;
    733      1.1  christos     int UNUSED insn_referenced = abuf->written;
    734      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    735      1.1  christos   }
    736      1.1  christos   return cycles;
    737      1.1  christos #undef FLD
    738      1.1  christos }
    739      1.1  christos 
    740      1.1  christos static int
    741      1.1  christos model_iq2000_bmb2 (SIM_CPU *current_cpu, void *sem_arg)
    742      1.1  christos {
    743      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    744      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    745      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    746      1.1  christos   int cycles = 0;
    747      1.1  christos   {
    748      1.1  christos     int referenced = 0;
    749      1.1  christos     int UNUSED insn_referenced = abuf->written;
    750      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    751      1.1  christos   }
    752      1.1  christos   return cycles;
    753      1.1  christos #undef FLD
    754      1.1  christos }
    755      1.1  christos 
    756      1.1  christos static int
    757      1.1  christos model_iq2000_bmb3 (SIM_CPU *current_cpu, void *sem_arg)
    758      1.1  christos {
    759      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    760      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    761      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    762      1.1  christos   int cycles = 0;
    763      1.1  christos   {
    764      1.1  christos     int referenced = 0;
    765      1.1  christos     int UNUSED insn_referenced = abuf->written;
    766      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    767      1.1  christos   }
    768      1.1  christos   return cycles;
    769      1.1  christos #undef FLD
    770      1.1  christos }
    771      1.1  christos 
    772      1.1  christos static int
    773      1.1  christos model_iq2000_bne (SIM_CPU *current_cpu, void *sem_arg)
    774      1.1  christos {
    775      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    776      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    777      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    778      1.1  christos   int cycles = 0;
    779      1.1  christos   {
    780      1.1  christos     int referenced = 0;
    781      1.1  christos     int UNUSED insn_referenced = abuf->written;
    782      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    783      1.1  christos   }
    784      1.1  christos   return cycles;
    785      1.1  christos #undef FLD
    786      1.1  christos }
    787      1.1  christos 
    788      1.1  christos static int
    789      1.1  christos model_iq2000_bnel (SIM_CPU *current_cpu, void *sem_arg)
    790      1.1  christos {
    791      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    792      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    793      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    794      1.1  christos   int cycles = 0;
    795      1.1  christos   {
    796      1.1  christos     int referenced = 0;
    797      1.1  christos     int UNUSED insn_referenced = abuf->written;
    798      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    799      1.1  christos   }
    800      1.1  christos   return cycles;
    801      1.1  christos #undef FLD
    802      1.1  christos }
    803      1.1  christos 
    804      1.1  christos static int
    805      1.1  christos model_iq2000_jalr (SIM_CPU *current_cpu, void *sem_arg)
    806      1.1  christos {
    807      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
    808      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    809      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    810      1.1  christos   int cycles = 0;
    811      1.1  christos   {
    812      1.1  christos     int referenced = 0;
    813      1.1  christos     int UNUSED insn_referenced = abuf->written;
    814      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    815      1.1  christos   }
    816      1.1  christos   return cycles;
    817      1.1  christos #undef FLD
    818      1.1  christos }
    819      1.1  christos 
    820      1.1  christos static int
    821      1.1  christos model_iq2000_jr (SIM_CPU *current_cpu, void *sem_arg)
    822      1.1  christos {
    823      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
    824      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    825      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    826      1.1  christos   int cycles = 0;
    827      1.1  christos   {
    828      1.1  christos     int referenced = 0;
    829      1.1  christos     int UNUSED insn_referenced = abuf->written;
    830      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    831      1.1  christos   }
    832      1.1  christos   return cycles;
    833      1.1  christos #undef FLD
    834      1.1  christos }
    835      1.1  christos 
    836      1.1  christos static int
    837      1.1  christos model_iq2000_lb (SIM_CPU *current_cpu, void *sem_arg)
    838      1.1  christos {
    839      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    840      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    841      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    842      1.1  christos   int cycles = 0;
    843      1.1  christos   {
    844      1.1  christos     int referenced = 0;
    845      1.1  christos     int UNUSED insn_referenced = abuf->written;
    846      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    847      1.1  christos   }
    848      1.1  christos   return cycles;
    849      1.1  christos #undef FLD
    850      1.1  christos }
    851      1.1  christos 
    852      1.1  christos static int
    853      1.1  christos model_iq2000_lbu (SIM_CPU *current_cpu, void *sem_arg)
    854      1.1  christos {
    855      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    856      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    857      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    858      1.1  christos   int cycles = 0;
    859      1.1  christos   {
    860      1.1  christos     int referenced = 0;
    861      1.1  christos     int UNUSED insn_referenced = abuf->written;
    862      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    863      1.1  christos   }
    864      1.1  christos   return cycles;
    865      1.1  christos #undef FLD
    866      1.1  christos }
    867      1.1  christos 
    868      1.1  christos static int
    869      1.1  christos model_iq2000_lh (SIM_CPU *current_cpu, void *sem_arg)
    870      1.1  christos {
    871      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    872      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    873      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    874      1.1  christos   int cycles = 0;
    875      1.1  christos   {
    876      1.1  christos     int referenced = 0;
    877      1.1  christos     int UNUSED insn_referenced = abuf->written;
    878      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    879      1.1  christos   }
    880      1.1  christos   return cycles;
    881      1.1  christos #undef FLD
    882      1.1  christos }
    883      1.1  christos 
    884      1.1  christos static int
    885      1.1  christos model_iq2000_lhu (SIM_CPU *current_cpu, void *sem_arg)
    886      1.1  christos {
    887      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    888      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    889      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    890      1.1  christos   int cycles = 0;
    891      1.1  christos   {
    892      1.1  christos     int referenced = 0;
    893      1.1  christos     int UNUSED insn_referenced = abuf->written;
    894      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    895      1.1  christos   }
    896      1.1  christos   return cycles;
    897      1.1  christos #undef FLD
    898      1.1  christos }
    899      1.1  christos 
    900      1.1  christos static int
    901      1.1  christos model_iq2000_lui (SIM_CPU *current_cpu, void *sem_arg)
    902      1.1  christos {
    903      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    904      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    905      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    906      1.1  christos   int cycles = 0;
    907      1.1  christos   {
    908      1.1  christos     int referenced = 0;
    909      1.1  christos     int UNUSED insn_referenced = abuf->written;
    910      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    911      1.1  christos   }
    912      1.1  christos   return cycles;
    913      1.1  christos #undef FLD
    914      1.1  christos }
    915      1.1  christos 
    916      1.1  christos static int
    917      1.1  christos model_iq2000_lw (SIM_CPU *current_cpu, void *sem_arg)
    918      1.1  christos {
    919      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    920      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    921      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    922      1.1  christos   int cycles = 0;
    923      1.1  christos   {
    924      1.1  christos     int referenced = 0;
    925      1.1  christos     int UNUSED insn_referenced = abuf->written;
    926      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    927      1.1  christos   }
    928      1.1  christos   return cycles;
    929      1.1  christos #undef FLD
    930      1.1  christos }
    931      1.1  christos 
    932      1.1  christos static int
    933      1.1  christos model_iq2000_sb (SIM_CPU *current_cpu, void *sem_arg)
    934      1.1  christos {
    935      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    936      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    937      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    938      1.1  christos   int cycles = 0;
    939      1.1  christos   {
    940      1.1  christos     int referenced = 0;
    941      1.1  christos     int UNUSED insn_referenced = abuf->written;
    942      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    943      1.1  christos   }
    944      1.1  christos   return cycles;
    945      1.1  christos #undef FLD
    946      1.1  christos }
    947      1.1  christos 
    948      1.1  christos static int
    949      1.1  christos model_iq2000_sh (SIM_CPU *current_cpu, void *sem_arg)
    950      1.1  christos {
    951      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    952      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    953      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    954      1.1  christos   int cycles = 0;
    955      1.1  christos   {
    956      1.1  christos     int referenced = 0;
    957      1.1  christos     int UNUSED insn_referenced = abuf->written;
    958      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    959      1.1  christos   }
    960      1.1  christos   return cycles;
    961      1.1  christos #undef FLD
    962      1.1  christos }
    963      1.1  christos 
    964      1.1  christos static int
    965      1.1  christos model_iq2000_sw (SIM_CPU *current_cpu, void *sem_arg)
    966      1.1  christos {
    967      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
    968      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    969      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    970      1.1  christos   int cycles = 0;
    971      1.1  christos   {
    972      1.1  christos     int referenced = 0;
    973      1.1  christos     int UNUSED insn_referenced = abuf->written;
    974      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    975      1.1  christos   }
    976      1.1  christos   return cycles;
    977      1.1  christos #undef FLD
    978      1.1  christos }
    979      1.1  christos 
    980      1.1  christos static int
    981      1.1  christos model_iq2000_break (SIM_CPU *current_cpu, void *sem_arg)
    982      1.1  christos {
    983      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
    984      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
    985      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
    986      1.1  christos   int cycles = 0;
    987      1.1  christos   {
    988      1.1  christos     int referenced = 0;
    989      1.1  christos     int UNUSED insn_referenced = abuf->written;
    990      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
    991      1.1  christos   }
    992      1.1  christos   return cycles;
    993      1.1  christos #undef FLD
    994      1.1  christos }
    995      1.1  christos 
    996      1.1  christos static int
    997      1.1  christos model_iq2000_syscall (SIM_CPU *current_cpu, void *sem_arg)
    998      1.1  christos {
    999      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1000      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1001      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1002      1.1  christos   int cycles = 0;
   1003      1.1  christos   {
   1004      1.1  christos     int referenced = 0;
   1005      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1006      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1007      1.1  christos   }
   1008      1.1  christos   return cycles;
   1009      1.1  christos #undef FLD
   1010      1.1  christos }
   1011      1.1  christos 
   1012      1.1  christos static int
   1013      1.1  christos model_iq2000_andoui (SIM_CPU *current_cpu, void *sem_arg)
   1014      1.1  christos {
   1015      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
   1016      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1017      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1018      1.1  christos   int cycles = 0;
   1019      1.1  christos   {
   1020      1.1  christos     int referenced = 0;
   1021      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1022      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1023      1.1  christos   }
   1024      1.1  christos   return cycles;
   1025      1.1  christos #undef FLD
   1026      1.1  christos }
   1027      1.1  christos 
   1028      1.1  christos static int
   1029      1.1  christos model_iq2000_orui (SIM_CPU *current_cpu, void *sem_arg)
   1030      1.1  christos {
   1031      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
   1032      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1033      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1034      1.1  christos   int cycles = 0;
   1035      1.1  christos   {
   1036      1.1  christos     int referenced = 0;
   1037      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1038      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1039      1.1  christos   }
   1040      1.1  christos   return cycles;
   1041      1.1  christos #undef FLD
   1042      1.1  christos }
   1043      1.1  christos 
   1044      1.1  christos static int
   1045      1.1  christos model_iq2000_bgtz (SIM_CPU *current_cpu, void *sem_arg)
   1046      1.1  christos {
   1047      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
   1048      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1049      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1050      1.1  christos   int cycles = 0;
   1051      1.1  christos   {
   1052      1.1  christos     int referenced = 0;
   1053      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1054      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1055      1.1  christos   }
   1056      1.1  christos   return cycles;
   1057      1.1  christos #undef FLD
   1058      1.1  christos }
   1059      1.1  christos 
   1060      1.1  christos static int
   1061      1.1  christos model_iq2000_bgtzl (SIM_CPU *current_cpu, void *sem_arg)
   1062      1.1  christos {
   1063      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
   1064      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1065      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1066      1.1  christos   int cycles = 0;
   1067      1.1  christos   {
   1068      1.1  christos     int referenced = 0;
   1069      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1070      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1071      1.1  christos   }
   1072      1.1  christos   return cycles;
   1073      1.1  christos #undef FLD
   1074      1.1  christos }
   1075      1.1  christos 
   1076      1.1  christos static int
   1077      1.1  christos model_iq2000_blez (SIM_CPU *current_cpu, void *sem_arg)
   1078      1.1  christos {
   1079      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
   1080      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1081      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1082      1.1  christos   int cycles = 0;
   1083      1.1  christos   {
   1084      1.1  christos     int referenced = 0;
   1085      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1086      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1087      1.1  christos   }
   1088      1.1  christos   return cycles;
   1089      1.1  christos #undef FLD
   1090      1.1  christos }
   1091      1.1  christos 
   1092      1.1  christos static int
   1093      1.1  christos model_iq2000_blezl (SIM_CPU *current_cpu, void *sem_arg)
   1094      1.1  christos {
   1095      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
   1096      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1097      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1098      1.1  christos   int cycles = 0;
   1099      1.1  christos   {
   1100      1.1  christos     int referenced = 0;
   1101      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1102      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1103      1.1  christos   }
   1104      1.1  christos   return cycles;
   1105      1.1  christos #undef FLD
   1106      1.1  christos }
   1107      1.1  christos 
   1108      1.1  christos static int
   1109      1.1  christos model_iq2000_mrgb (SIM_CPU *current_cpu, void *sem_arg)
   1110      1.1  christos {
   1111      1.1  christos #define FLD(f) abuf->fields.sfmt_mrgb.f
   1112      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1113      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1114      1.1  christos   int cycles = 0;
   1115      1.1  christos   {
   1116      1.1  christos     int referenced = 0;
   1117      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1118      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1119      1.1  christos   }
   1120      1.1  christos   return cycles;
   1121      1.1  christos #undef FLD
   1122      1.1  christos }
   1123      1.1  christos 
   1124      1.1  christos static int
   1125      1.1  christos model_iq2000_bctxt (SIM_CPU *current_cpu, void *sem_arg)
   1126      1.1  christos {
   1127      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1128      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1129      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1130      1.1  christos   int cycles = 0;
   1131      1.1  christos   {
   1132      1.1  christos     int referenced = 0;
   1133      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1134      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1135      1.1  christos   }
   1136      1.1  christos   return cycles;
   1137      1.1  christos #undef FLD
   1138      1.1  christos }
   1139      1.1  christos 
   1140      1.1  christos static int
   1141      1.1  christos model_iq2000_bc0f (SIM_CPU *current_cpu, void *sem_arg)
   1142      1.1  christos {
   1143      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1144      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1145      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1146      1.1  christos   int cycles = 0;
   1147      1.1  christos   {
   1148      1.1  christos     int referenced = 0;
   1149      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1150      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1151      1.1  christos   }
   1152      1.1  christos   return cycles;
   1153      1.1  christos #undef FLD
   1154      1.1  christos }
   1155      1.1  christos 
   1156      1.1  christos static int
   1157      1.1  christos model_iq2000_bc0fl (SIM_CPU *current_cpu, void *sem_arg)
   1158      1.1  christos {
   1159      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1160      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1161      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1162      1.1  christos   int cycles = 0;
   1163      1.1  christos   {
   1164      1.1  christos     int referenced = 0;
   1165      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1166      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1167      1.1  christos   }
   1168      1.1  christos   return cycles;
   1169      1.1  christos #undef FLD
   1170      1.1  christos }
   1171      1.1  christos 
   1172      1.1  christos static int
   1173      1.1  christos model_iq2000_bc3f (SIM_CPU *current_cpu, void *sem_arg)
   1174      1.1  christos {
   1175      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1176      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1177      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1178      1.1  christos   int cycles = 0;
   1179      1.1  christos   {
   1180      1.1  christos     int referenced = 0;
   1181      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1182      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1183      1.1  christos   }
   1184      1.1  christos   return cycles;
   1185      1.1  christos #undef FLD
   1186      1.1  christos }
   1187      1.1  christos 
   1188      1.1  christos static int
   1189      1.1  christos model_iq2000_bc3fl (SIM_CPU *current_cpu, void *sem_arg)
   1190      1.1  christos {
   1191      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1192      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1193      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1194      1.1  christos   int cycles = 0;
   1195      1.1  christos   {
   1196      1.1  christos     int referenced = 0;
   1197      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1198      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1199      1.1  christos   }
   1200      1.1  christos   return cycles;
   1201      1.1  christos #undef FLD
   1202      1.1  christos }
   1203      1.1  christos 
   1204      1.1  christos static int
   1205      1.1  christos model_iq2000_bc0t (SIM_CPU *current_cpu, void *sem_arg)
   1206      1.1  christos {
   1207      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1208      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1209      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1210      1.1  christos   int cycles = 0;
   1211      1.1  christos   {
   1212      1.1  christos     int referenced = 0;
   1213      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1214      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1215      1.1  christos   }
   1216      1.1  christos   return cycles;
   1217      1.1  christos #undef FLD
   1218      1.1  christos }
   1219      1.1  christos 
   1220      1.1  christos static int
   1221      1.1  christos model_iq2000_bc0tl (SIM_CPU *current_cpu, void *sem_arg)
   1222      1.1  christos {
   1223      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1224      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1225      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1226      1.1  christos   int cycles = 0;
   1227      1.1  christos   {
   1228      1.1  christos     int referenced = 0;
   1229      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1230      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1231      1.1  christos   }
   1232      1.1  christos   return cycles;
   1233      1.1  christos #undef FLD
   1234      1.1  christos }
   1235      1.1  christos 
   1236      1.1  christos static int
   1237      1.1  christos model_iq2000_bc3t (SIM_CPU *current_cpu, void *sem_arg)
   1238      1.1  christos {
   1239      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1240      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1241      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1242      1.1  christos   int cycles = 0;
   1243      1.1  christos   {
   1244      1.1  christos     int referenced = 0;
   1245      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1246      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1247      1.1  christos   }
   1248      1.1  christos   return cycles;
   1249      1.1  christos #undef FLD
   1250      1.1  christos }
   1251      1.1  christos 
   1252      1.1  christos static int
   1253      1.1  christos model_iq2000_bc3tl (SIM_CPU *current_cpu, void *sem_arg)
   1254      1.1  christos {
   1255      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1256      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1257      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1258      1.1  christos   int cycles = 0;
   1259      1.1  christos   {
   1260      1.1  christos     int referenced = 0;
   1261      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1262      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1263      1.1  christos   }
   1264      1.1  christos   return cycles;
   1265      1.1  christos #undef FLD
   1266      1.1  christos }
   1267      1.1  christos 
   1268      1.1  christos static int
   1269      1.1  christos model_iq2000_cfc0 (SIM_CPU *current_cpu, void *sem_arg)
   1270      1.1  christos {
   1271      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1272      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1273      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1274      1.1  christos   int cycles = 0;
   1275      1.1  christos   {
   1276      1.1  christos     int referenced = 0;
   1277      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1278      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1279      1.1  christos   }
   1280      1.1  christos   return cycles;
   1281      1.1  christos #undef FLD
   1282      1.1  christos }
   1283      1.1  christos 
   1284      1.1  christos static int
   1285      1.1  christos model_iq2000_cfc1 (SIM_CPU *current_cpu, void *sem_arg)
   1286      1.1  christos {
   1287      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1288      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1289      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1290      1.1  christos   int cycles = 0;
   1291      1.1  christos   {
   1292      1.1  christos     int referenced = 0;
   1293      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1294      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1295      1.1  christos   }
   1296      1.1  christos   return cycles;
   1297      1.1  christos #undef FLD
   1298      1.1  christos }
   1299      1.1  christos 
   1300      1.1  christos static int
   1301      1.1  christos model_iq2000_cfc2 (SIM_CPU *current_cpu, void *sem_arg)
   1302      1.1  christos {
   1303      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1304      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1305      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1306      1.1  christos   int cycles = 0;
   1307      1.1  christos   {
   1308      1.1  christos     int referenced = 0;
   1309      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1310      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1311      1.1  christos   }
   1312      1.1  christos   return cycles;
   1313      1.1  christos #undef FLD
   1314      1.1  christos }
   1315      1.1  christos 
   1316      1.1  christos static int
   1317      1.1  christos model_iq2000_cfc3 (SIM_CPU *current_cpu, void *sem_arg)
   1318      1.1  christos {
   1319      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1320      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1321      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1322      1.1  christos   int cycles = 0;
   1323      1.1  christos   {
   1324      1.1  christos     int referenced = 0;
   1325      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1326      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1327      1.1  christos   }
   1328      1.1  christos   return cycles;
   1329      1.1  christos #undef FLD
   1330      1.1  christos }
   1331      1.1  christos 
   1332      1.1  christos static int
   1333      1.1  christos model_iq2000_chkhdr (SIM_CPU *current_cpu, void *sem_arg)
   1334      1.1  christos {
   1335      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1336      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1337      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1338      1.1  christos   int cycles = 0;
   1339      1.1  christos   {
   1340      1.1  christos     int referenced = 0;
   1341      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1342      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1343      1.1  christos   }
   1344      1.1  christos   return cycles;
   1345      1.1  christos #undef FLD
   1346      1.1  christos }
   1347      1.1  christos 
   1348      1.1  christos static int
   1349      1.1  christos model_iq2000_ctc0 (SIM_CPU *current_cpu, void *sem_arg)
   1350      1.1  christos {
   1351      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1352      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1353      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1354      1.1  christos   int cycles = 0;
   1355      1.1  christos   {
   1356      1.1  christos     int referenced = 0;
   1357      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1358      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1359      1.1  christos   }
   1360      1.1  christos   return cycles;
   1361      1.1  christos #undef FLD
   1362      1.1  christos }
   1363      1.1  christos 
   1364      1.1  christos static int
   1365      1.1  christos model_iq2000_ctc1 (SIM_CPU *current_cpu, void *sem_arg)
   1366      1.1  christos {
   1367      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1368      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1369      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1370      1.1  christos   int cycles = 0;
   1371      1.1  christos   {
   1372      1.1  christos     int referenced = 0;
   1373      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1374      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1375      1.1  christos   }
   1376      1.1  christos   return cycles;
   1377      1.1  christos #undef FLD
   1378      1.1  christos }
   1379      1.1  christos 
   1380      1.1  christos static int
   1381      1.1  christos model_iq2000_ctc2 (SIM_CPU *current_cpu, void *sem_arg)
   1382      1.1  christos {
   1383      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1384      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1385      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1386      1.1  christos   int cycles = 0;
   1387      1.1  christos   {
   1388      1.1  christos     int referenced = 0;
   1389      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1390      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1391      1.1  christos   }
   1392      1.1  christos   return cycles;
   1393      1.1  christos #undef FLD
   1394      1.1  christos }
   1395      1.1  christos 
   1396      1.1  christos static int
   1397      1.1  christos model_iq2000_ctc3 (SIM_CPU *current_cpu, void *sem_arg)
   1398      1.1  christos {
   1399      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1400      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1401      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1402      1.1  christos   int cycles = 0;
   1403      1.1  christos   {
   1404      1.1  christos     int referenced = 0;
   1405      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1406      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1407      1.1  christos   }
   1408      1.1  christos   return cycles;
   1409      1.1  christos #undef FLD
   1410      1.1  christos }
   1411      1.1  christos 
   1412      1.1  christos static int
   1413      1.1  christos model_iq2000_jcr (SIM_CPU *current_cpu, void *sem_arg)
   1414      1.1  christos {
   1415      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1416      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1417      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1418      1.1  christos   int cycles = 0;
   1419      1.1  christos   {
   1420      1.1  christos     int referenced = 0;
   1421      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1422      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1423      1.1  christos   }
   1424      1.1  christos   return cycles;
   1425      1.1  christos #undef FLD
   1426      1.1  christos }
   1427      1.1  christos 
   1428      1.1  christos static int
   1429      1.1  christos model_iq2000_luc32 (SIM_CPU *current_cpu, void *sem_arg)
   1430      1.1  christos {
   1431      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1432      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1433      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1434      1.1  christos   int cycles = 0;
   1435      1.1  christos   {
   1436      1.1  christos     int referenced = 0;
   1437      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1438      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1439      1.1  christos   }
   1440      1.1  christos   return cycles;
   1441      1.1  christos #undef FLD
   1442      1.1  christos }
   1443      1.1  christos 
   1444      1.1  christos static int
   1445      1.1  christos model_iq2000_luc32l (SIM_CPU *current_cpu, void *sem_arg)
   1446      1.1  christos {
   1447      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1448      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1449      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1450      1.1  christos   int cycles = 0;
   1451      1.1  christos   {
   1452      1.1  christos     int referenced = 0;
   1453      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1454      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1455      1.1  christos   }
   1456      1.1  christos   return cycles;
   1457      1.1  christos #undef FLD
   1458      1.1  christos }
   1459      1.1  christos 
   1460      1.1  christos static int
   1461      1.1  christos model_iq2000_luc64 (SIM_CPU *current_cpu, void *sem_arg)
   1462      1.1  christos {
   1463      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1464      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1465      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1466      1.1  christos   int cycles = 0;
   1467      1.1  christos   {
   1468      1.1  christos     int referenced = 0;
   1469      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1470      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1471      1.1  christos   }
   1472      1.1  christos   return cycles;
   1473      1.1  christos #undef FLD
   1474      1.1  christos }
   1475      1.1  christos 
   1476      1.1  christos static int
   1477      1.1  christos model_iq2000_luc64l (SIM_CPU *current_cpu, void *sem_arg)
   1478      1.1  christos {
   1479      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1480      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1481      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1482      1.1  christos   int cycles = 0;
   1483      1.1  christos   {
   1484      1.1  christos     int referenced = 0;
   1485      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1486      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1487      1.1  christos   }
   1488      1.1  christos   return cycles;
   1489      1.1  christos #undef FLD
   1490      1.1  christos }
   1491      1.1  christos 
   1492      1.1  christos static int
   1493      1.1  christos model_iq2000_luk (SIM_CPU *current_cpu, void *sem_arg)
   1494      1.1  christos {
   1495      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1496      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1497      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1498      1.1  christos   int cycles = 0;
   1499      1.1  christos   {
   1500      1.1  christos     int referenced = 0;
   1501      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1502      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1503      1.1  christos   }
   1504      1.1  christos   return cycles;
   1505      1.1  christos #undef FLD
   1506      1.1  christos }
   1507      1.1  christos 
   1508      1.1  christos static int
   1509      1.1  christos model_iq2000_lulck (SIM_CPU *current_cpu, void *sem_arg)
   1510      1.1  christos {
   1511      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1512      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1513      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1514      1.1  christos   int cycles = 0;
   1515      1.1  christos   {
   1516      1.1  christos     int referenced = 0;
   1517      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1518      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1519      1.1  christos   }
   1520      1.1  christos   return cycles;
   1521      1.1  christos #undef FLD
   1522      1.1  christos }
   1523      1.1  christos 
   1524      1.1  christos static int
   1525      1.1  christos model_iq2000_lum32 (SIM_CPU *current_cpu, void *sem_arg)
   1526      1.1  christos {
   1527      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1528      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1529      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1530      1.1  christos   int cycles = 0;
   1531      1.1  christos   {
   1532      1.1  christos     int referenced = 0;
   1533      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1534      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1535      1.1  christos   }
   1536      1.1  christos   return cycles;
   1537      1.1  christos #undef FLD
   1538      1.1  christos }
   1539      1.1  christos 
   1540      1.1  christos static int
   1541      1.1  christos model_iq2000_lum32l (SIM_CPU *current_cpu, void *sem_arg)
   1542      1.1  christos {
   1543      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1544      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1545      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1546      1.1  christos   int cycles = 0;
   1547      1.1  christos   {
   1548      1.1  christos     int referenced = 0;
   1549      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1550      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1551      1.1  christos   }
   1552      1.1  christos   return cycles;
   1553      1.1  christos #undef FLD
   1554      1.1  christos }
   1555      1.1  christos 
   1556      1.1  christos static int
   1557      1.1  christos model_iq2000_lum64 (SIM_CPU *current_cpu, void *sem_arg)
   1558      1.1  christos {
   1559      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1560      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1561      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1562      1.1  christos   int cycles = 0;
   1563      1.1  christos   {
   1564      1.1  christos     int referenced = 0;
   1565      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1566      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1567      1.1  christos   }
   1568      1.1  christos   return cycles;
   1569      1.1  christos #undef FLD
   1570      1.1  christos }
   1571      1.1  christos 
   1572      1.1  christos static int
   1573      1.1  christos model_iq2000_lum64l (SIM_CPU *current_cpu, void *sem_arg)
   1574      1.1  christos {
   1575      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1576      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1577      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1578      1.1  christos   int cycles = 0;
   1579      1.1  christos   {
   1580      1.1  christos     int referenced = 0;
   1581      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1582      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1583      1.1  christos   }
   1584      1.1  christos   return cycles;
   1585      1.1  christos #undef FLD
   1586      1.1  christos }
   1587      1.1  christos 
   1588      1.1  christos static int
   1589      1.1  christos model_iq2000_lur (SIM_CPU *current_cpu, void *sem_arg)
   1590      1.1  christos {
   1591      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1592      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1593      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1594      1.1  christos   int cycles = 0;
   1595      1.1  christos   {
   1596      1.1  christos     int referenced = 0;
   1597      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1598      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1599      1.1  christos   }
   1600      1.1  christos   return cycles;
   1601      1.1  christos #undef FLD
   1602      1.1  christos }
   1603      1.1  christos 
   1604      1.1  christos static int
   1605      1.1  christos model_iq2000_lurl (SIM_CPU *current_cpu, void *sem_arg)
   1606      1.1  christos {
   1607      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1608      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1609      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1610      1.1  christos   int cycles = 0;
   1611      1.1  christos   {
   1612      1.1  christos     int referenced = 0;
   1613      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1614      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1615      1.1  christos   }
   1616      1.1  christos   return cycles;
   1617      1.1  christos #undef FLD
   1618      1.1  christos }
   1619      1.1  christos 
   1620      1.1  christos static int
   1621      1.1  christos model_iq2000_luulck (SIM_CPU *current_cpu, void *sem_arg)
   1622      1.1  christos {
   1623      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1624      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1625      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1626      1.1  christos   int cycles = 0;
   1627      1.1  christos   {
   1628      1.1  christos     int referenced = 0;
   1629      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1630      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1631      1.1  christos   }
   1632      1.1  christos   return cycles;
   1633      1.1  christos #undef FLD
   1634      1.1  christos }
   1635      1.1  christos 
   1636      1.1  christos static int
   1637      1.1  christos model_iq2000_mfc0 (SIM_CPU *current_cpu, void *sem_arg)
   1638      1.1  christos {
   1639      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1640      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1641      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1642      1.1  christos   int cycles = 0;
   1643      1.1  christos   {
   1644      1.1  christos     int referenced = 0;
   1645      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1646      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1647      1.1  christos   }
   1648      1.1  christos   return cycles;
   1649      1.1  christos #undef FLD
   1650      1.1  christos }
   1651      1.1  christos 
   1652      1.1  christos static int
   1653      1.1  christos model_iq2000_mfc1 (SIM_CPU *current_cpu, void *sem_arg)
   1654      1.1  christos {
   1655      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1656      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1657      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1658      1.1  christos   int cycles = 0;
   1659      1.1  christos   {
   1660      1.1  christos     int referenced = 0;
   1661      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1662      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1663      1.1  christos   }
   1664      1.1  christos   return cycles;
   1665      1.1  christos #undef FLD
   1666      1.1  christos }
   1667      1.1  christos 
   1668      1.1  christos static int
   1669      1.1  christos model_iq2000_mfc2 (SIM_CPU *current_cpu, void *sem_arg)
   1670      1.1  christos {
   1671      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1672      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1673      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1674      1.1  christos   int cycles = 0;
   1675      1.1  christos   {
   1676      1.1  christos     int referenced = 0;
   1677      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1678      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1679      1.1  christos   }
   1680      1.1  christos   return cycles;
   1681      1.1  christos #undef FLD
   1682      1.1  christos }
   1683      1.1  christos 
   1684      1.1  christos static int
   1685      1.1  christos model_iq2000_mfc3 (SIM_CPU *current_cpu, void *sem_arg)
   1686      1.1  christos {
   1687      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1688      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1689      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1690      1.1  christos   int cycles = 0;
   1691      1.1  christos   {
   1692      1.1  christos     int referenced = 0;
   1693      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1694      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1695      1.1  christos   }
   1696      1.1  christos   return cycles;
   1697      1.1  christos #undef FLD
   1698      1.1  christos }
   1699      1.1  christos 
   1700      1.1  christos static int
   1701      1.1  christos model_iq2000_mtc0 (SIM_CPU *current_cpu, void *sem_arg)
   1702      1.1  christos {
   1703      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1704      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1705      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1706      1.1  christos   int cycles = 0;
   1707      1.1  christos   {
   1708      1.1  christos     int referenced = 0;
   1709      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1710      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1711      1.1  christos   }
   1712      1.1  christos   return cycles;
   1713      1.1  christos #undef FLD
   1714      1.1  christos }
   1715      1.1  christos 
   1716      1.1  christos static int
   1717      1.1  christos model_iq2000_mtc1 (SIM_CPU *current_cpu, void *sem_arg)
   1718      1.1  christos {
   1719      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1720      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1721      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1722      1.1  christos   int cycles = 0;
   1723      1.1  christos   {
   1724      1.1  christos     int referenced = 0;
   1725      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1726      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1727      1.1  christos   }
   1728      1.1  christos   return cycles;
   1729      1.1  christos #undef FLD
   1730      1.1  christos }
   1731      1.1  christos 
   1732      1.1  christos static int
   1733      1.1  christos model_iq2000_mtc2 (SIM_CPU *current_cpu, void *sem_arg)
   1734      1.1  christos {
   1735      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1736      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1737      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1738      1.1  christos   int cycles = 0;
   1739      1.1  christos   {
   1740      1.1  christos     int referenced = 0;
   1741      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1742      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1743      1.1  christos   }
   1744      1.1  christos   return cycles;
   1745      1.1  christos #undef FLD
   1746      1.1  christos }
   1747      1.1  christos 
   1748      1.1  christos static int
   1749      1.1  christos model_iq2000_mtc3 (SIM_CPU *current_cpu, void *sem_arg)
   1750      1.1  christos {
   1751      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1752      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1753      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1754      1.1  christos   int cycles = 0;
   1755      1.1  christos   {
   1756      1.1  christos     int referenced = 0;
   1757      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1758      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1759      1.1  christos   }
   1760      1.1  christos   return cycles;
   1761      1.1  christos #undef FLD
   1762      1.1  christos }
   1763      1.1  christos 
   1764      1.1  christos static int
   1765      1.1  christos model_iq2000_pkrl (SIM_CPU *current_cpu, void *sem_arg)
   1766      1.1  christos {
   1767      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1768      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1769      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1770      1.1  christos   int cycles = 0;
   1771      1.1  christos   {
   1772      1.1  christos     int referenced = 0;
   1773      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1774      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1775      1.1  christos   }
   1776      1.1  christos   return cycles;
   1777      1.1  christos #undef FLD
   1778      1.1  christos }
   1779      1.1  christos 
   1780      1.1  christos static int
   1781      1.1  christos model_iq2000_pkrlr1 (SIM_CPU *current_cpu, void *sem_arg)
   1782      1.1  christos {
   1783      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1784      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1785      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1786      1.1  christos   int cycles = 0;
   1787      1.1  christos   {
   1788      1.1  christos     int referenced = 0;
   1789      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1790      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1791      1.1  christos   }
   1792      1.1  christos   return cycles;
   1793      1.1  christos #undef FLD
   1794      1.1  christos }
   1795      1.1  christos 
   1796      1.1  christos static int
   1797      1.1  christos model_iq2000_pkrlr30 (SIM_CPU *current_cpu, void *sem_arg)
   1798      1.1  christos {
   1799      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1800      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1801      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1802      1.1  christos   int cycles = 0;
   1803      1.1  christos   {
   1804      1.1  christos     int referenced = 0;
   1805      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1806      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1807      1.1  christos   }
   1808      1.1  christos   return cycles;
   1809      1.1  christos #undef FLD
   1810      1.1  christos }
   1811      1.1  christos 
   1812      1.1  christos static int
   1813      1.1  christos model_iq2000_rb (SIM_CPU *current_cpu, void *sem_arg)
   1814      1.1  christos {
   1815      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1816      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1817      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1818      1.1  christos   int cycles = 0;
   1819      1.1  christos   {
   1820      1.1  christos     int referenced = 0;
   1821      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1822      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1823      1.1  christos   }
   1824      1.1  christos   return cycles;
   1825      1.1  christos #undef FLD
   1826      1.1  christos }
   1827      1.1  christos 
   1828      1.1  christos static int
   1829      1.1  christos model_iq2000_rbr1 (SIM_CPU *current_cpu, void *sem_arg)
   1830      1.1  christos {
   1831      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1832      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1833      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1834      1.1  christos   int cycles = 0;
   1835      1.1  christos   {
   1836      1.1  christos     int referenced = 0;
   1837      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1838      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1839      1.1  christos   }
   1840      1.1  christos   return cycles;
   1841      1.1  christos #undef FLD
   1842      1.1  christos }
   1843      1.1  christos 
   1844      1.1  christos static int
   1845      1.1  christos model_iq2000_rbr30 (SIM_CPU *current_cpu, void *sem_arg)
   1846      1.1  christos {
   1847      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1848      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1849      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1850      1.1  christos   int cycles = 0;
   1851      1.1  christos   {
   1852      1.1  christos     int referenced = 0;
   1853      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1854      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1855      1.1  christos   }
   1856      1.1  christos   return cycles;
   1857      1.1  christos #undef FLD
   1858      1.1  christos }
   1859      1.1  christos 
   1860      1.1  christos static int
   1861      1.1  christos model_iq2000_rfe (SIM_CPU *current_cpu, void *sem_arg)
   1862      1.1  christos {
   1863      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1864      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1865      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1866      1.1  christos   int cycles = 0;
   1867      1.1  christos   {
   1868      1.1  christos     int referenced = 0;
   1869      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1870      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1871      1.1  christos   }
   1872      1.1  christos   return cycles;
   1873      1.1  christos #undef FLD
   1874      1.1  christos }
   1875      1.1  christos 
   1876      1.1  christos static int
   1877      1.1  christos model_iq2000_rx (SIM_CPU *current_cpu, void *sem_arg)
   1878      1.1  christos {
   1879      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1880      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1881      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1882      1.1  christos   int cycles = 0;
   1883      1.1  christos   {
   1884      1.1  christos     int referenced = 0;
   1885      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1886      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1887      1.1  christos   }
   1888      1.1  christos   return cycles;
   1889      1.1  christos #undef FLD
   1890      1.1  christos }
   1891      1.1  christos 
   1892      1.1  christos static int
   1893      1.1  christos model_iq2000_rxr1 (SIM_CPU *current_cpu, void *sem_arg)
   1894      1.1  christos {
   1895      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1896      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1897      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1898      1.1  christos   int cycles = 0;
   1899      1.1  christos   {
   1900      1.1  christos     int referenced = 0;
   1901      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1902      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1903      1.1  christos   }
   1904      1.1  christos   return cycles;
   1905      1.1  christos #undef FLD
   1906      1.1  christos }
   1907      1.1  christos 
   1908      1.1  christos static int
   1909      1.1  christos model_iq2000_rxr30 (SIM_CPU *current_cpu, void *sem_arg)
   1910      1.1  christos {
   1911      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1912      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1913      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1914      1.1  christos   int cycles = 0;
   1915      1.1  christos   {
   1916      1.1  christos     int referenced = 0;
   1917      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1918      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1919      1.1  christos   }
   1920      1.1  christos   return cycles;
   1921      1.1  christos #undef FLD
   1922      1.1  christos }
   1923      1.1  christos 
   1924      1.1  christos static int
   1925      1.1  christos model_iq2000_sleep (SIM_CPU *current_cpu, void *sem_arg)
   1926      1.1  christos {
   1927      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1928      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1929      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1930      1.1  christos   int cycles = 0;
   1931      1.1  christos   {
   1932      1.1  christos     int referenced = 0;
   1933      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1934      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1935      1.1  christos   }
   1936      1.1  christos   return cycles;
   1937      1.1  christos #undef FLD
   1938      1.1  christos }
   1939      1.1  christos 
   1940      1.1  christos static int
   1941      1.1  christos model_iq2000_srrd (SIM_CPU *current_cpu, void *sem_arg)
   1942      1.1  christos {
   1943      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1944      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1945      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1946      1.1  christos   int cycles = 0;
   1947      1.1  christos   {
   1948      1.1  christos     int referenced = 0;
   1949      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1950      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1951      1.1  christos   }
   1952      1.1  christos   return cycles;
   1953      1.1  christos #undef FLD
   1954      1.1  christos }
   1955      1.1  christos 
   1956      1.1  christos static int
   1957      1.1  christos model_iq2000_srrdl (SIM_CPU *current_cpu, void *sem_arg)
   1958      1.1  christos {
   1959      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1960      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1961      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1962      1.1  christos   int cycles = 0;
   1963      1.1  christos   {
   1964      1.1  christos     int referenced = 0;
   1965      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1966      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1967      1.1  christos   }
   1968      1.1  christos   return cycles;
   1969      1.1  christos #undef FLD
   1970      1.1  christos }
   1971      1.1  christos 
   1972      1.1  christos static int
   1973      1.1  christos model_iq2000_srulck (SIM_CPU *current_cpu, void *sem_arg)
   1974      1.1  christos {
   1975      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1976      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1977      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1978      1.1  christos   int cycles = 0;
   1979      1.1  christos   {
   1980      1.1  christos     int referenced = 0;
   1981      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1982      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1983      1.1  christos   }
   1984      1.1  christos   return cycles;
   1985      1.1  christos #undef FLD
   1986      1.1  christos }
   1987      1.1  christos 
   1988      1.1  christos static int
   1989      1.1  christos model_iq2000_srwr (SIM_CPU *current_cpu, void *sem_arg)
   1990      1.1  christos {
   1991      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   1992      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   1993      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   1994      1.1  christos   int cycles = 0;
   1995      1.1  christos   {
   1996      1.1  christos     int referenced = 0;
   1997      1.1  christos     int UNUSED insn_referenced = abuf->written;
   1998      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   1999      1.1  christos   }
   2000      1.1  christos   return cycles;
   2001      1.1  christos #undef FLD
   2002      1.1  christos }
   2003      1.1  christos 
   2004      1.1  christos static int
   2005      1.1  christos model_iq2000_srwru (SIM_CPU *current_cpu, void *sem_arg)
   2006      1.1  christos {
   2007      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2008      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2009      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2010      1.1  christos   int cycles = 0;
   2011      1.1  christos   {
   2012      1.1  christos     int referenced = 0;
   2013      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2014      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2015      1.1  christos   }
   2016      1.1  christos   return cycles;
   2017      1.1  christos #undef FLD
   2018      1.1  christos }
   2019      1.1  christos 
   2020      1.1  christos static int
   2021      1.1  christos model_iq2000_trapqfl (SIM_CPU *current_cpu, void *sem_arg)
   2022      1.1  christos {
   2023      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2024      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2025      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2026      1.1  christos   int cycles = 0;
   2027      1.1  christos   {
   2028      1.1  christos     int referenced = 0;
   2029      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2030      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2031      1.1  christos   }
   2032      1.1  christos   return cycles;
   2033      1.1  christos #undef FLD
   2034      1.1  christos }
   2035      1.1  christos 
   2036      1.1  christos static int
   2037      1.1  christos model_iq2000_trapqne (SIM_CPU *current_cpu, void *sem_arg)
   2038      1.1  christos {
   2039      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2040      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2041      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2042      1.1  christos   int cycles = 0;
   2043      1.1  christos   {
   2044      1.1  christos     int referenced = 0;
   2045      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2046      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2047      1.1  christos   }
   2048      1.1  christos   return cycles;
   2049      1.1  christos #undef FLD
   2050      1.1  christos }
   2051      1.1  christos 
   2052      1.1  christos static int
   2053      1.1  christos model_iq2000_traprel (SIM_CPU *current_cpu, void *sem_arg)
   2054      1.1  christos {
   2055      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2056      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2057      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2058      1.1  christos   int cycles = 0;
   2059      1.1  christos   {
   2060      1.1  christos     int referenced = 0;
   2061      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2062      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2063      1.1  christos   }
   2064      1.1  christos   return cycles;
   2065      1.1  christos #undef FLD
   2066      1.1  christos }
   2067      1.1  christos 
   2068      1.1  christos static int
   2069      1.1  christos model_iq2000_wb (SIM_CPU *current_cpu, void *sem_arg)
   2070      1.1  christos {
   2071      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2072      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2073      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2074      1.1  christos   int cycles = 0;
   2075      1.1  christos   {
   2076      1.1  christos     int referenced = 0;
   2077      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2078      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2079      1.1  christos   }
   2080      1.1  christos   return cycles;
   2081      1.1  christos #undef FLD
   2082      1.1  christos }
   2083      1.1  christos 
   2084      1.1  christos static int
   2085      1.1  christos model_iq2000_wbu (SIM_CPU *current_cpu, void *sem_arg)
   2086      1.1  christos {
   2087      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2088      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2089      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2090      1.1  christos   int cycles = 0;
   2091      1.1  christos   {
   2092      1.1  christos     int referenced = 0;
   2093      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2094      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2095      1.1  christos   }
   2096      1.1  christos   return cycles;
   2097      1.1  christos #undef FLD
   2098      1.1  christos }
   2099      1.1  christos 
   2100      1.1  christos static int
   2101      1.1  christos model_iq2000_wbr1 (SIM_CPU *current_cpu, void *sem_arg)
   2102      1.1  christos {
   2103      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2104      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2105      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2106      1.1  christos   int cycles = 0;
   2107      1.1  christos   {
   2108      1.1  christos     int referenced = 0;
   2109      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2110      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2111      1.1  christos   }
   2112      1.1  christos   return cycles;
   2113      1.1  christos #undef FLD
   2114      1.1  christos }
   2115      1.1  christos 
   2116      1.1  christos static int
   2117      1.1  christos model_iq2000_wbr1u (SIM_CPU *current_cpu, void *sem_arg)
   2118      1.1  christos {
   2119      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2120      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2121      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2122      1.1  christos   int cycles = 0;
   2123      1.1  christos   {
   2124      1.1  christos     int referenced = 0;
   2125      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2126      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2127      1.1  christos   }
   2128      1.1  christos   return cycles;
   2129      1.1  christos #undef FLD
   2130      1.1  christos }
   2131      1.1  christos 
   2132      1.1  christos static int
   2133      1.1  christos model_iq2000_wbr30 (SIM_CPU *current_cpu, void *sem_arg)
   2134      1.1  christos {
   2135      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2136      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2137      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2138      1.1  christos   int cycles = 0;
   2139      1.1  christos   {
   2140      1.1  christos     int referenced = 0;
   2141      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2142      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2143      1.1  christos   }
   2144      1.1  christos   return cycles;
   2145      1.1  christos #undef FLD
   2146      1.1  christos }
   2147      1.1  christos 
   2148      1.1  christos static int
   2149      1.1  christos model_iq2000_wbr30u (SIM_CPU *current_cpu, void *sem_arg)
   2150      1.1  christos {
   2151      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2152      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2153      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2154      1.1  christos   int cycles = 0;
   2155      1.1  christos   {
   2156      1.1  christos     int referenced = 0;
   2157      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2158      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2159      1.1  christos   }
   2160      1.1  christos   return cycles;
   2161      1.1  christos #undef FLD
   2162      1.1  christos }
   2163      1.1  christos 
   2164      1.1  christos static int
   2165      1.1  christos model_iq2000_wx (SIM_CPU *current_cpu, void *sem_arg)
   2166      1.1  christos {
   2167      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2168      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2169      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2170      1.1  christos   int cycles = 0;
   2171      1.1  christos   {
   2172      1.1  christos     int referenced = 0;
   2173      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2174      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2175      1.1  christos   }
   2176      1.1  christos   return cycles;
   2177      1.1  christos #undef FLD
   2178      1.1  christos }
   2179      1.1  christos 
   2180      1.1  christos static int
   2181      1.1  christos model_iq2000_wxu (SIM_CPU *current_cpu, void *sem_arg)
   2182      1.1  christos {
   2183      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2184      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2185      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2186      1.1  christos   int cycles = 0;
   2187      1.1  christos   {
   2188      1.1  christos     int referenced = 0;
   2189      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2190      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2191      1.1  christos   }
   2192      1.1  christos   return cycles;
   2193      1.1  christos #undef FLD
   2194      1.1  christos }
   2195      1.1  christos 
   2196      1.1  christos static int
   2197      1.1  christos model_iq2000_wxr1 (SIM_CPU *current_cpu, void *sem_arg)
   2198      1.1  christos {
   2199      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2200      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2201      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2202      1.1  christos   int cycles = 0;
   2203      1.1  christos   {
   2204      1.1  christos     int referenced = 0;
   2205      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2206      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2207      1.1  christos   }
   2208      1.1  christos   return cycles;
   2209      1.1  christos #undef FLD
   2210      1.1  christos }
   2211      1.1  christos 
   2212      1.1  christos static int
   2213      1.1  christos model_iq2000_wxr1u (SIM_CPU *current_cpu, void *sem_arg)
   2214      1.1  christos {
   2215      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2216      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2217      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2218      1.1  christos   int cycles = 0;
   2219      1.1  christos   {
   2220      1.1  christos     int referenced = 0;
   2221      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2222      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2223      1.1  christos   }
   2224      1.1  christos   return cycles;
   2225      1.1  christos #undef FLD
   2226      1.1  christos }
   2227      1.1  christos 
   2228      1.1  christos static int
   2229      1.1  christos model_iq2000_wxr30 (SIM_CPU *current_cpu, void *sem_arg)
   2230      1.1  christos {
   2231      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2232      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2233      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2234      1.1  christos   int cycles = 0;
   2235      1.1  christos   {
   2236      1.1  christos     int referenced = 0;
   2237      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2238      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2239      1.1  christos   }
   2240      1.1  christos   return cycles;
   2241      1.1  christos #undef FLD
   2242      1.1  christos }
   2243      1.1  christos 
   2244      1.1  christos static int
   2245      1.1  christos model_iq2000_wxr30u (SIM_CPU *current_cpu, void *sem_arg)
   2246      1.1  christos {
   2247      1.1  christos #define FLD(f) abuf->fields.sfmt_empty.f
   2248      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2249      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2250      1.1  christos   int cycles = 0;
   2251      1.1  christos   {
   2252      1.1  christos     int referenced = 0;
   2253      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2254      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2255      1.1  christos   }
   2256      1.1  christos   return cycles;
   2257      1.1  christos #undef FLD
   2258      1.1  christos }
   2259      1.1  christos 
   2260      1.1  christos static int
   2261      1.1  christos model_iq2000_ldw (SIM_CPU *current_cpu, void *sem_arg)
   2262      1.1  christos {
   2263      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
   2264      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2265      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2266      1.1  christos   int cycles = 0;
   2267      1.1  christos   {
   2268      1.1  christos     int referenced = 0;
   2269      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2270      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2271      1.1  christos   }
   2272      1.1  christos   return cycles;
   2273      1.1  christos #undef FLD
   2274      1.1  christos }
   2275      1.1  christos 
   2276      1.1  christos static int
   2277      1.1  christos model_iq2000_sdw (SIM_CPU *current_cpu, void *sem_arg)
   2278      1.1  christos {
   2279      1.1  christos #define FLD(f) abuf->fields.sfmt_addi.f
   2280      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2281      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2282      1.1  christos   int cycles = 0;
   2283      1.1  christos   {
   2284      1.1  christos     int referenced = 0;
   2285      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2286      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2287      1.1  christos   }
   2288      1.1  christos   return cycles;
   2289      1.1  christos #undef FLD
   2290      1.1  christos }
   2291      1.1  christos 
   2292      1.1  christos static int
   2293      1.1  christos model_iq2000_j (SIM_CPU *current_cpu, void *sem_arg)
   2294      1.1  christos {
   2295      1.1  christos #define FLD(f) abuf->fields.sfmt_j.f
   2296      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2297      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2298      1.1  christos   int cycles = 0;
   2299      1.1  christos   {
   2300      1.1  christos     int referenced = 0;
   2301      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2302      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2303      1.1  christos   }
   2304      1.1  christos   return cycles;
   2305      1.1  christos #undef FLD
   2306      1.1  christos }
   2307      1.1  christos 
   2308      1.1  christos static int
   2309      1.1  christos model_iq2000_jal (SIM_CPU *current_cpu, void *sem_arg)
   2310      1.1  christos {
   2311      1.1  christos #define FLD(f) abuf->fields.sfmt_j.f
   2312      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2313      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2314      1.1  christos   int cycles = 0;
   2315      1.1  christos   {
   2316      1.1  christos     int referenced = 0;
   2317      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2318      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2319      1.1  christos   }
   2320      1.1  christos   return cycles;
   2321      1.1  christos #undef FLD
   2322      1.1  christos }
   2323      1.1  christos 
   2324      1.1  christos static int
   2325      1.1  christos model_iq2000_bmb (SIM_CPU *current_cpu, void *sem_arg)
   2326      1.1  christos {
   2327      1.1  christos #define FLD(f) abuf->fields.sfmt_bbi.f
   2328      1.1  christos   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
   2329      1.1  christos   const IDESC * UNUSED idesc = abuf->idesc;
   2330      1.1  christos   int cycles = 0;
   2331      1.1  christos   {
   2332      1.1  christos     int referenced = 0;
   2333      1.1  christos     int UNUSED insn_referenced = abuf->written;
   2334      1.1  christos     cycles += iq2000bf_model_iq2000_u_exec (current_cpu, idesc, 0, referenced);
   2335      1.1  christos   }
   2336      1.1  christos   return cycles;
   2337      1.1  christos #undef FLD
   2338      1.1  christos }
   2339      1.1  christos 
   2340      1.1  christos /* We assume UNIT_NONE == 0 because the tables don't always terminate
   2341      1.1  christos    entries with it.  */
   2342      1.1  christos 
   2343      1.1  christos /* Model timing data for `iq2000'.  */
   2344      1.1  christos 
   2345      1.1  christos static const INSN_TIMING iq2000_timing[] = {
   2346      1.1  christos   { IQ2000BF_INSN_X_INVALID, 0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2347      1.1  christos   { IQ2000BF_INSN_X_AFTER, 0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2348      1.1  christos   { IQ2000BF_INSN_X_BEFORE, 0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2349      1.1  christos   { IQ2000BF_INSN_X_CTI_CHAIN, 0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2350      1.1  christos   { IQ2000BF_INSN_X_CHAIN, 0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2351      1.1  christos   { IQ2000BF_INSN_X_BEGIN, 0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2352      1.1  christos   { IQ2000BF_INSN_ADD, model_iq2000_add, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2353      1.1  christos   { IQ2000BF_INSN_ADDI, model_iq2000_addi, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2354      1.1  christos   { IQ2000BF_INSN_ADDIU, model_iq2000_addiu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2355      1.1  christos   { IQ2000BF_INSN_ADDU, model_iq2000_addu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2356      1.1  christos   { IQ2000BF_INSN_ADO16, model_iq2000_ado16, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2357      1.1  christos   { IQ2000BF_INSN_AND, model_iq2000_and, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2358      1.1  christos   { IQ2000BF_INSN_ANDI, model_iq2000_andi, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2359      1.1  christos   { IQ2000BF_INSN_ANDOI, model_iq2000_andoi, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2360      1.1  christos   { IQ2000BF_INSN_NOR, model_iq2000_nor, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2361      1.1  christos   { IQ2000BF_INSN_OR, model_iq2000_or, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2362      1.1  christos   { IQ2000BF_INSN_ORI, model_iq2000_ori, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2363      1.1  christos   { IQ2000BF_INSN_RAM, model_iq2000_ram, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2364      1.1  christos   { IQ2000BF_INSN_SLL, model_iq2000_sll, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2365      1.1  christos   { IQ2000BF_INSN_SLLV, model_iq2000_sllv, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2366      1.1  christos   { IQ2000BF_INSN_SLMV, model_iq2000_slmv, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2367      1.1  christos   { IQ2000BF_INSN_SLT, model_iq2000_slt, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2368      1.1  christos   { IQ2000BF_INSN_SLTI, model_iq2000_slti, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2369      1.1  christos   { IQ2000BF_INSN_SLTIU, model_iq2000_sltiu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2370      1.1  christos   { IQ2000BF_INSN_SLTU, model_iq2000_sltu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2371      1.1  christos   { IQ2000BF_INSN_SRA, model_iq2000_sra, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2372      1.1  christos   { IQ2000BF_INSN_SRAV, model_iq2000_srav, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2373      1.1  christos   { IQ2000BF_INSN_SRL, model_iq2000_srl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2374      1.1  christos   { IQ2000BF_INSN_SRLV, model_iq2000_srlv, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2375      1.1  christos   { IQ2000BF_INSN_SRMV, model_iq2000_srmv, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2376      1.1  christos   { IQ2000BF_INSN_SUB, model_iq2000_sub, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2377      1.1  christos   { IQ2000BF_INSN_SUBU, model_iq2000_subu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2378      1.1  christos   { IQ2000BF_INSN_XOR, model_iq2000_xor, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2379      1.1  christos   { IQ2000BF_INSN_XORI, model_iq2000_xori, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2380      1.1  christos   { IQ2000BF_INSN_BBI, model_iq2000_bbi, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2381      1.1  christos   { IQ2000BF_INSN_BBIN, model_iq2000_bbin, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2382      1.1  christos   { IQ2000BF_INSN_BBV, model_iq2000_bbv, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2383      1.1  christos   { IQ2000BF_INSN_BBVN, model_iq2000_bbvn, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2384      1.1  christos   { IQ2000BF_INSN_BEQ, model_iq2000_beq, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2385      1.1  christos   { IQ2000BF_INSN_BEQL, model_iq2000_beql, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2386      1.1  christos   { IQ2000BF_INSN_BGEZ, model_iq2000_bgez, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2387      1.1  christos   { IQ2000BF_INSN_BGEZAL, model_iq2000_bgezal, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2388      1.1  christos   { IQ2000BF_INSN_BGEZALL, model_iq2000_bgezall, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2389      1.1  christos   { IQ2000BF_INSN_BGEZL, model_iq2000_bgezl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2390      1.1  christos   { IQ2000BF_INSN_BLTZ, model_iq2000_bltz, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2391      1.1  christos   { IQ2000BF_INSN_BLTZL, model_iq2000_bltzl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2392      1.1  christos   { IQ2000BF_INSN_BLTZAL, model_iq2000_bltzal, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2393      1.1  christos   { IQ2000BF_INSN_BLTZALL, model_iq2000_bltzall, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2394      1.1  christos   { IQ2000BF_INSN_BMB0, model_iq2000_bmb0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2395      1.1  christos   { IQ2000BF_INSN_BMB1, model_iq2000_bmb1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2396      1.1  christos   { IQ2000BF_INSN_BMB2, model_iq2000_bmb2, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2397      1.1  christos   { IQ2000BF_INSN_BMB3, model_iq2000_bmb3, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2398      1.1  christos   { IQ2000BF_INSN_BNE, model_iq2000_bne, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2399      1.1  christos   { IQ2000BF_INSN_BNEL, model_iq2000_bnel, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2400      1.1  christos   { IQ2000BF_INSN_JALR, model_iq2000_jalr, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2401      1.1  christos   { IQ2000BF_INSN_JR, model_iq2000_jr, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2402      1.1  christos   { IQ2000BF_INSN_LB, model_iq2000_lb, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2403      1.1  christos   { IQ2000BF_INSN_LBU, model_iq2000_lbu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2404      1.1  christos   { IQ2000BF_INSN_LH, model_iq2000_lh, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2405      1.1  christos   { IQ2000BF_INSN_LHU, model_iq2000_lhu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2406      1.1  christos   { IQ2000BF_INSN_LUI, model_iq2000_lui, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2407      1.1  christos   { IQ2000BF_INSN_LW, model_iq2000_lw, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2408      1.1  christos   { IQ2000BF_INSN_SB, model_iq2000_sb, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2409      1.1  christos   { IQ2000BF_INSN_SH, model_iq2000_sh, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2410      1.1  christos   { IQ2000BF_INSN_SW, model_iq2000_sw, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2411      1.1  christos   { IQ2000BF_INSN_BREAK, model_iq2000_break, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2412      1.1  christos   { IQ2000BF_INSN_SYSCALL, model_iq2000_syscall, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2413      1.1  christos   { IQ2000BF_INSN_ANDOUI, model_iq2000_andoui, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2414      1.1  christos   { IQ2000BF_INSN_ORUI, model_iq2000_orui, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2415      1.1  christos   { IQ2000BF_INSN_BGTZ, model_iq2000_bgtz, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2416      1.1  christos   { IQ2000BF_INSN_BGTZL, model_iq2000_bgtzl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2417      1.1  christos   { IQ2000BF_INSN_BLEZ, model_iq2000_blez, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2418      1.1  christos   { IQ2000BF_INSN_BLEZL, model_iq2000_blezl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2419      1.1  christos   { IQ2000BF_INSN_MRGB, model_iq2000_mrgb, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2420      1.1  christos   { IQ2000BF_INSN_BCTXT, model_iq2000_bctxt, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2421      1.1  christos   { IQ2000BF_INSN_BC0F, model_iq2000_bc0f, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2422      1.1  christos   { IQ2000BF_INSN_BC0FL, model_iq2000_bc0fl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2423      1.1  christos   { IQ2000BF_INSN_BC3F, model_iq2000_bc3f, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2424      1.1  christos   { IQ2000BF_INSN_BC3FL, model_iq2000_bc3fl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2425      1.1  christos   { IQ2000BF_INSN_BC0T, model_iq2000_bc0t, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2426      1.1  christos   { IQ2000BF_INSN_BC0TL, model_iq2000_bc0tl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2427      1.1  christos   { IQ2000BF_INSN_BC3T, model_iq2000_bc3t, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2428      1.1  christos   { IQ2000BF_INSN_BC3TL, model_iq2000_bc3tl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2429      1.1  christos   { IQ2000BF_INSN_CFC0, model_iq2000_cfc0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2430      1.1  christos   { IQ2000BF_INSN_CFC1, model_iq2000_cfc1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2431      1.1  christos   { IQ2000BF_INSN_CFC2, model_iq2000_cfc2, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2432      1.1  christos   { IQ2000BF_INSN_CFC3, model_iq2000_cfc3, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2433      1.1  christos   { IQ2000BF_INSN_CHKHDR, model_iq2000_chkhdr, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2434      1.1  christos   { IQ2000BF_INSN_CTC0, model_iq2000_ctc0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2435      1.1  christos   { IQ2000BF_INSN_CTC1, model_iq2000_ctc1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2436      1.1  christos   { IQ2000BF_INSN_CTC2, model_iq2000_ctc2, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2437      1.1  christos   { IQ2000BF_INSN_CTC3, model_iq2000_ctc3, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2438      1.1  christos   { IQ2000BF_INSN_JCR, model_iq2000_jcr, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2439      1.1  christos   { IQ2000BF_INSN_LUC32, model_iq2000_luc32, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2440      1.1  christos   { IQ2000BF_INSN_LUC32L, model_iq2000_luc32l, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2441      1.1  christos   { IQ2000BF_INSN_LUC64, model_iq2000_luc64, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2442      1.1  christos   { IQ2000BF_INSN_LUC64L, model_iq2000_luc64l, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2443      1.1  christos   { IQ2000BF_INSN_LUK, model_iq2000_luk, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2444      1.1  christos   { IQ2000BF_INSN_LULCK, model_iq2000_lulck, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2445      1.1  christos   { IQ2000BF_INSN_LUM32, model_iq2000_lum32, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2446      1.1  christos   { IQ2000BF_INSN_LUM32L, model_iq2000_lum32l, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2447      1.1  christos   { IQ2000BF_INSN_LUM64, model_iq2000_lum64, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2448      1.1  christos   { IQ2000BF_INSN_LUM64L, model_iq2000_lum64l, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2449      1.1  christos   { IQ2000BF_INSN_LUR, model_iq2000_lur, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2450      1.1  christos   { IQ2000BF_INSN_LURL, model_iq2000_lurl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2451      1.1  christos   { IQ2000BF_INSN_LUULCK, model_iq2000_luulck, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2452      1.1  christos   { IQ2000BF_INSN_MFC0, model_iq2000_mfc0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2453      1.1  christos   { IQ2000BF_INSN_MFC1, model_iq2000_mfc1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2454      1.1  christos   { IQ2000BF_INSN_MFC2, model_iq2000_mfc2, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2455      1.1  christos   { IQ2000BF_INSN_MFC3, model_iq2000_mfc3, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2456      1.1  christos   { IQ2000BF_INSN_MTC0, model_iq2000_mtc0, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2457      1.1  christos   { IQ2000BF_INSN_MTC1, model_iq2000_mtc1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2458      1.1  christos   { IQ2000BF_INSN_MTC2, model_iq2000_mtc2, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2459      1.1  christos   { IQ2000BF_INSN_MTC3, model_iq2000_mtc3, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2460      1.1  christos   { IQ2000BF_INSN_PKRL, model_iq2000_pkrl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2461      1.1  christos   { IQ2000BF_INSN_PKRLR1, model_iq2000_pkrlr1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2462      1.1  christos   { IQ2000BF_INSN_PKRLR30, model_iq2000_pkrlr30, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2463      1.1  christos   { IQ2000BF_INSN_RB, model_iq2000_rb, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2464      1.1  christos   { IQ2000BF_INSN_RBR1, model_iq2000_rbr1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2465      1.1  christos   { IQ2000BF_INSN_RBR30, model_iq2000_rbr30, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2466      1.1  christos   { IQ2000BF_INSN_RFE, model_iq2000_rfe, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2467      1.1  christos   { IQ2000BF_INSN_RX, model_iq2000_rx, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2468      1.1  christos   { IQ2000BF_INSN_RXR1, model_iq2000_rxr1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2469      1.1  christos   { IQ2000BF_INSN_RXR30, model_iq2000_rxr30, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2470      1.1  christos   { IQ2000BF_INSN_SLEEP, model_iq2000_sleep, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2471      1.1  christos   { IQ2000BF_INSN_SRRD, model_iq2000_srrd, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2472      1.1  christos   { IQ2000BF_INSN_SRRDL, model_iq2000_srrdl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2473      1.1  christos   { IQ2000BF_INSN_SRULCK, model_iq2000_srulck, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2474      1.1  christos   { IQ2000BF_INSN_SRWR, model_iq2000_srwr, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2475      1.1  christos   { IQ2000BF_INSN_SRWRU, model_iq2000_srwru, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2476      1.1  christos   { IQ2000BF_INSN_TRAPQFL, model_iq2000_trapqfl, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2477      1.1  christos   { IQ2000BF_INSN_TRAPQNE, model_iq2000_trapqne, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2478      1.1  christos   { IQ2000BF_INSN_TRAPREL, model_iq2000_traprel, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2479      1.1  christos   { IQ2000BF_INSN_WB, model_iq2000_wb, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2480      1.1  christos   { IQ2000BF_INSN_WBU, model_iq2000_wbu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2481      1.1  christos   { IQ2000BF_INSN_WBR1, model_iq2000_wbr1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2482      1.1  christos   { IQ2000BF_INSN_WBR1U, model_iq2000_wbr1u, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2483      1.1  christos   { IQ2000BF_INSN_WBR30, model_iq2000_wbr30, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2484      1.1  christos   { IQ2000BF_INSN_WBR30U, model_iq2000_wbr30u, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2485      1.1  christos   { IQ2000BF_INSN_WX, model_iq2000_wx, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2486      1.1  christos   { IQ2000BF_INSN_WXU, model_iq2000_wxu, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2487      1.1  christos   { IQ2000BF_INSN_WXR1, model_iq2000_wxr1, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2488      1.1  christos   { IQ2000BF_INSN_WXR1U, model_iq2000_wxr1u, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2489      1.1  christos   { IQ2000BF_INSN_WXR30, model_iq2000_wxr30, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2490      1.1  christos   { IQ2000BF_INSN_WXR30U, model_iq2000_wxr30u, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2491      1.1  christos   { IQ2000BF_INSN_LDW, model_iq2000_ldw, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2492      1.1  christos   { IQ2000BF_INSN_SDW, model_iq2000_sdw, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2493      1.1  christos   { IQ2000BF_INSN_J, model_iq2000_j, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2494      1.1  christos   { IQ2000BF_INSN_JAL, model_iq2000_jal, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2495      1.1  christos   { IQ2000BF_INSN_BMB, model_iq2000_bmb, { { (int) UNIT_IQ2000_U_EXEC, 1, 1 } } },
   2496      1.1  christos };
   2497      1.1  christos 
   2498      1.1  christos #endif /* WITH_PROFILE_MODEL_P */
   2499      1.1  christos 
   2500      1.1  christos static void
   2501      1.1  christos iq2000_model_init (SIM_CPU *cpu)
   2502      1.1  christos {
   2503      1.1  christos   CPU_MODEL_DATA (cpu) = (void *) zalloc (sizeof (MODEL_IQ2000_DATA));
   2504      1.1  christos }
   2505      1.1  christos 
   2506      1.1  christos #if WITH_PROFILE_MODEL_P
   2507      1.1  christos #define TIMING_DATA(td) td
   2508      1.1  christos #else
   2509      1.1  christos #define TIMING_DATA(td) 0
   2510      1.1  christos #endif
   2511      1.1  christos 
   2512  1.1.1.5  christos static const SIM_MODEL iq2000_models[] =
   2513      1.1  christos {
   2514      1.1  christos   { "iq2000", & iq2000_mach, MODEL_IQ2000, TIMING_DATA (& iq2000_timing[0]), iq2000_model_init },
   2515      1.1  christos   { 0 }
   2516      1.1  christos };
   2517      1.1  christos 
   2518      1.1  christos /* The properties of this cpu's implementation.  */
   2519      1.1  christos 
   2520  1.1.1.5  christos static const SIM_MACH_IMP_PROPERTIES iq2000bf_imp_properties =
   2521      1.1  christos {
   2522      1.1  christos   sizeof (SIM_CPU),
   2523      1.1  christos #if WITH_SCACHE
   2524      1.1  christos   sizeof (SCACHE)
   2525      1.1  christos #else
   2526      1.1  christos   0
   2527      1.1  christos #endif
   2528      1.1  christos };
   2529      1.1  christos 
   2530      1.1  christos 
   2531      1.1  christos static void
   2532      1.1  christos iq2000bf_prepare_run (SIM_CPU *cpu)
   2533      1.1  christos {
   2534      1.1  christos   if (CPU_IDESC (cpu) == NULL)
   2535      1.1  christos     iq2000bf_init_idesc_table (cpu);
   2536      1.1  christos }
   2537      1.1  christos 
   2538      1.1  christos static const CGEN_INSN *
   2539      1.1  christos iq2000bf_get_idata (SIM_CPU *cpu, int inum)
   2540      1.1  christos {
   2541      1.1  christos   return CPU_IDESC (cpu) [inum].idata;
   2542      1.1  christos }
   2543      1.1  christos 
   2544      1.1  christos static void
   2545      1.1  christos iq2000_init_cpu (SIM_CPU *cpu)
   2546      1.1  christos {
   2547      1.1  christos   CPU_REG_FETCH (cpu) = iq2000bf_fetch_register;
   2548      1.1  christos   CPU_REG_STORE (cpu) = iq2000bf_store_register;
   2549      1.1  christos   CPU_PC_FETCH (cpu) = iq2000bf_h_pc_get;
   2550      1.1  christos   CPU_PC_STORE (cpu) = iq2000bf_h_pc_set;
   2551      1.1  christos   CPU_GET_IDATA (cpu) = iq2000bf_get_idata;
   2552      1.1  christos   CPU_MAX_INSNS (cpu) = IQ2000BF_INSN__MAX;
   2553      1.1  christos   CPU_INSN_NAME (cpu) = cgen_insn_name;
   2554      1.1  christos   CPU_FULL_ENGINE_FN (cpu) = iq2000bf_engine_run_full;
   2555      1.1  christos #if WITH_FAST
   2556      1.1  christos   CPU_FAST_ENGINE_FN (cpu) = iq2000bf_engine_run_fast;
   2557      1.1  christos #else
   2558      1.1  christos   CPU_FAST_ENGINE_FN (cpu) = iq2000bf_engine_run_full;
   2559      1.1  christos #endif
   2560      1.1  christos }
   2561      1.1  christos 
   2562  1.1.1.5  christos const SIM_MACH iq2000_mach =
   2563      1.1  christos {
   2564      1.1  christos   "iq2000", "iq2000", MACH_IQ2000,
   2565      1.1  christos   32, 32, & iq2000_models[0], & iq2000bf_imp_properties,
   2566      1.1  christos   iq2000_init_cpu,
   2567      1.1  christos   iq2000bf_prepare_run
   2568      1.1  christos };
   2569      1.1  christos 
   2570