xref: /netbsd-src/external/gpl3/gdb/dist/sim/iq2000/decode.c (revision 4d1eaf9104083d3c1d72a17f5c414777b18c6935)
1 /* Simulator instruction decoder for iq2000bf.
2 
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
4 
5 Copyright (C) 1996-2024 Free Software Foundation, Inc.
6 
7 This file is part of the GNU simulators.
8 
9    This file is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 3, or (at your option)
12    any later version.
13 
14    It is distributed in the hope that it will be useful, but WITHOUT
15    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
17    License for more details.
18 
19    You should have received a copy of the GNU General Public License along
20    with this program; if not, write to the Free Software Foundation, Inc.,
21    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
22 
23 */
24 
25 #define WANT_CPU iq2000bf
26 #define WANT_CPU_IQ2000BF
27 
28 #include "sim-main.h"
29 #include "sim-assert.h"
30 #include "cgen-mem.h"
31 #include "cgen-ops.h"
32 
33 /* The instruction descriptor array.
34    This is computed at runtime.  Space for it is not malloc'd to save a
35    teensy bit of cpu in the decoder.  Moving it to malloc space is trivial
36    but won't be done until necessary (we don't currently support the runtime
37    addition of instructions nor an SMP machine with different cpus).  */
38 static IDESC iq2000bf_insn_data[IQ2000BF_INSN__MAX];
39 
40 /* Commas between elements are contained in the macros.
41    Some of these are conditionally compiled out.  */
42 
43 static const struct insn_sem iq2000bf_insn_sem[] =
44 {
45   { VIRTUAL_INSN_X_INVALID, IQ2000BF_INSN_X_INVALID, IQ2000BF_SFMT_EMPTY },
46   { VIRTUAL_INSN_X_AFTER, IQ2000BF_INSN_X_AFTER, IQ2000BF_SFMT_EMPTY },
47   { VIRTUAL_INSN_X_BEFORE, IQ2000BF_INSN_X_BEFORE, IQ2000BF_SFMT_EMPTY },
48   { VIRTUAL_INSN_X_CTI_CHAIN, IQ2000BF_INSN_X_CTI_CHAIN, IQ2000BF_SFMT_EMPTY },
49   { VIRTUAL_INSN_X_CHAIN, IQ2000BF_INSN_X_CHAIN, IQ2000BF_SFMT_EMPTY },
50   { VIRTUAL_INSN_X_BEGIN, IQ2000BF_INSN_X_BEGIN, IQ2000BF_SFMT_EMPTY },
51   { IQ2000_INSN_ADD, IQ2000BF_INSN_ADD, IQ2000BF_SFMT_ADD },
52   { IQ2000_INSN_ADDI, IQ2000BF_INSN_ADDI, IQ2000BF_SFMT_ADDI },
53   { IQ2000_INSN_ADDIU, IQ2000BF_INSN_ADDIU, IQ2000BF_SFMT_ADDI },
54   { IQ2000_INSN_ADDU, IQ2000BF_INSN_ADDU, IQ2000BF_SFMT_ADD },
55   { IQ2000_INSN_ADO16, IQ2000BF_INSN_ADO16, IQ2000BF_SFMT_ADD },
56   { IQ2000_INSN_AND, IQ2000BF_INSN_AND, IQ2000BF_SFMT_ADD },
57   { IQ2000_INSN_ANDI, IQ2000BF_INSN_ANDI, IQ2000BF_SFMT_ADDI },
58   { IQ2000_INSN_ANDOI, IQ2000BF_INSN_ANDOI, IQ2000BF_SFMT_ADDI },
59   { IQ2000_INSN_NOR, IQ2000BF_INSN_NOR, IQ2000BF_SFMT_ADD },
60   { IQ2000_INSN_OR, IQ2000BF_INSN_OR, IQ2000BF_SFMT_ADD },
61   { IQ2000_INSN_ORI, IQ2000BF_INSN_ORI, IQ2000BF_SFMT_ADDI },
62   { IQ2000_INSN_RAM, IQ2000BF_INSN_RAM, IQ2000BF_SFMT_RAM },
63   { IQ2000_INSN_SLL, IQ2000BF_INSN_SLL, IQ2000BF_SFMT_SLL },
64   { IQ2000_INSN_SLLV, IQ2000BF_INSN_SLLV, IQ2000BF_SFMT_ADD },
65   { IQ2000_INSN_SLMV, IQ2000BF_INSN_SLMV, IQ2000BF_SFMT_SLMV },
66   { IQ2000_INSN_SLT, IQ2000BF_INSN_SLT, IQ2000BF_SFMT_SLT },
67   { IQ2000_INSN_SLTI, IQ2000BF_INSN_SLTI, IQ2000BF_SFMT_SLTI },
68   { IQ2000_INSN_SLTIU, IQ2000BF_INSN_SLTIU, IQ2000BF_SFMT_SLTI },
69   { IQ2000_INSN_SLTU, IQ2000BF_INSN_SLTU, IQ2000BF_SFMT_SLT },
70   { IQ2000_INSN_SRA, IQ2000BF_INSN_SRA, IQ2000BF_SFMT_SLL },
71   { IQ2000_INSN_SRAV, IQ2000BF_INSN_SRAV, IQ2000BF_SFMT_ADD },
72   { IQ2000_INSN_SRL, IQ2000BF_INSN_SRL, IQ2000BF_SFMT_SLL },
73   { IQ2000_INSN_SRLV, IQ2000BF_INSN_SRLV, IQ2000BF_SFMT_ADD },
74   { IQ2000_INSN_SRMV, IQ2000BF_INSN_SRMV, IQ2000BF_SFMT_SLMV },
75   { IQ2000_INSN_SUB, IQ2000BF_INSN_SUB, IQ2000BF_SFMT_ADD },
76   { IQ2000_INSN_SUBU, IQ2000BF_INSN_SUBU, IQ2000BF_SFMT_ADD },
77   { IQ2000_INSN_XOR, IQ2000BF_INSN_XOR, IQ2000BF_SFMT_ADD },
78   { IQ2000_INSN_XORI, IQ2000BF_INSN_XORI, IQ2000BF_SFMT_ADDI },
79   { IQ2000_INSN_BBI, IQ2000BF_INSN_BBI, IQ2000BF_SFMT_BBI },
80   { IQ2000_INSN_BBIN, IQ2000BF_INSN_BBIN, IQ2000BF_SFMT_BBI },
81   { IQ2000_INSN_BBV, IQ2000BF_INSN_BBV, IQ2000BF_SFMT_BBV },
82   { IQ2000_INSN_BBVN, IQ2000BF_INSN_BBVN, IQ2000BF_SFMT_BBV },
83   { IQ2000_INSN_BEQ, IQ2000BF_INSN_BEQ, IQ2000BF_SFMT_BBV },
84   { IQ2000_INSN_BEQL, IQ2000BF_INSN_BEQL, IQ2000BF_SFMT_BBV },
85   { IQ2000_INSN_BGEZ, IQ2000BF_INSN_BGEZ, IQ2000BF_SFMT_BGEZ },
86   { IQ2000_INSN_BGEZAL, IQ2000BF_INSN_BGEZAL, IQ2000BF_SFMT_BGEZAL },
87   { IQ2000_INSN_BGEZALL, IQ2000BF_INSN_BGEZALL, IQ2000BF_SFMT_BGEZAL },
88   { IQ2000_INSN_BGEZL, IQ2000BF_INSN_BGEZL, IQ2000BF_SFMT_BGEZ },
89   { IQ2000_INSN_BLTZ, IQ2000BF_INSN_BLTZ, IQ2000BF_SFMT_BGEZ },
90   { IQ2000_INSN_BLTZL, IQ2000BF_INSN_BLTZL, IQ2000BF_SFMT_BGEZ },
91   { IQ2000_INSN_BLTZAL, IQ2000BF_INSN_BLTZAL, IQ2000BF_SFMT_BGEZAL },
92   { IQ2000_INSN_BLTZALL, IQ2000BF_INSN_BLTZALL, IQ2000BF_SFMT_BGEZAL },
93   { IQ2000_INSN_BMB0, IQ2000BF_INSN_BMB0, IQ2000BF_SFMT_BBV },
94   { IQ2000_INSN_BMB1, IQ2000BF_INSN_BMB1, IQ2000BF_SFMT_BBV },
95   { IQ2000_INSN_BMB2, IQ2000BF_INSN_BMB2, IQ2000BF_SFMT_BBV },
96   { IQ2000_INSN_BMB3, IQ2000BF_INSN_BMB3, IQ2000BF_SFMT_BBV },
97   { IQ2000_INSN_BNE, IQ2000BF_INSN_BNE, IQ2000BF_SFMT_BBV },
98   { IQ2000_INSN_BNEL, IQ2000BF_INSN_BNEL, IQ2000BF_SFMT_BBV },
99   { IQ2000_INSN_JALR, IQ2000BF_INSN_JALR, IQ2000BF_SFMT_JALR },
100   { IQ2000_INSN_JR, IQ2000BF_INSN_JR, IQ2000BF_SFMT_JR },
101   { IQ2000_INSN_LB, IQ2000BF_INSN_LB, IQ2000BF_SFMT_LB },
102   { IQ2000_INSN_LBU, IQ2000BF_INSN_LBU, IQ2000BF_SFMT_LB },
103   { IQ2000_INSN_LH, IQ2000BF_INSN_LH, IQ2000BF_SFMT_LH },
104   { IQ2000_INSN_LHU, IQ2000BF_INSN_LHU, IQ2000BF_SFMT_LH },
105   { IQ2000_INSN_LUI, IQ2000BF_INSN_LUI, IQ2000BF_SFMT_LUI },
106   { IQ2000_INSN_LW, IQ2000BF_INSN_LW, IQ2000BF_SFMT_LW },
107   { IQ2000_INSN_SB, IQ2000BF_INSN_SB, IQ2000BF_SFMT_SB },
108   { IQ2000_INSN_SH, IQ2000BF_INSN_SH, IQ2000BF_SFMT_SH },
109   { IQ2000_INSN_SW, IQ2000BF_INSN_SW, IQ2000BF_SFMT_SW },
110   { IQ2000_INSN_BREAK, IQ2000BF_INSN_BREAK, IQ2000BF_SFMT_BREAK },
111   { IQ2000_INSN_SYSCALL, IQ2000BF_INSN_SYSCALL, IQ2000BF_SFMT_BREAK },
112   { IQ2000_INSN_ANDOUI, IQ2000BF_INSN_ANDOUI, IQ2000BF_SFMT_ANDOUI },
113   { IQ2000_INSN_ORUI, IQ2000BF_INSN_ORUI, IQ2000BF_SFMT_ANDOUI },
114   { IQ2000_INSN_BGTZ, IQ2000BF_INSN_BGTZ, IQ2000BF_SFMT_BGEZ },
115   { IQ2000_INSN_BGTZL, IQ2000BF_INSN_BGTZL, IQ2000BF_SFMT_BGEZ },
116   { IQ2000_INSN_BLEZ, IQ2000BF_INSN_BLEZ, IQ2000BF_SFMT_BGEZ },
117   { IQ2000_INSN_BLEZL, IQ2000BF_INSN_BLEZL, IQ2000BF_SFMT_BGEZ },
118   { IQ2000_INSN_MRGB, IQ2000BF_INSN_MRGB, IQ2000BF_SFMT_MRGB },
119   { IQ2000_INSN_BCTXT, IQ2000BF_INSN_BCTXT, IQ2000BF_SFMT_BCTXT },
120   { IQ2000_INSN_BC0F, IQ2000BF_INSN_BC0F, IQ2000BF_SFMT_BCTXT },
121   { IQ2000_INSN_BC0FL, IQ2000BF_INSN_BC0FL, IQ2000BF_SFMT_BCTXT },
122   { IQ2000_INSN_BC3F, IQ2000BF_INSN_BC3F, IQ2000BF_SFMT_BCTXT },
123   { IQ2000_INSN_BC3FL, IQ2000BF_INSN_BC3FL, IQ2000BF_SFMT_BCTXT },
124   { IQ2000_INSN_BC0T, IQ2000BF_INSN_BC0T, IQ2000BF_SFMT_BCTXT },
125   { IQ2000_INSN_BC0TL, IQ2000BF_INSN_BC0TL, IQ2000BF_SFMT_BCTXT },
126   { IQ2000_INSN_BC3T, IQ2000BF_INSN_BC3T, IQ2000BF_SFMT_BCTXT },
127   { IQ2000_INSN_BC3TL, IQ2000BF_INSN_BC3TL, IQ2000BF_SFMT_BCTXT },
128   { IQ2000_INSN_CFC0, IQ2000BF_INSN_CFC0, IQ2000BF_SFMT_CFC0 },
129   { IQ2000_INSN_CFC1, IQ2000BF_INSN_CFC1, IQ2000BF_SFMT_CFC0 },
130   { IQ2000_INSN_CFC2, IQ2000BF_INSN_CFC2, IQ2000BF_SFMT_CFC0 },
131   { IQ2000_INSN_CFC3, IQ2000BF_INSN_CFC3, IQ2000BF_SFMT_CFC0 },
132   { IQ2000_INSN_CHKHDR, IQ2000BF_INSN_CHKHDR, IQ2000BF_SFMT_CFC0 },
133   { IQ2000_INSN_CTC0, IQ2000BF_INSN_CTC0, IQ2000BF_SFMT_CFC0 },
134   { IQ2000_INSN_CTC1, IQ2000BF_INSN_CTC1, IQ2000BF_SFMT_CFC0 },
135   { IQ2000_INSN_CTC2, IQ2000BF_INSN_CTC2, IQ2000BF_SFMT_CFC0 },
136   { IQ2000_INSN_CTC3, IQ2000BF_INSN_CTC3, IQ2000BF_SFMT_CFC0 },
137   { IQ2000_INSN_JCR, IQ2000BF_INSN_JCR, IQ2000BF_SFMT_BCTXT },
138   { IQ2000_INSN_LUC32, IQ2000BF_INSN_LUC32, IQ2000BF_SFMT_CFC0 },
139   { IQ2000_INSN_LUC32L, IQ2000BF_INSN_LUC32L, IQ2000BF_SFMT_CFC0 },
140   { IQ2000_INSN_LUC64, IQ2000BF_INSN_LUC64, IQ2000BF_SFMT_CFC0 },
141   { IQ2000_INSN_LUC64L, IQ2000BF_INSN_LUC64L, IQ2000BF_SFMT_CFC0 },
142   { IQ2000_INSN_LUK, IQ2000BF_INSN_LUK, IQ2000BF_SFMT_CFC0 },
143   { IQ2000_INSN_LULCK, IQ2000BF_INSN_LULCK, IQ2000BF_SFMT_CFC0 },
144   { IQ2000_INSN_LUM32, IQ2000BF_INSN_LUM32, IQ2000BF_SFMT_CFC0 },
145   { IQ2000_INSN_LUM32L, IQ2000BF_INSN_LUM32L, IQ2000BF_SFMT_CFC0 },
146   { IQ2000_INSN_LUM64, IQ2000BF_INSN_LUM64, IQ2000BF_SFMT_CFC0 },
147   { IQ2000_INSN_LUM64L, IQ2000BF_INSN_LUM64L, IQ2000BF_SFMT_CFC0 },
148   { IQ2000_INSN_LUR, IQ2000BF_INSN_LUR, IQ2000BF_SFMT_CFC0 },
149   { IQ2000_INSN_LURL, IQ2000BF_INSN_LURL, IQ2000BF_SFMT_CFC0 },
150   { IQ2000_INSN_LUULCK, IQ2000BF_INSN_LUULCK, IQ2000BF_SFMT_CFC0 },
151   { IQ2000_INSN_MFC0, IQ2000BF_INSN_MFC0, IQ2000BF_SFMT_CFC0 },
152   { IQ2000_INSN_MFC1, IQ2000BF_INSN_MFC1, IQ2000BF_SFMT_CFC0 },
153   { IQ2000_INSN_MFC2, IQ2000BF_INSN_MFC2, IQ2000BF_SFMT_CFC0 },
154   { IQ2000_INSN_MFC3, IQ2000BF_INSN_MFC3, IQ2000BF_SFMT_CFC0 },
155   { IQ2000_INSN_MTC0, IQ2000BF_INSN_MTC0, IQ2000BF_SFMT_CFC0 },
156   { IQ2000_INSN_MTC1, IQ2000BF_INSN_MTC1, IQ2000BF_SFMT_CFC0 },
157   { IQ2000_INSN_MTC2, IQ2000BF_INSN_MTC2, IQ2000BF_SFMT_CFC0 },
158   { IQ2000_INSN_MTC3, IQ2000BF_INSN_MTC3, IQ2000BF_SFMT_CFC0 },
159   { IQ2000_INSN_PKRL, IQ2000BF_INSN_PKRL, IQ2000BF_SFMT_CFC0 },
160   { IQ2000_INSN_PKRLR1, IQ2000BF_INSN_PKRLR1, IQ2000BF_SFMT_CFC0 },
161   { IQ2000_INSN_PKRLR30, IQ2000BF_INSN_PKRLR30, IQ2000BF_SFMT_CFC0 },
162   { IQ2000_INSN_RB, IQ2000BF_INSN_RB, IQ2000BF_SFMT_CFC0 },
163   { IQ2000_INSN_RBR1, IQ2000BF_INSN_RBR1, IQ2000BF_SFMT_CFC0 },
164   { IQ2000_INSN_RBR30, IQ2000BF_INSN_RBR30, IQ2000BF_SFMT_CFC0 },
165   { IQ2000_INSN_RFE, IQ2000BF_INSN_RFE, IQ2000BF_SFMT_CFC0 },
166   { IQ2000_INSN_RX, IQ2000BF_INSN_RX, IQ2000BF_SFMT_CFC0 },
167   { IQ2000_INSN_RXR1, IQ2000BF_INSN_RXR1, IQ2000BF_SFMT_CFC0 },
168   { IQ2000_INSN_RXR30, IQ2000BF_INSN_RXR30, IQ2000BF_SFMT_CFC0 },
169   { IQ2000_INSN_SLEEP, IQ2000BF_INSN_SLEEP, IQ2000BF_SFMT_CFC0 },
170   { IQ2000_INSN_SRRD, IQ2000BF_INSN_SRRD, IQ2000BF_SFMT_CFC0 },
171   { IQ2000_INSN_SRRDL, IQ2000BF_INSN_SRRDL, IQ2000BF_SFMT_CFC0 },
172   { IQ2000_INSN_SRULCK, IQ2000BF_INSN_SRULCK, IQ2000BF_SFMT_CFC0 },
173   { IQ2000_INSN_SRWR, IQ2000BF_INSN_SRWR, IQ2000BF_SFMT_CFC0 },
174   { IQ2000_INSN_SRWRU, IQ2000BF_INSN_SRWRU, IQ2000BF_SFMT_CFC0 },
175   { IQ2000_INSN_TRAPQFL, IQ2000BF_INSN_TRAPQFL, IQ2000BF_SFMT_CFC0 },
176   { IQ2000_INSN_TRAPQNE, IQ2000BF_INSN_TRAPQNE, IQ2000BF_SFMT_CFC0 },
177   { IQ2000_INSN_TRAPREL, IQ2000BF_INSN_TRAPREL, IQ2000BF_SFMT_CFC0 },
178   { IQ2000_INSN_WB, IQ2000BF_INSN_WB, IQ2000BF_SFMT_CFC0 },
179   { IQ2000_INSN_WBU, IQ2000BF_INSN_WBU, IQ2000BF_SFMT_CFC0 },
180   { IQ2000_INSN_WBR1, IQ2000BF_INSN_WBR1, IQ2000BF_SFMT_CFC0 },
181   { IQ2000_INSN_WBR1U, IQ2000BF_INSN_WBR1U, IQ2000BF_SFMT_CFC0 },
182   { IQ2000_INSN_WBR30, IQ2000BF_INSN_WBR30, IQ2000BF_SFMT_CFC0 },
183   { IQ2000_INSN_WBR30U, IQ2000BF_INSN_WBR30U, IQ2000BF_SFMT_CFC0 },
184   { IQ2000_INSN_WX, IQ2000BF_INSN_WX, IQ2000BF_SFMT_CFC0 },
185   { IQ2000_INSN_WXU, IQ2000BF_INSN_WXU, IQ2000BF_SFMT_CFC0 },
186   { IQ2000_INSN_WXR1, IQ2000BF_INSN_WXR1, IQ2000BF_SFMT_CFC0 },
187   { IQ2000_INSN_WXR1U, IQ2000BF_INSN_WXR1U, IQ2000BF_SFMT_CFC0 },
188   { IQ2000_INSN_WXR30, IQ2000BF_INSN_WXR30, IQ2000BF_SFMT_CFC0 },
189   { IQ2000_INSN_WXR30U, IQ2000BF_INSN_WXR30U, IQ2000BF_SFMT_CFC0 },
190   { IQ2000_INSN_LDW, IQ2000BF_INSN_LDW, IQ2000BF_SFMT_LDW },
191   { IQ2000_INSN_SDW, IQ2000BF_INSN_SDW, IQ2000BF_SFMT_SDW },
192   { IQ2000_INSN_J, IQ2000BF_INSN_J, IQ2000BF_SFMT_J },
193   { IQ2000_INSN_JAL, IQ2000BF_INSN_JAL, IQ2000BF_SFMT_JAL },
194   { IQ2000_INSN_BMB, IQ2000BF_INSN_BMB, IQ2000BF_SFMT_BBV },
195 };
196 
197 static const struct insn_sem iq2000bf_insn_sem_invalid =
198 {
199   VIRTUAL_INSN_X_INVALID, IQ2000BF_INSN_X_INVALID, IQ2000BF_SFMT_EMPTY
200 };
201 
202 /* Initialize an IDESC from the compile-time computable parts.  */
203 
204 static INLINE void
205 init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
206 {
207   const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
208 
209   id->num = t->index;
210   id->sfmt = t->sfmt;
211   if ((int) t->type <= 0)
212     id->idata = & cgen_virtual_insn_table[- (int) t->type];
213   else
214     id->idata = & insn_table[t->type];
215   id->attrs = CGEN_INSN_ATTRS (id->idata);
216   /* Oh my god, a magic number.  */
217   id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
218 
219 #if WITH_PROFILE_MODEL_P
220   id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
221   {
222     SIM_DESC sd = CPU_STATE (cpu);
223     SIM_ASSERT (t->index == id->timing->num);
224   }
225 #endif
226 
227   /* Semantic pointers are initialized elsewhere.  */
228 }
229 
230 /* Initialize the instruction descriptor table.  */
231 
232 void
233 iq2000bf_init_idesc_table (SIM_CPU *cpu)
234 {
235   IDESC *id,*tabend;
236   const struct insn_sem *t,*tend;
237   int tabsize = IQ2000BF_INSN__MAX;
238   IDESC *table = iq2000bf_insn_data;
239 
240   memset (table, 0, tabsize * sizeof (IDESC));
241 
242   /* First set all entries to the `invalid insn'.  */
243   t = & iq2000bf_insn_sem_invalid;
244   for (id = table, tabend = table + tabsize; id < tabend; ++id)
245     init_idesc (cpu, id, t);
246 
247   /* Now fill in the values for the chosen cpu.  */
248   for (t = iq2000bf_insn_sem, tend = t + ARRAY_SIZE (iq2000bf_insn_sem);
249        t != tend; ++t)
250     {
251       init_idesc (cpu, & table[t->index], t);
252     }
253 
254   /* Link the IDESC table into the cpu.  */
255   CPU_IDESC (cpu) = table;
256 }
257 
258 /* Given an instruction, return a pointer to its IDESC entry.  */
259 
260 const IDESC *
261 iq2000bf_decode (SIM_CPU *current_cpu, IADDR pc,
262               CGEN_INSN_WORD base_insn, CGEN_INSN_WORD entire_insn,
263               ARGBUF *abuf)
264 {
265   /* Result of decoder.  */
266   IQ2000BF_INSN_TYPE itype;
267 
268   {
269     CGEN_INSN_WORD insn = base_insn;
270 
271     {
272       unsigned int val0 = (((insn >> 26) & (63 << 0)));
273       switch (val0)
274       {
275       case 0:
276         {
277           unsigned int val1 = (((insn >> 1) & (1 << 4)) | ((insn >> 0) & (15 << 0)));
278           switch (val1)
279           {
280           case 0:
281             if ((entire_insn & 0xffe0003f) == 0x0)
282               { itype = IQ2000BF_INSN_SLL; goto extract_sfmt_sll; }
283             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
284           case 1:
285             if ((entire_insn & 0xfc00003f) == 0x1)
286               { itype = IQ2000BF_INSN_SLMV; goto extract_sfmt_slmv; }
287             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
288           case 2:
289             if ((entire_insn & 0xffe0003f) == 0x2)
290               { itype = IQ2000BF_INSN_SRL; goto extract_sfmt_sll; }
291             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
292           case 3:
293             if ((entire_insn & 0xffe0003f) == 0x3)
294               { itype = IQ2000BF_INSN_SRA; goto extract_sfmt_sll; }
295             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
296           case 4:
297             if ((entire_insn & 0xfc0007ff) == 0x4)
298               { itype = IQ2000BF_INSN_SLLV; goto extract_sfmt_add; }
299             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
300           case 5:
301             if ((entire_insn & 0xfc00003f) == 0x5)
302               { itype = IQ2000BF_INSN_SRMV; goto extract_sfmt_slmv; }
303             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
304           case 6:
305             if ((entire_insn & 0xfc0007ff) == 0x6)
306               { itype = IQ2000BF_INSN_SRLV; goto extract_sfmt_add; }
307             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
308           case 7:
309             if ((entire_insn & 0xfc0007ff) == 0x7)
310               { itype = IQ2000BF_INSN_SRAV; goto extract_sfmt_add; }
311             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
312           case 8:
313             if ((entire_insn & 0xfc1fffff) == 0x8)
314               { itype = IQ2000BF_INSN_JR; goto extract_sfmt_jr; }
315             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
316           case 9:
317             if ((entire_insn & 0xfc1f07ff) == 0x9)
318               { itype = IQ2000BF_INSN_JALR; goto extract_sfmt_jalr; }
319             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
320           case 10:
321             if ((entire_insn & 0xfc1fffff) == 0xa)
322               { itype = IQ2000BF_INSN_JCR; goto extract_sfmt_bctxt; }
323             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
324           case 12:
325             if ((entire_insn & 0xfc00003f) == 0xc)
326               { itype = IQ2000BF_INSN_SYSCALL; goto extract_sfmt_break; }
327             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
328           case 13:
329             if ((entire_insn & 0xffffffff) == 0xd)
330               { itype = IQ2000BF_INSN_BREAK; goto extract_sfmt_break; }
331             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
332           case 14:
333             if ((entire_insn & 0xfc00003f) == 0xe)
334               { itype = IQ2000BF_INSN_SLEEP; goto extract_sfmt_cfc0; }
335             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
336           case 16:
337             if ((entire_insn & 0xfc0007ff) == 0x20)
338               { itype = IQ2000BF_INSN_ADD; goto extract_sfmt_add; }
339             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
340           case 17:
341             if ((entire_insn & 0xfc0007ff) == 0x21)
342               { itype = IQ2000BF_INSN_ADDU; goto extract_sfmt_add; }
343             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
344           case 18:
345             if ((entire_insn & 0xfc0007ff) == 0x22)
346               { itype = IQ2000BF_INSN_SUB; goto extract_sfmt_add; }
347             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
348           case 19:
349             if ((entire_insn & 0xfc0007ff) == 0x23)
350               { itype = IQ2000BF_INSN_SUBU; goto extract_sfmt_add; }
351             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
352           case 20:
353             if ((entire_insn & 0xfc0007ff) == 0x24)
354               { itype = IQ2000BF_INSN_AND; goto extract_sfmt_add; }
355             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
356           case 21:
357             if ((entire_insn & 0xfc0007ff) == 0x25)
358               { itype = IQ2000BF_INSN_OR; goto extract_sfmt_add; }
359             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
360           case 22:
361             if ((entire_insn & 0xfc0007ff) == 0x26)
362               { itype = IQ2000BF_INSN_XOR; goto extract_sfmt_add; }
363             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
364           case 23:
365             if ((entire_insn & 0xfc0007ff) == 0x27)
366               { itype = IQ2000BF_INSN_NOR; goto extract_sfmt_add; }
367             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
368           case 25:
369             if ((entire_insn & 0xfc0007ff) == 0x29)
370               { itype = IQ2000BF_INSN_ADO16; goto extract_sfmt_add; }
371             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
372           case 26:
373             if ((entire_insn & 0xfc0007ff) == 0x2a)
374               { itype = IQ2000BF_INSN_SLT; goto extract_sfmt_slt; }
375             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
376           case 27:
377             if ((entire_insn & 0xfc0007ff) == 0x2b)
378               { itype = IQ2000BF_INSN_SLTU; goto extract_sfmt_slt; }
379             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
380           case 29:
381             if ((entire_insn & 0xfc00043f) == 0x2d)
382               { itype = IQ2000BF_INSN_MRGB; goto extract_sfmt_mrgb; }
383             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
384           default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
385           }
386         }
387       case 1:
388         {
389           unsigned int val1 = (((insn >> 17) & (1 << 3)) | ((insn >> 16) & (7 << 0)));
390           switch (val1)
391           {
392           case 0:
393             if ((entire_insn & 0xfc1f0000) == 0x4000000)
394               { itype = IQ2000BF_INSN_BLTZ; goto extract_sfmt_bgez; }
395             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
396           case 1:
397             if ((entire_insn & 0xfc1f0000) == 0x4010000)
398               { itype = IQ2000BF_INSN_BGEZ; goto extract_sfmt_bgez; }
399             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
400           case 2:
401             if ((entire_insn & 0xfc1f0000) == 0x4020000)
402               { itype = IQ2000BF_INSN_BLTZL; goto extract_sfmt_bgez; }
403             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
404           case 3:
405             if ((entire_insn & 0xfc1f0000) == 0x4030000)
406               { itype = IQ2000BF_INSN_BGEZL; goto extract_sfmt_bgez; }
407             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
408           case 6:
409             if ((entire_insn & 0xfc1f0000) == 0x4060000)
410               { itype = IQ2000BF_INSN_BCTXT; goto extract_sfmt_bctxt; }
411             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
412           case 8:
413             if ((entire_insn & 0xfc1f0000) == 0x4100000)
414               { itype = IQ2000BF_INSN_BLTZAL; goto extract_sfmt_bgezal; }
415             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
416           case 9:
417             if ((entire_insn & 0xfc1f0000) == 0x4110000)
418               { itype = IQ2000BF_INSN_BGEZAL; goto extract_sfmt_bgezal; }
419             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
420           case 10:
421             if ((entire_insn & 0xfc1f0000) == 0x4120000)
422               { itype = IQ2000BF_INSN_BLTZALL; goto extract_sfmt_bgezal; }
423             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
424           case 11:
425             if ((entire_insn & 0xfc1f0000) == 0x4130000)
426               { itype = IQ2000BF_INSN_BGEZALL; goto extract_sfmt_bgezal; }
427             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
428           default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
429           }
430         }
431       case 2:
432         if ((entire_insn & 0xffff0000) == 0x8000000)
433           { itype = IQ2000BF_INSN_J; goto extract_sfmt_j; }
434         itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
435       case 3:
436         if ((entire_insn & 0xffff0000) == 0xc000000)
437           { itype = IQ2000BF_INSN_JAL; goto extract_sfmt_jal; }
438         itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
439       case 4: itype = IQ2000BF_INSN_BEQ; goto extract_sfmt_bbv;
440       case 5: itype = IQ2000BF_INSN_BNE; goto extract_sfmt_bbv;
441       case 6:
442         if ((entire_insn & 0xfc1f0000) == 0x18000000)
443           { itype = IQ2000BF_INSN_BLEZ; goto extract_sfmt_bgez; }
444         itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
445       case 7:
446         if ((entire_insn & 0xfc1f0000) == 0x1c000000)
447           { itype = IQ2000BF_INSN_BGTZ; goto extract_sfmt_bgez; }
448         itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
449       case 8: itype = IQ2000BF_INSN_ADDI; goto extract_sfmt_addi;
450       case 9: itype = IQ2000BF_INSN_ADDIU; goto extract_sfmt_addi;
451       case 10: itype = IQ2000BF_INSN_SLTI; goto extract_sfmt_slti;
452       case 11: itype = IQ2000BF_INSN_SLTIU; goto extract_sfmt_slti;
453       case 12: itype = IQ2000BF_INSN_ANDI; goto extract_sfmt_addi;
454       case 13: itype = IQ2000BF_INSN_ORI; goto extract_sfmt_addi;
455       case 14: itype = IQ2000BF_INSN_XORI; goto extract_sfmt_addi;
456       case 15:
457         if ((entire_insn & 0xffe00000) == 0x3c000000)
458           { itype = IQ2000BF_INSN_LUI; goto extract_sfmt_lui; }
459         itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
460       case 16:
461         {
462           unsigned int val1 = (((insn >> 19) & (15 << 3)) | ((insn >> 15) & (3 << 1)) | ((insn >> 4) & (1 << 0)));
463           switch (val1)
464           {
465           case 0:
466           case 2:
467           case 4:
468           case 6:
469             if ((entire_insn & 0xffe007ff) == 0x40000000)
470               { itype = IQ2000BF_INSN_MFC0; goto extract_sfmt_cfc0; }
471             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
472           case 8:
473           case 10:
474           case 12:
475           case 14:
476             if ((entire_insn & 0xffe007ff) == 0x40400000)
477               { itype = IQ2000BF_INSN_CFC0; goto extract_sfmt_cfc0; }
478             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
479           case 16:
480           case 18:
481           case 20:
482           case 22:
483             if ((entire_insn & 0xffe007ff) == 0x40800000)
484               { itype = IQ2000BF_INSN_MTC0; goto extract_sfmt_cfc0; }
485             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
486           case 24:
487           case 26:
488           case 28:
489           case 30:
490             if ((entire_insn & 0xffe007ff) == 0x40c00000)
491               { itype = IQ2000BF_INSN_CTC0; goto extract_sfmt_cfc0; }
492             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
493           case 32:
494           case 33:
495             if ((entire_insn & 0xffff0000) == 0x41000000)
496               { itype = IQ2000BF_INSN_BC0F; goto extract_sfmt_bctxt; }
497             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
498           case 34:
499           case 35:
500             if ((entire_insn & 0xffff0000) == 0x41010000)
501               { itype = IQ2000BF_INSN_BC0T; goto extract_sfmt_bctxt; }
502             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
503           case 36:
504           case 37:
505             if ((entire_insn & 0xffff0000) == 0x41020000)
506               { itype = IQ2000BF_INSN_BC0FL; goto extract_sfmt_bctxt; }
507             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
508           case 38:
509           case 39:
510             if ((entire_insn & 0xffff0000) == 0x41030000)
511               { itype = IQ2000BF_INSN_BC0TL; goto extract_sfmt_bctxt; }
512             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
513           case 65:
514             if ((entire_insn & 0xffffffff) == 0x42000010)
515               { itype = IQ2000BF_INSN_RFE; goto extract_sfmt_cfc0; }
516             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
517           default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
518           }
519         }
520       case 17:
521         {
522           unsigned int val1 = (((insn >> 22) & (3 << 0)));
523           switch (val1)
524           {
525           case 0:
526             if ((entire_insn & 0xffe007ff) == 0x44000000)
527               { itype = IQ2000BF_INSN_MFC1; goto extract_sfmt_cfc0; }
528             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
529           case 1:
530             if ((entire_insn & 0xffe007ff) == 0x44400000)
531               { itype = IQ2000BF_INSN_CFC1; goto extract_sfmt_cfc0; }
532             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
533           case 2:
534             if ((entire_insn & 0xffe007ff) == 0x44800000)
535               { itype = IQ2000BF_INSN_MTC1; goto extract_sfmt_cfc0; }
536             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
537           case 3:
538             if ((entire_insn & 0xffe007ff) == 0x44c00000)
539               { itype = IQ2000BF_INSN_CTC1; goto extract_sfmt_cfc0; }
540             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
541           default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
542           }
543         }
544       case 18:
545         {
546           unsigned int val1 = (((insn >> 16) & (3 << 5)) | ((insn >> 0) & (31 << 0)));
547           switch (val1)
548           {
549           case 0:
550             {
551               unsigned int val2 = (((insn >> 23) & (1 << 0)));
552               switch (val2)
553               {
554               case 0:
555                 if ((entire_insn & 0xffe007ff) == 0x48000000)
556                   { itype = IQ2000BF_INSN_MFC2; goto extract_sfmt_cfc0; }
557                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
558               case 1:
559                 if ((entire_insn & 0xffe007ff) == 0x48800000)
560                   { itype = IQ2000BF_INSN_MTC2; goto extract_sfmt_cfc0; }
561                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
562               default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
563               }
564             }
565           case 32:
566             if ((entire_insn & 0xffe0ffff) == 0x48200000)
567               { itype = IQ2000BF_INSN_LUULCK; goto extract_sfmt_cfc0; }
568             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
569           case 33:
570             if ((entire_insn & 0xffe007ff) == 0x48200001)
571               { itype = IQ2000BF_INSN_LUR; goto extract_sfmt_cfc0; }
572             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
573           case 34:
574             if ((entire_insn & 0xffe007ff) == 0x48200002)
575               { itype = IQ2000BF_INSN_LUM32; goto extract_sfmt_cfc0; }
576             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
577           case 35:
578             if ((entire_insn & 0xffe007ff) == 0x48200003)
579               { itype = IQ2000BF_INSN_LUC32; goto extract_sfmt_cfc0; }
580             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
581           case 36:
582             if ((entire_insn & 0xffe0ffff) == 0x48200004)
583               { itype = IQ2000BF_INSN_LULCK; goto extract_sfmt_cfc0; }
584             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
585           case 37:
586             if ((entire_insn & 0xffe007ff) == 0x48200005)
587               { itype = IQ2000BF_INSN_LURL; goto extract_sfmt_cfc0; }
588             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
589           case 38:
590             if ((entire_insn & 0xffe007ff) == 0x48200006)
591               { itype = IQ2000BF_INSN_LUM32L; goto extract_sfmt_cfc0; }
592             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
593           case 39:
594             if ((entire_insn & 0xffe007ff) == 0x48200007)
595               { itype = IQ2000BF_INSN_LUC32L; goto extract_sfmt_cfc0; }
596             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
597           case 40:
598             if ((entire_insn & 0xffe007ff) == 0x48200008)
599               { itype = IQ2000BF_INSN_LUK; goto extract_sfmt_cfc0; }
600             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
601           case 42:
602             if ((entire_insn & 0xffe007ff) == 0x4820000a)
603               { itype = IQ2000BF_INSN_LUM64; goto extract_sfmt_cfc0; }
604             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
605           case 43:
606             if ((entire_insn & 0xffe007ff) == 0x4820000b)
607               { itype = IQ2000BF_INSN_LUC64; goto extract_sfmt_cfc0; }
608             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
609           case 46:
610             if ((entire_insn & 0xffe007ff) == 0x4820000e)
611               { itype = IQ2000BF_INSN_LUM64L; goto extract_sfmt_cfc0; }
612             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
613           case 47:
614             if ((entire_insn & 0xffe007ff) == 0x4820000f)
615               { itype = IQ2000BF_INSN_LUC64L; goto extract_sfmt_cfc0; }
616             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
617           case 48:
618             if ((entire_insn & 0xffe0ffff) == 0x48200010)
619               { itype = IQ2000BF_INSN_SRRD; goto extract_sfmt_cfc0; }
620             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
621           case 49:
622             if ((entire_insn & 0xffe007ff) == 0x48200011)
623               { itype = IQ2000BF_INSN_SRWR; goto extract_sfmt_cfc0; }
624             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
625           case 52:
626             if ((entire_insn & 0xffe0ffff) == 0x48200014)
627               { itype = IQ2000BF_INSN_SRRDL; goto extract_sfmt_cfc0; }
628             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
629           case 53:
630             if ((entire_insn & 0xffe007ff) == 0x48200015)
631               { itype = IQ2000BF_INSN_SRWRU; goto extract_sfmt_cfc0; }
632             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
633           case 54:
634             if ((entire_insn & 0xffe0ffff) == 0x48200016)
635               { itype = IQ2000BF_INSN_SRULCK; goto extract_sfmt_cfc0; }
636             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
637           case 64:
638             {
639               unsigned int val2 = (((insn >> 23) & (1 << 0)));
640               switch (val2)
641               {
642               case 0:
643                 if ((entire_insn & 0xffe007ff) == 0x48400000)
644                   { itype = IQ2000BF_INSN_CFC2; goto extract_sfmt_cfc0; }
645                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
646               case 1:
647                 if ((entire_insn & 0xffe007ff) == 0x48c00000)
648                   { itype = IQ2000BF_INSN_CTC2; goto extract_sfmt_cfc0; }
649                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
650               default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
651               }
652             }
653           default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
654           }
655         }
656       case 19:
657         {
658           unsigned int val1 = (((insn >> 19) & (31 << 2)) | ((insn >> 0) & (3 << 0)));
659           switch (val1)
660           {
661           case 0:
662             if ((entire_insn & 0xffe007ff) == 0x4c000000)
663               { itype = IQ2000BF_INSN_MFC3; goto extract_sfmt_cfc0; }
664             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
665           case 4:
666             {
667               unsigned int val2 = (((insn >> 2) & (3 << 0)));
668               switch (val2)
669               {
670               case 0:
671                 if ((entire_insn & 0xffe007ff) == 0x4c200000)
672                   { itype = IQ2000BF_INSN_WB; goto extract_sfmt_cfc0; }
673                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
674               case 1:
675                 if ((entire_insn & 0xffe007ff) == 0x4c200004)
676                   { itype = IQ2000BF_INSN_RB; goto extract_sfmt_cfc0; }
677                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
678               case 2:
679                 if ((entire_insn & 0xffffffff) == 0x4c200008)
680                   { itype = IQ2000BF_INSN_TRAPQFL; goto extract_sfmt_cfc0; }
681                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
682               default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
683               }
684             }
685           case 5:
686             {
687               unsigned int val2 = (((insn >> 3) & (1 << 0)));
688               switch (val2)
689               {
690               case 0:
691                 if ((entire_insn & 0xffe007ff) == 0x4c200001)
692                   { itype = IQ2000BF_INSN_WBU; goto extract_sfmt_cfc0; }
693                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
694               case 1:
695                 if ((entire_insn & 0xffffffff) == 0x4c200009)
696                   { itype = IQ2000BF_INSN_TRAPQNE; goto extract_sfmt_cfc0; }
697                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
698               default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
699               }
700             }
701           case 6:
702             {
703               unsigned int val2 = (((insn >> 2) & (3 << 0)));
704               switch (val2)
705               {
706               case 0:
707                 if ((entire_insn & 0xffe007ff) == 0x4c200002)
708                   { itype = IQ2000BF_INSN_WX; goto extract_sfmt_cfc0; }
709                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
710               case 1:
711                 if ((entire_insn & 0xffe007ff) == 0x4c200006)
712                   { itype = IQ2000BF_INSN_RX; goto extract_sfmt_cfc0; }
713                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
714               case 2:
715                 if ((entire_insn & 0xffe0ffff) == 0x4c20000a)
716                   { itype = IQ2000BF_INSN_TRAPREL; goto extract_sfmt_cfc0; }
717                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
718               default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
719               }
720             }
721           case 7:
722             {
723               unsigned int val2 = (((insn >> 2) & (1 << 0)));
724               switch (val2)
725               {
726               case 0:
727                 if ((entire_insn & 0xffe007ff) == 0x4c200003)
728                   { itype = IQ2000BF_INSN_WXU; goto extract_sfmt_cfc0; }
729                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
730               case 1:
731                 if ((entire_insn & 0xffe007ff) == 0x4c200007)
732                   { itype = IQ2000BF_INSN_PKRL; goto extract_sfmt_cfc0; }
733                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
734               default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
735               }
736             }
737           case 8:
738             if ((entire_insn & 0xffe007ff) == 0x4c400000)
739               { itype = IQ2000BF_INSN_CFC3; goto extract_sfmt_cfc0; }
740             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
741           case 16:
742             if ((entire_insn & 0xffe007ff) == 0x4c800000)
743               { itype = IQ2000BF_INSN_MTC3; goto extract_sfmt_cfc0; }
744             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
745           case 24:
746             if ((entire_insn & 0xffe007ff) == 0x4cc00000)
747               { itype = IQ2000BF_INSN_CTC3; goto extract_sfmt_cfc0; }
748             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
749           case 32:
750           case 33:
751           case 34:
752           case 35:
753             {
754               unsigned int val2 = (((insn >> 16) & (3 << 0)));
755               switch (val2)
756               {
757               case 0:
758                 if ((entire_insn & 0xffff0000) == 0x4d000000)
759                   { itype = IQ2000BF_INSN_BC3F; goto extract_sfmt_bctxt; }
760                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
761               case 1:
762                 if ((entire_insn & 0xffff0000) == 0x4d010000)
763                   { itype = IQ2000BF_INSN_BC3T; goto extract_sfmt_bctxt; }
764                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
765               case 2:
766                 if ((entire_insn & 0xffff0000) == 0x4d020000)
767                   { itype = IQ2000BF_INSN_BC3FL; goto extract_sfmt_bctxt; }
768                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
769               case 3:
770                 if ((entire_insn & 0xffff0000) == 0x4d030000)
771                   { itype = IQ2000BF_INSN_BC3TL; goto extract_sfmt_bctxt; }
772                 itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
773               default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
774               }
775             }
776           case 36:
777             if ((entire_insn & 0xffe007ff) == 0x4d200000)
778               { itype = IQ2000BF_INSN_CHKHDR; goto extract_sfmt_cfc0; }
779             itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
780           case 64:
781           case 65:
782           case 66:
783           case 67: itype = IQ2000BF_INSN_WBR1; goto extract_sfmt_cfc0;
784           case 68:
785           case 69:
786           case 70:
787           case 71: itype = IQ2000BF_INSN_WBR1U; goto extract_sfmt_cfc0;
788           case 72:
789           case 73:
790           case 74:
791           case 75: itype = IQ2000BF_INSN_WBR30; goto extract_sfmt_cfc0;
792           case 76:
793           case 77:
794           case 78:
795           case 79: itype = IQ2000BF_INSN_WBR30U; goto extract_sfmt_cfc0;
796           case 80:
797           case 81:
798           case 82:
799           case 83: itype = IQ2000BF_INSN_WXR1; goto extract_sfmt_cfc0;
800           case 84:
801           case 85:
802           case 86:
803           case 87: itype = IQ2000BF_INSN_WXR1U; goto extract_sfmt_cfc0;
804           case 88:
805           case 89:
806           case 90:
807           case 91: itype = IQ2000BF_INSN_WXR30; goto extract_sfmt_cfc0;
808           case 92:
809           case 93:
810           case 94:
811           case 95: itype = IQ2000BF_INSN_WXR30U; goto extract_sfmt_cfc0;
812           case 96:
813           case 97:
814           case 98:
815           case 99: itype = IQ2000BF_INSN_RBR1; goto extract_sfmt_cfc0;
816           case 104:
817           case 105:
818           case 106:
819           case 107: itype = IQ2000BF_INSN_RBR30; goto extract_sfmt_cfc0;
820           case 112:
821           case 113:
822           case 114:
823           case 115: itype = IQ2000BF_INSN_RXR1; goto extract_sfmt_cfc0;
824           case 116:
825           case 117:
826           case 118:
827           case 119: itype = IQ2000BF_INSN_PKRLR1; goto extract_sfmt_cfc0;
828           case 120:
829           case 121:
830           case 122:
831           case 123: itype = IQ2000BF_INSN_RXR30; goto extract_sfmt_cfc0;
832           case 124:
833           case 125:
834           case 126:
835           case 127: itype = IQ2000BF_INSN_PKRLR30; goto extract_sfmt_cfc0;
836           default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
837           }
838         }
839       case 20: itype = IQ2000BF_INSN_BEQL; goto extract_sfmt_bbv;
840       case 21: itype = IQ2000BF_INSN_BNEL; goto extract_sfmt_bbv;
841       case 22:
842         if ((entire_insn & 0xfc1f0000) == 0x58000000)
843           { itype = IQ2000BF_INSN_BLEZL; goto extract_sfmt_bgez; }
844         itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
845       case 23:
846         if ((entire_insn & 0xfc1f0000) == 0x5c000000)
847           { itype = IQ2000BF_INSN_BGTZL; goto extract_sfmt_bgez; }
848         itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
849       case 24: itype = IQ2000BF_INSN_BMB0; goto extract_sfmt_bbv;
850       case 25: itype = IQ2000BF_INSN_BMB1; goto extract_sfmt_bbv;
851       case 26: itype = IQ2000BF_INSN_BMB2; goto extract_sfmt_bbv;
852       case 27: itype = IQ2000BF_INSN_BMB3; goto extract_sfmt_bbv;
853       case 28: itype = IQ2000BF_INSN_BBI; goto extract_sfmt_bbi;
854       case 29: itype = IQ2000BF_INSN_BBV; goto extract_sfmt_bbv;
855       case 30: itype = IQ2000BF_INSN_BBIN; goto extract_sfmt_bbi;
856       case 31: itype = IQ2000BF_INSN_BBVN; goto extract_sfmt_bbv;
857       case 32: itype = IQ2000BF_INSN_LB; goto extract_sfmt_lb;
858       case 33: itype = IQ2000BF_INSN_LH; goto extract_sfmt_lh;
859       case 35: itype = IQ2000BF_INSN_LW; goto extract_sfmt_lw;
860       case 36: itype = IQ2000BF_INSN_LBU; goto extract_sfmt_lb;
861       case 37: itype = IQ2000BF_INSN_LHU; goto extract_sfmt_lh;
862       case 39:
863         if ((entire_insn & 0xfc000020) == 0x9c000000)
864           { itype = IQ2000BF_INSN_RAM; goto extract_sfmt_ram; }
865         itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
866       case 40: itype = IQ2000BF_INSN_SB; goto extract_sfmt_sb;
867       case 41: itype = IQ2000BF_INSN_SH; goto extract_sfmt_sh;
868       case 43: itype = IQ2000BF_INSN_SW; goto extract_sfmt_sw;
869       case 44: itype = IQ2000BF_INSN_ANDOI; goto extract_sfmt_addi;
870       case 45: itype = IQ2000BF_INSN_BMB; goto extract_sfmt_bbv;
871       case 47: itype = IQ2000BF_INSN_ORUI; goto extract_sfmt_andoui;
872       case 48: itype = IQ2000BF_INSN_LDW; goto extract_sfmt_ldw;
873       case 56: itype = IQ2000BF_INSN_SDW; goto extract_sfmt_sdw;
874       case 63: itype = IQ2000BF_INSN_ANDOUI; goto extract_sfmt_andoui;
875       default: itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
876       }
877     }
878   }
879 
880   /* The instruction has been decoded, now extract the fields.  */
881 
882  extract_sfmt_empty:
883   {
884     const IDESC *idesc = &iq2000bf_insn_data[itype];
885 #define FLD(f) abuf->fields.sfmt_empty.f
886 
887 
888   /* Record the fields for the semantic handler.  */
889   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
890 
891 #undef FLD
892     return idesc;
893   }
894 
895  extract_sfmt_add:
896   {
897     const IDESC *idesc = &iq2000bf_insn_data[itype];
898     CGEN_INSN_WORD insn = entire_insn;
899 #define FLD(f) abuf->fields.sfmt_mrgb.f
900     UINT f_rs;
901     UINT f_rt;
902     UINT f_rd;
903 
904     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
905     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
906     f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
907 
908   /* Record the fields for the semantic handler.  */
909   FLD (f_rs) = f_rs;
910   FLD (f_rt) = f_rt;
911   FLD (f_rd) = f_rd;
912   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
913 
914 #undef FLD
915     return idesc;
916   }
917 
918  extract_sfmt_addi:
919   {
920     const IDESC *idesc = &iq2000bf_insn_data[itype];
921     CGEN_INSN_WORD insn = entire_insn;
922 #define FLD(f) abuf->fields.sfmt_addi.f
923     UINT f_rs;
924     UINT f_rt;
925     UINT f_imm;
926 
927     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
928     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
929     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
930 
931   /* Record the fields for the semantic handler.  */
932   FLD (f_imm) = f_imm;
933   FLD (f_rs) = f_rs;
934   FLD (f_rt) = f_rt;
935   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_imm 0x%x", 'x', f_imm, "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, (char *) 0));
936 
937 #undef FLD
938     return idesc;
939   }
940 
941  extract_sfmt_ram:
942   {
943     const IDESC *idesc = &iq2000bf_insn_data[itype];
944     CGEN_INSN_WORD insn = entire_insn;
945 #define FLD(f) abuf->fields.sfmt_ram.f
946     UINT f_rs;
947     UINT f_rt;
948     UINT f_rd;
949     UINT f_shamt;
950     UINT f_maskl;
951 
952     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
953     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
954     f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
955     f_shamt = EXTRACT_LSB0_UINT (insn, 32, 10, 5);
956     f_maskl = EXTRACT_LSB0_UINT (insn, 32, 4, 5);
957 
958   /* Record the fields for the semantic handler.  */
959   FLD (f_maskl) = f_maskl;
960   FLD (f_rs) = f_rs;
961   FLD (f_rd) = f_rd;
962   FLD (f_rt) = f_rt;
963   FLD (f_shamt) = f_shamt;
964   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ram", "f_maskl 0x%x", 'x', f_maskl, "f_rs 0x%x", 'x', f_rs, "f_rd 0x%x", 'x', f_rd, "f_rt 0x%x", 'x', f_rt, "f_shamt 0x%x", 'x', f_shamt, (char *) 0));
965 
966 #undef FLD
967     return idesc;
968   }
969 
970  extract_sfmt_sll:
971   {
972     const IDESC *idesc = &iq2000bf_insn_data[itype];
973     CGEN_INSN_WORD insn = entire_insn;
974 #define FLD(f) abuf->fields.sfmt_ram.f
975     UINT f_rt;
976     UINT f_rd;
977     UINT f_shamt;
978 
979     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
980     f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
981     f_shamt = EXTRACT_LSB0_UINT (insn, 32, 10, 5);
982 
983   /* Record the fields for the semantic handler.  */
984   FLD (f_rt) = f_rt;
985   FLD (f_shamt) = f_shamt;
986   FLD (f_rd) = f_rd;
987   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sll", "f_rt 0x%x", 'x', f_rt, "f_shamt 0x%x", 'x', f_shamt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
988 
989 #undef FLD
990     return idesc;
991   }
992 
993  extract_sfmt_slmv:
994   {
995     const IDESC *idesc = &iq2000bf_insn_data[itype];
996     CGEN_INSN_WORD insn = entire_insn;
997 #define FLD(f) abuf->fields.sfmt_ram.f
998     UINT f_rs;
999     UINT f_rt;
1000     UINT f_rd;
1001     UINT f_shamt;
1002 
1003     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1004     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1005     f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
1006     f_shamt = EXTRACT_LSB0_UINT (insn, 32, 10, 5);
1007 
1008   /* Record the fields for the semantic handler.  */
1009   FLD (f_rs) = f_rs;
1010   FLD (f_rt) = f_rt;
1011   FLD (f_shamt) = f_shamt;
1012   FLD (f_rd) = f_rd;
1013   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_slmv", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_shamt 0x%x", 'x', f_shamt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
1014 
1015 #undef FLD
1016     return idesc;
1017   }
1018 
1019  extract_sfmt_slt:
1020   {
1021     const IDESC *idesc = &iq2000bf_insn_data[itype];
1022     CGEN_INSN_WORD insn = entire_insn;
1023 #define FLD(f) abuf->fields.sfmt_mrgb.f
1024     UINT f_rs;
1025     UINT f_rt;
1026     UINT f_rd;
1027 
1028     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1029     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1030     f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
1031 
1032   /* Record the fields for the semantic handler.  */
1033   FLD (f_rs) = f_rs;
1034   FLD (f_rt) = f_rt;
1035   FLD (f_rd) = f_rd;
1036   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_slt", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
1037 
1038 #undef FLD
1039     return idesc;
1040   }
1041 
1042  extract_sfmt_slti:
1043   {
1044     const IDESC *idesc = &iq2000bf_insn_data[itype];
1045     CGEN_INSN_WORD insn = entire_insn;
1046 #define FLD(f) abuf->fields.sfmt_addi.f
1047     UINT f_rs;
1048     UINT f_rt;
1049     UINT f_imm;
1050 
1051     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1052     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1053     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1054 
1055   /* Record the fields for the semantic handler.  */
1056   FLD (f_imm) = f_imm;
1057   FLD (f_rs) = f_rs;
1058   FLD (f_rt) = f_rt;
1059   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_slti", "f_imm 0x%x", 'x', f_imm, "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1060 
1061 #undef FLD
1062     return idesc;
1063   }
1064 
1065  extract_sfmt_bbi:
1066   {
1067     const IDESC *idesc = &iq2000bf_insn_data[itype];
1068     CGEN_INSN_WORD insn = entire_insn;
1069 #define FLD(f) abuf->fields.sfmt_bbi.f
1070     UINT f_rs;
1071     UINT f_rt;
1072     SI f_offset;
1073 
1074     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1075     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1076     f_offset = ((((EXTRACT_LSB0_SINT (insn, 32, 15, 16)) * (4))) + (((pc) + (4))));
1077 
1078   /* Record the fields for the semantic handler.  */
1079   FLD (f_rt) = f_rt;
1080   FLD (f_rs) = f_rs;
1081   FLD (i_offset) = f_offset;
1082   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bbi", "f_rt 0x%x", 'x', f_rt, "f_rs 0x%x", 'x', f_rs, "offset 0x%x", 'x', f_offset, (char *) 0));
1083 
1084 #if WITH_PROFILE_MODEL_P
1085   /* Record the fields for profiling.  */
1086   if (PROFILE_MODEL_P (current_cpu))
1087     {
1088     }
1089 #endif
1090 #undef FLD
1091     return idesc;
1092   }
1093 
1094  extract_sfmt_bbv:
1095   {
1096     const IDESC *idesc = &iq2000bf_insn_data[itype];
1097     CGEN_INSN_WORD insn = entire_insn;
1098 #define FLD(f) abuf->fields.sfmt_bbi.f
1099     UINT f_rs;
1100     UINT f_rt;
1101     SI f_offset;
1102 
1103     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1104     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1105     f_offset = ((((EXTRACT_LSB0_SINT (insn, 32, 15, 16)) * (4))) + (((pc) + (4))));
1106 
1107   /* Record the fields for the semantic handler.  */
1108   FLD (f_rs) = f_rs;
1109   FLD (f_rt) = f_rt;
1110   FLD (i_offset) = f_offset;
1111   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bbv", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "offset 0x%x", 'x', f_offset, (char *) 0));
1112 
1113 #if WITH_PROFILE_MODEL_P
1114   /* Record the fields for profiling.  */
1115   if (PROFILE_MODEL_P (current_cpu))
1116     {
1117     }
1118 #endif
1119 #undef FLD
1120     return idesc;
1121   }
1122 
1123  extract_sfmt_bgez:
1124   {
1125     const IDESC *idesc = &iq2000bf_insn_data[itype];
1126     CGEN_INSN_WORD insn = entire_insn;
1127 #define FLD(f) abuf->fields.sfmt_bbi.f
1128     UINT f_rs;
1129     SI f_offset;
1130 
1131     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1132     f_offset = ((((EXTRACT_LSB0_SINT (insn, 32, 15, 16)) * (4))) + (((pc) + (4))));
1133 
1134   /* Record the fields for the semantic handler.  */
1135   FLD (f_rs) = f_rs;
1136   FLD (i_offset) = f_offset;
1137   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bgez", "f_rs 0x%x", 'x', f_rs, "offset 0x%x", 'x', f_offset, (char *) 0));
1138 
1139 #if WITH_PROFILE_MODEL_P
1140   /* Record the fields for profiling.  */
1141   if (PROFILE_MODEL_P (current_cpu))
1142     {
1143     }
1144 #endif
1145 #undef FLD
1146     return idesc;
1147   }
1148 
1149  extract_sfmt_bgezal:
1150   {
1151     const IDESC *idesc = &iq2000bf_insn_data[itype];
1152     CGEN_INSN_WORD insn = entire_insn;
1153 #define FLD(f) abuf->fields.sfmt_bbi.f
1154     UINT f_rs;
1155     SI f_offset;
1156 
1157     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1158     f_offset = ((((EXTRACT_LSB0_SINT (insn, 32, 15, 16)) * (4))) + (((pc) + (4))));
1159 
1160   /* Record the fields for the semantic handler.  */
1161   FLD (f_rs) = f_rs;
1162   FLD (i_offset) = f_offset;
1163   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bgezal", "f_rs 0x%x", 'x', f_rs, "offset 0x%x", 'x', f_offset, (char *) 0));
1164 
1165 #if WITH_PROFILE_MODEL_P
1166   /* Record the fields for profiling.  */
1167   if (PROFILE_MODEL_P (current_cpu))
1168     {
1169     }
1170 #endif
1171 #undef FLD
1172     return idesc;
1173   }
1174 
1175  extract_sfmt_jalr:
1176   {
1177     const IDESC *idesc = &iq2000bf_insn_data[itype];
1178     CGEN_INSN_WORD insn = entire_insn;
1179 #define FLD(f) abuf->fields.sfmt_mrgb.f
1180     UINT f_rs;
1181     UINT f_rd;
1182 
1183     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1184     f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
1185 
1186   /* Record the fields for the semantic handler.  */
1187   FLD (f_rs) = f_rs;
1188   FLD (f_rd) = f_rd;
1189   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jalr", "f_rs 0x%x", 'x', f_rs, "f_rd 0x%x", 'x', f_rd, (char *) 0));
1190 
1191 #if WITH_PROFILE_MODEL_P
1192   /* Record the fields for profiling.  */
1193   if (PROFILE_MODEL_P (current_cpu))
1194     {
1195     }
1196 #endif
1197 #undef FLD
1198     return idesc;
1199   }
1200 
1201  extract_sfmt_jr:
1202   {
1203     const IDESC *idesc = &iq2000bf_insn_data[itype];
1204     CGEN_INSN_WORD insn = entire_insn;
1205 #define FLD(f) abuf->fields.sfmt_bbi.f
1206     UINT f_rs;
1207 
1208     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1209 
1210   /* Record the fields for the semantic handler.  */
1211   FLD (f_rs) = f_rs;
1212   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jr", "f_rs 0x%x", 'x', f_rs, (char *) 0));
1213 
1214 #if WITH_PROFILE_MODEL_P
1215   /* Record the fields for profiling.  */
1216   if (PROFILE_MODEL_P (current_cpu))
1217     {
1218     }
1219 #endif
1220 #undef FLD
1221     return idesc;
1222   }
1223 
1224  extract_sfmt_lb:
1225   {
1226     const IDESC *idesc = &iq2000bf_insn_data[itype];
1227     CGEN_INSN_WORD insn = entire_insn;
1228 #define FLD(f) abuf->fields.sfmt_addi.f
1229     UINT f_rs;
1230     UINT f_rt;
1231     UINT f_imm;
1232 
1233     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1234     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1235     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1236 
1237   /* Record the fields for the semantic handler.  */
1238   FLD (f_rs) = f_rs;
1239   FLD (f_imm) = f_imm;
1240   FLD (f_rt) = f_rt;
1241   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lb", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1242 
1243 #undef FLD
1244     return idesc;
1245   }
1246 
1247  extract_sfmt_lh:
1248   {
1249     const IDESC *idesc = &iq2000bf_insn_data[itype];
1250     CGEN_INSN_WORD insn = entire_insn;
1251 #define FLD(f) abuf->fields.sfmt_addi.f
1252     UINT f_rs;
1253     UINT f_rt;
1254     UINT f_imm;
1255 
1256     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1257     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1258     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1259 
1260   /* Record the fields for the semantic handler.  */
1261   FLD (f_rs) = f_rs;
1262   FLD (f_imm) = f_imm;
1263   FLD (f_rt) = f_rt;
1264   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lh", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1265 
1266 #undef FLD
1267     return idesc;
1268   }
1269 
1270  extract_sfmt_lui:
1271   {
1272     const IDESC *idesc = &iq2000bf_insn_data[itype];
1273     CGEN_INSN_WORD insn = entire_insn;
1274 #define FLD(f) abuf->fields.sfmt_addi.f
1275     UINT f_rt;
1276     UINT f_imm;
1277 
1278     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1279     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1280 
1281   /* Record the fields for the semantic handler.  */
1282   FLD (f_imm) = f_imm;
1283   FLD (f_rt) = f_rt;
1284   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lui", "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1285 
1286 #undef FLD
1287     return idesc;
1288   }
1289 
1290  extract_sfmt_lw:
1291   {
1292     const IDESC *idesc = &iq2000bf_insn_data[itype];
1293     CGEN_INSN_WORD insn = entire_insn;
1294 #define FLD(f) abuf->fields.sfmt_addi.f
1295     UINT f_rs;
1296     UINT f_rt;
1297     UINT f_imm;
1298 
1299     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1300     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1301     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1302 
1303   /* Record the fields for the semantic handler.  */
1304   FLD (f_rs) = f_rs;
1305   FLD (f_imm) = f_imm;
1306   FLD (f_rt) = f_rt;
1307   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lw", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1308 
1309 #undef FLD
1310     return idesc;
1311   }
1312 
1313  extract_sfmt_sb:
1314   {
1315     const IDESC *idesc = &iq2000bf_insn_data[itype];
1316     CGEN_INSN_WORD insn = entire_insn;
1317 #define FLD(f) abuf->fields.sfmt_addi.f
1318     UINT f_rs;
1319     UINT f_rt;
1320     UINT f_imm;
1321 
1322     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1323     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1324     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1325 
1326   /* Record the fields for the semantic handler.  */
1327   FLD (f_rs) = f_rs;
1328   FLD (f_imm) = f_imm;
1329   FLD (f_rt) = f_rt;
1330   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sb", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1331 
1332 #undef FLD
1333     return idesc;
1334   }
1335 
1336  extract_sfmt_sh:
1337   {
1338     const IDESC *idesc = &iq2000bf_insn_data[itype];
1339     CGEN_INSN_WORD insn = entire_insn;
1340 #define FLD(f) abuf->fields.sfmt_addi.f
1341     UINT f_rs;
1342     UINT f_rt;
1343     UINT f_imm;
1344 
1345     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1346     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1347     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1348 
1349   /* Record the fields for the semantic handler.  */
1350   FLD (f_rs) = f_rs;
1351   FLD (f_imm) = f_imm;
1352   FLD (f_rt) = f_rt;
1353   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sh", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1354 
1355 #undef FLD
1356     return idesc;
1357   }
1358 
1359  extract_sfmt_sw:
1360   {
1361     const IDESC *idesc = &iq2000bf_insn_data[itype];
1362     CGEN_INSN_WORD insn = entire_insn;
1363 #define FLD(f) abuf->fields.sfmt_addi.f
1364     UINT f_rs;
1365     UINT f_rt;
1366     UINT f_imm;
1367 
1368     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1369     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1370     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1371 
1372   /* Record the fields for the semantic handler.  */
1373   FLD (f_rs) = f_rs;
1374   FLD (f_imm) = f_imm;
1375   FLD (f_rt) = f_rt;
1376   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sw", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1377 
1378 #undef FLD
1379     return idesc;
1380   }
1381 
1382  extract_sfmt_break:
1383   {
1384     const IDESC *idesc = &iq2000bf_insn_data[itype];
1385 #define FLD(f) abuf->fields.sfmt_empty.f
1386 
1387 
1388   /* Record the fields for the semantic handler.  */
1389   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_break", (char *) 0));
1390 
1391 #if WITH_PROFILE_MODEL_P
1392   /* Record the fields for profiling.  */
1393   if (PROFILE_MODEL_P (current_cpu))
1394     {
1395     }
1396 #endif
1397 #undef FLD
1398     return idesc;
1399   }
1400 
1401  extract_sfmt_andoui:
1402   {
1403     const IDESC *idesc = &iq2000bf_insn_data[itype];
1404     CGEN_INSN_WORD insn = entire_insn;
1405 #define FLD(f) abuf->fields.sfmt_addi.f
1406     UINT f_rs;
1407     UINT f_rt;
1408     UINT f_imm;
1409 
1410     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1411     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1412     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1413 
1414   /* Record the fields for the semantic handler.  */
1415   FLD (f_imm) = f_imm;
1416   FLD (f_rs) = f_rs;
1417   FLD (f_rt) = f_rt;
1418   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andoui", "f_imm 0x%x", 'x', f_imm, "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, (char *) 0));
1419 
1420 #undef FLD
1421     return idesc;
1422   }
1423 
1424  extract_sfmt_mrgb:
1425   {
1426     const IDESC *idesc = &iq2000bf_insn_data[itype];
1427     CGEN_INSN_WORD insn = entire_insn;
1428 #define FLD(f) abuf->fields.sfmt_mrgb.f
1429     UINT f_rs;
1430     UINT f_rt;
1431     UINT f_rd;
1432     UINT f_mask;
1433 
1434     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1435     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1436     f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
1437     f_mask = EXTRACT_LSB0_UINT (insn, 32, 9, 4);
1438 
1439   /* Record the fields for the semantic handler.  */
1440   FLD (f_mask) = f_mask;
1441   FLD (f_rs) = f_rs;
1442   FLD (f_rt) = f_rt;
1443   FLD (f_rd) = f_rd;
1444   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mrgb", "f_mask 0x%x", 'x', f_mask, "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
1445 
1446 #undef FLD
1447     return idesc;
1448   }
1449 
1450  extract_sfmt_bctxt:
1451   {
1452     const IDESC *idesc = &iq2000bf_insn_data[itype];
1453 #define FLD(f) abuf->fields.sfmt_empty.f
1454 
1455 
1456   /* Record the fields for the semantic handler.  */
1457   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bctxt", (char *) 0));
1458 
1459 #undef FLD
1460     return idesc;
1461   }
1462 
1463  extract_sfmt_cfc0:
1464   {
1465     const IDESC *idesc = &iq2000bf_insn_data[itype];
1466 #define FLD(f) abuf->fields.sfmt_empty.f
1467 
1468 
1469   /* Record the fields for the semantic handler.  */
1470   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cfc0", (char *) 0));
1471 
1472 #undef FLD
1473     return idesc;
1474   }
1475 
1476  extract_sfmt_ldw:
1477   {
1478     const IDESC *idesc = &iq2000bf_insn_data[itype];
1479     CGEN_INSN_WORD insn = entire_insn;
1480 #define FLD(f) abuf->fields.sfmt_addi.f
1481     UINT f_rs;
1482     UINT f_rt;
1483     UINT f_imm;
1484 
1485     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1486     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1487     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1488 
1489   /* Record the fields for the semantic handler.  */
1490   FLD (f_rs) = f_rs;
1491   FLD (f_rt) = f_rt;
1492   FLD (f_imm) = f_imm;
1493   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldw", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_imm 0x%x", 'x', f_imm, (char *) 0));
1494 
1495 #undef FLD
1496     return idesc;
1497   }
1498 
1499  extract_sfmt_sdw:
1500   {
1501     const IDESC *idesc = &iq2000bf_insn_data[itype];
1502     CGEN_INSN_WORD insn = entire_insn;
1503 #define FLD(f) abuf->fields.sfmt_addi.f
1504     UINT f_rs;
1505     UINT f_rt;
1506     UINT f_imm;
1507 
1508     f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
1509     f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
1510     f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
1511 
1512   /* Record the fields for the semantic handler.  */
1513   FLD (f_rs) = f_rs;
1514   FLD (f_rt) = f_rt;
1515   FLD (f_imm) = f_imm;
1516   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sdw", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_imm 0x%x", 'x', f_imm, (char *) 0));
1517 
1518 #undef FLD
1519     return idesc;
1520   }
1521 
1522  extract_sfmt_j:
1523   {
1524     const IDESC *idesc = &iq2000bf_insn_data[itype];
1525     CGEN_INSN_WORD insn = entire_insn;
1526 #define FLD(f) abuf->fields.sfmt_j.f
1527     USI f_jtarg;
1528 
1529     f_jtarg = ((((pc) & (0xf0000000))) | (((EXTRACT_LSB0_UINT (insn, 32, 15, 16)) << (2))));
1530 
1531   /* Record the fields for the semantic handler.  */
1532   FLD (i_jmptarg) = f_jtarg;
1533   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_j", "jmptarg 0x%x", 'x', f_jtarg, (char *) 0));
1534 
1535 #if WITH_PROFILE_MODEL_P
1536   /* Record the fields for profiling.  */
1537   if (PROFILE_MODEL_P (current_cpu))
1538     {
1539     }
1540 #endif
1541 #undef FLD
1542     return idesc;
1543   }
1544 
1545  extract_sfmt_jal:
1546   {
1547     const IDESC *idesc = &iq2000bf_insn_data[itype];
1548     CGEN_INSN_WORD insn = entire_insn;
1549 #define FLD(f) abuf->fields.sfmt_j.f
1550     USI f_jtarg;
1551 
1552     f_jtarg = ((((pc) & (0xf0000000))) | (((EXTRACT_LSB0_UINT (insn, 32, 15, 16)) << (2))));
1553 
1554   /* Record the fields for the semantic handler.  */
1555   FLD (i_jmptarg) = f_jtarg;
1556   CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jal", "jmptarg 0x%x", 'x', f_jtarg, (char *) 0));
1557 
1558 #if WITH_PROFILE_MODEL_P
1559   /* Record the fields for profiling.  */
1560   if (PROFILE_MODEL_P (current_cpu))
1561     {
1562     }
1563 #endif
1564 #undef FLD
1565     return idesc;
1566   }
1567 
1568 }
1569