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