1 /* Simulator instruction decoder for iq2000bf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996-2024 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
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)
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.
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.
25 #define WANT_CPU iq2000bf
26 #define WANT_CPU_IQ2000BF
29 #include "sim-assert.h"
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
];
40 /* Commas between elements are contained in the macros.
41 Some of these are conditionally compiled out. */
43 static const struct insn_sem iq2000bf_insn_sem
[] =
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
},
197 static const struct insn_sem iq2000bf_insn_sem_invalid
=
199 VIRTUAL_INSN_X_INVALID
, IQ2000BF_INSN_X_INVALID
, IQ2000BF_SFMT_EMPTY
202 /* Initialize an IDESC from the compile-time computable parts. */
205 init_idesc (SIM_CPU
*cpu
, IDESC
*id
, const struct insn_sem
*t
)
207 const CGEN_INSN
*insn_table
= CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu
))->init_entries
;
211 if ((int) t
->type
<= 0)
212 id
->idata
= & cgen_virtual_insn_table
[- (int) t
->type
];
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;
219 #if WITH_PROFILE_MODEL_P
220 id
->timing
= & MODEL_TIMING (CPU_MODEL (cpu
)) [t
->index
];
222 SIM_DESC sd
= CPU_STATE (cpu
);
223 SIM_ASSERT (t
->index
== id
->timing
->num
);
227 /* Semantic pointers are initialized elsewhere. */
230 /* Initialize the instruction descriptor table. */
233 iq2000bf_init_idesc_table (SIM_CPU
*cpu
)
236 const struct insn_sem
*t
,*tend
;
237 int tabsize
= IQ2000BF_INSN__MAX
;
238 IDESC
*table
= iq2000bf_insn_data
;
240 memset (table
, 0, tabsize
* sizeof (IDESC
));
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
);
247 /* Now fill in the values for the chosen cpu. */
248 for (t
= iq2000bf_insn_sem
, tend
= t
+ ARRAY_SIZE (iq2000bf_insn_sem
);
251 init_idesc (cpu
, & table
[t
->index
], t
);
254 /* Link the IDESC table into the cpu. */
255 CPU_IDESC (cpu
) = table
;
258 /* Given an instruction, return a pointer to its IDESC entry. */
261 iq2000bf_decode (SIM_CPU
*current_cpu
, IADDR pc
,
262 CGEN_INSN_WORD base_insn
, CGEN_INSN_WORD entire_insn
,
265 /* Result of decoder. */
266 IQ2000BF_INSN_TYPE itype
;
269 CGEN_INSN_WORD insn
= base_insn
;
272 unsigned int val0
= (((insn
>> 26) & (63 << 0)));
277 unsigned int val1
= (((insn
>> 1) & (1 << 4)) | ((insn
>> 0) & (15 << 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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
389 unsigned int val1
= (((insn
>> 17) & (1 << 3)) | ((insn
>> 16) & (7 << 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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
462 unsigned int val1
= (((insn
>> 19) & (15 << 3)) | ((insn
>> 15) & (3 << 1)) | ((insn
>> 4) & (1 << 0)));
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
522 unsigned int val1
= (((insn
>> 22) & (3 << 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
;
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
;
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
;
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
;
546 unsigned int val1
= (((insn
>> 16) & (3 << 5)) | ((insn
>> 0) & (31 << 0)));
551 unsigned int val2
= (((insn
>> 23) & (1 << 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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
639 unsigned int val2
= (((insn
>> 23) & (1 << 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
;
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
;
653 default: itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
658 unsigned int val1
= (((insn
>> 19) & (31 << 2)) | ((insn
>> 0) & (3 << 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
;
667 unsigned int val2
= (((insn
>> 2) & (3 << 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
;
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
;
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
;
687 unsigned int val2
= (((insn
>> 3) & (1 << 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
;
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
;
703 unsigned int val2
= (((insn
>> 2) & (3 << 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
;
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
;
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
;
723 unsigned int val2
= (((insn
>> 2) & (1 << 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
;
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
;
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
;
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
;
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
;
754 unsigned int val2
= (((insn
>> 16) & (3 << 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
;
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
;
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
;
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
;
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
;
783 case 67: itype
= IQ2000BF_INSN_WBR1
; goto extract_sfmt_cfc0
;
787 case 71: itype
= IQ2000BF_INSN_WBR1U
; goto extract_sfmt_cfc0
;
791 case 75: itype
= IQ2000BF_INSN_WBR30
; goto extract_sfmt_cfc0
;
795 case 79: itype
= IQ2000BF_INSN_WBR30U
; goto extract_sfmt_cfc0
;
799 case 83: itype
= IQ2000BF_INSN_WXR1
; goto extract_sfmt_cfc0
;
803 case 87: itype
= IQ2000BF_INSN_WXR1U
; goto extract_sfmt_cfc0
;
807 case 91: itype
= IQ2000BF_INSN_WXR30
; goto extract_sfmt_cfc0
;
811 case 95: itype
= IQ2000BF_INSN_WXR30U
; goto extract_sfmt_cfc0
;
815 case 99: itype
= IQ2000BF_INSN_RBR1
; goto extract_sfmt_cfc0
;
819 case 107: itype
= IQ2000BF_INSN_RBR30
; goto extract_sfmt_cfc0
;
823 case 115: itype
= IQ2000BF_INSN_RXR1
; goto extract_sfmt_cfc0
;
827 case 119: itype
= IQ2000BF_INSN_PKRLR1
; goto extract_sfmt_cfc0
;
831 case 123: itype
= IQ2000BF_INSN_RXR30
; goto extract_sfmt_cfc0
;
835 case 127: itype
= IQ2000BF_INSN_PKRLR30
; goto extract_sfmt_cfc0
;
836 default: itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
839 case 20: itype
= IQ2000BF_INSN_BEQL
; goto extract_sfmt_bbv
;
840 case 21: itype
= IQ2000BF_INSN_BNEL
; goto extract_sfmt_bbv
;
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
;
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
;
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
;
880 /* The instruction has been decoded, now extract the fields. */
884 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
885 #define FLD(f) abuf->fields.sfmt_empty.f
888 /* Record the fields for the semantic handler. */
889 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_empty", (char *) 0));
897 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
898 CGEN_INSN_WORD insn
= entire_insn
;
899 #define FLD(f) abuf->fields.sfmt_mrgb.f
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);
908 /* Record the fields for the semantic handler. */
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));
920 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
921 CGEN_INSN_WORD insn
= entire_insn
;
922 #define FLD(f) abuf->fields.sfmt_addi.f
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);
931 /* Record the fields for the semantic handler. */
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));
943 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
944 CGEN_INSN_WORD insn
= entire_insn
;
945 #define FLD(f) abuf->fields.sfmt_ram.f
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);
958 /* Record the fields for the semantic handler. */
959 FLD (f_maskl
) = f_maskl
;
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));
972 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
973 CGEN_INSN_WORD insn
= entire_insn
;
974 #define FLD(f) abuf->fields.sfmt_ram.f
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);
983 /* Record the fields for the semantic handler. */
985 FLD (f_shamt
) = f_shamt
;
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));
995 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
996 CGEN_INSN_WORD insn
= entire_insn
;
997 #define FLD(f) abuf->fields.sfmt_ram.f
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);
1008 /* Record the fields for the semantic handler. */
1011 FLD (f_shamt
) = f_shamt
;
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));
1021 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1022 CGEN_INSN_WORD insn
= entire_insn
;
1023 #define FLD(f) abuf->fields.sfmt_mrgb.f
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);
1032 /* Record the fields for the semantic handler. */
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));
1044 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1045 CGEN_INSN_WORD insn
= entire_insn
;
1046 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1055 /* Record the fields for the semantic handler. */
1056 FLD (f_imm
) = f_imm
;
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));
1067 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1068 CGEN_INSN_WORD insn
= entire_insn
;
1069 #define FLD(f) abuf->fields.sfmt_bbi.f
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))));
1078 /* Record the fields for the semantic handler. */
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));
1084 #if WITH_PROFILE_MODEL_P
1085 /* Record the fields for profiling. */
1086 if (PROFILE_MODEL_P (current_cpu
))
1096 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1097 CGEN_INSN_WORD insn
= entire_insn
;
1098 #define FLD(f) abuf->fields.sfmt_bbi.f
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))));
1107 /* Record the fields for the semantic handler. */
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));
1113 #if WITH_PROFILE_MODEL_P
1114 /* Record the fields for profiling. */
1115 if (PROFILE_MODEL_P (current_cpu
))
1125 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1126 CGEN_INSN_WORD insn
= entire_insn
;
1127 #define FLD(f) abuf->fields.sfmt_bbi.f
1131 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1132 f_offset
= ((((EXTRACT_LSB0_SINT (insn
, 32, 15, 16)) * (4))) + (((pc
) + (4))));
1134 /* Record the fields for the semantic handler. */
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));
1139 #if WITH_PROFILE_MODEL_P
1140 /* Record the fields for profiling. */
1141 if (PROFILE_MODEL_P (current_cpu
))
1149 extract_sfmt_bgezal
:
1151 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1152 CGEN_INSN_WORD insn
= entire_insn
;
1153 #define FLD(f) abuf->fields.sfmt_bbi.f
1157 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1158 f_offset
= ((((EXTRACT_LSB0_SINT (insn
, 32, 15, 16)) * (4))) + (((pc
) + (4))));
1160 /* Record the fields for the semantic handler. */
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));
1165 #if WITH_PROFILE_MODEL_P
1166 /* Record the fields for profiling. */
1167 if (PROFILE_MODEL_P (current_cpu
))
1177 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1178 CGEN_INSN_WORD insn
= entire_insn
;
1179 #define FLD(f) abuf->fields.sfmt_mrgb.f
1183 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1184 f_rd
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
1186 /* Record the fields for the semantic handler. */
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));
1191 #if WITH_PROFILE_MODEL_P
1192 /* Record the fields for profiling. */
1193 if (PROFILE_MODEL_P (current_cpu
))
1203 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1204 CGEN_INSN_WORD insn
= entire_insn
;
1205 #define FLD(f) abuf->fields.sfmt_bbi.f
1208 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1210 /* Record the fields for the semantic handler. */
1212 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_jr", "f_rs 0x%x", 'x', f_rs
, (char *) 0));
1214 #if WITH_PROFILE_MODEL_P
1215 /* Record the fields for profiling. */
1216 if (PROFILE_MODEL_P (current_cpu
))
1226 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1227 CGEN_INSN_WORD insn
= entire_insn
;
1228 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1237 /* Record the fields for the semantic handler. */
1239 FLD (f_imm
) = f_imm
;
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));
1249 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1250 CGEN_INSN_WORD insn
= entire_insn
;
1251 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1260 /* Record the fields for the semantic handler. */
1262 FLD (f_imm
) = f_imm
;
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));
1272 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1273 CGEN_INSN_WORD insn
= entire_insn
;
1274 #define FLD(f) abuf->fields.sfmt_addi.f
1278 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1279 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1281 /* Record the fields for the semantic handler. */
1282 FLD (f_imm
) = f_imm
;
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));
1292 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1293 CGEN_INSN_WORD insn
= entire_insn
;
1294 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1303 /* Record the fields for the semantic handler. */
1305 FLD (f_imm
) = f_imm
;
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));
1315 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1316 CGEN_INSN_WORD insn
= entire_insn
;
1317 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1326 /* Record the fields for the semantic handler. */
1328 FLD (f_imm
) = f_imm
;
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));
1338 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1339 CGEN_INSN_WORD insn
= entire_insn
;
1340 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1349 /* Record the fields for the semantic handler. */
1351 FLD (f_imm
) = f_imm
;
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));
1361 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1362 CGEN_INSN_WORD insn
= entire_insn
;
1363 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1372 /* Record the fields for the semantic handler. */
1374 FLD (f_imm
) = f_imm
;
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));
1384 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1385 #define FLD(f) abuf->fields.sfmt_empty.f
1388 /* Record the fields for the semantic handler. */
1389 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_break", (char *) 0));
1391 #if WITH_PROFILE_MODEL_P
1392 /* Record the fields for profiling. */
1393 if (PROFILE_MODEL_P (current_cpu
))
1401 extract_sfmt_andoui
:
1403 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1404 CGEN_INSN_WORD insn
= entire_insn
;
1405 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1414 /* Record the fields for the semantic handler. */
1415 FLD (f_imm
) = f_imm
;
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));
1426 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1427 CGEN_INSN_WORD insn
= entire_insn
;
1428 #define FLD(f) abuf->fields.sfmt_mrgb.f
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);
1439 /* Record the fields for the semantic handler. */
1440 FLD (f_mask
) = f_mask
;
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));
1452 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1453 #define FLD(f) abuf->fields.sfmt_empty.f
1456 /* Record the fields for the semantic handler. */
1457 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bctxt", (char *) 0));
1465 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1466 #define FLD(f) abuf->fields.sfmt_empty.f
1469 /* Record the fields for the semantic handler. */
1470 CGEN_TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_cfc0", (char *) 0));
1478 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1479 CGEN_INSN_WORD insn
= entire_insn
;
1480 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1489 /* Record the fields for the semantic handler. */
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));
1501 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1502 CGEN_INSN_WORD insn
= entire_insn
;
1503 #define FLD(f) abuf->fields.sfmt_addi.f
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);
1512 /* Record the fields for the semantic handler. */
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));
1524 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1525 CGEN_INSN_WORD insn
= entire_insn
;
1526 #define FLD(f) abuf->fields.sfmt_j.f
1529 f_jtarg
= ((((pc
) & (0xf0000000))) | (((EXTRACT_LSB0_UINT (insn
, 32, 15, 16)) << (2))));
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));
1535 #if WITH_PROFILE_MODEL_P
1536 /* Record the fields for profiling. */
1537 if (PROFILE_MODEL_P (current_cpu
))
1547 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1548 CGEN_INSN_WORD insn
= entire_insn
;
1549 #define FLD(f) abuf->fields.sfmt_j.f
1552 f_jtarg
= ((((pc
) & (0xf0000000))) | (((EXTRACT_LSB0_UINT (insn
, 32, 15, 16)) << (2))));
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));
1558 #if WITH_PROFILE_MODEL_P
1559 /* Record the fields for profiling. */
1560 if (PROFILE_MODEL_P (current_cpu
))