1 /* Simulator instruction decoder for iq2000bf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2010, 2012 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"
31 /* The instruction descriptor array.
32 This is computed at runtime. Space for it is not malloc'd to save a
33 teensy bit of cpu in the decoder. Moving it to malloc space is trivial
34 but won't be done until necessary (we don't currently support the runtime
35 addition of instructions nor an SMP machine with different cpus). */
36 static IDESC iq2000bf_insn_data
[IQ2000BF_INSN__MAX
];
38 /* Commas between elements are contained in the macros.
39 Some of these are conditionally compiled out. */
41 static const struct insn_sem iq2000bf_insn_sem
[] =
43 { VIRTUAL_INSN_X_INVALID
, IQ2000BF_INSN_X_INVALID
, IQ2000BF_SFMT_EMPTY
},
44 { VIRTUAL_INSN_X_AFTER
, IQ2000BF_INSN_X_AFTER
, IQ2000BF_SFMT_EMPTY
},
45 { VIRTUAL_INSN_X_BEFORE
, IQ2000BF_INSN_X_BEFORE
, IQ2000BF_SFMT_EMPTY
},
46 { VIRTUAL_INSN_X_CTI_CHAIN
, IQ2000BF_INSN_X_CTI_CHAIN
, IQ2000BF_SFMT_EMPTY
},
47 { VIRTUAL_INSN_X_CHAIN
, IQ2000BF_INSN_X_CHAIN
, IQ2000BF_SFMT_EMPTY
},
48 { VIRTUAL_INSN_X_BEGIN
, IQ2000BF_INSN_X_BEGIN
, IQ2000BF_SFMT_EMPTY
},
49 { IQ2000_INSN_ADD
, IQ2000BF_INSN_ADD
, IQ2000BF_SFMT_ADD
},
50 { IQ2000_INSN_ADDI
, IQ2000BF_INSN_ADDI
, IQ2000BF_SFMT_ADDI
},
51 { IQ2000_INSN_ADDIU
, IQ2000BF_INSN_ADDIU
, IQ2000BF_SFMT_ADDI
},
52 { IQ2000_INSN_ADDU
, IQ2000BF_INSN_ADDU
, IQ2000BF_SFMT_ADD
},
53 { IQ2000_INSN_ADO16
, IQ2000BF_INSN_ADO16
, IQ2000BF_SFMT_ADD
},
54 { IQ2000_INSN_AND
, IQ2000BF_INSN_AND
, IQ2000BF_SFMT_ADD
},
55 { IQ2000_INSN_ANDI
, IQ2000BF_INSN_ANDI
, IQ2000BF_SFMT_ADDI
},
56 { IQ2000_INSN_ANDOI
, IQ2000BF_INSN_ANDOI
, IQ2000BF_SFMT_ADDI
},
57 { IQ2000_INSN_NOR
, IQ2000BF_INSN_NOR
, IQ2000BF_SFMT_ADD
},
58 { IQ2000_INSN_OR
, IQ2000BF_INSN_OR
, IQ2000BF_SFMT_ADD
},
59 { IQ2000_INSN_ORI
, IQ2000BF_INSN_ORI
, IQ2000BF_SFMT_ADDI
},
60 { IQ2000_INSN_RAM
, IQ2000BF_INSN_RAM
, IQ2000BF_SFMT_RAM
},
61 { IQ2000_INSN_SLL
, IQ2000BF_INSN_SLL
, IQ2000BF_SFMT_SLL
},
62 { IQ2000_INSN_SLLV
, IQ2000BF_INSN_SLLV
, IQ2000BF_SFMT_ADD
},
63 { IQ2000_INSN_SLMV
, IQ2000BF_INSN_SLMV
, IQ2000BF_SFMT_SLMV
},
64 { IQ2000_INSN_SLT
, IQ2000BF_INSN_SLT
, IQ2000BF_SFMT_SLT
},
65 { IQ2000_INSN_SLTI
, IQ2000BF_INSN_SLTI
, IQ2000BF_SFMT_SLTI
},
66 { IQ2000_INSN_SLTIU
, IQ2000BF_INSN_SLTIU
, IQ2000BF_SFMT_SLTI
},
67 { IQ2000_INSN_SLTU
, IQ2000BF_INSN_SLTU
, IQ2000BF_SFMT_SLT
},
68 { IQ2000_INSN_SRA
, IQ2000BF_INSN_SRA
, IQ2000BF_SFMT_SLL
},
69 { IQ2000_INSN_SRAV
, IQ2000BF_INSN_SRAV
, IQ2000BF_SFMT_ADD
},
70 { IQ2000_INSN_SRL
, IQ2000BF_INSN_SRL
, IQ2000BF_SFMT_SLL
},
71 { IQ2000_INSN_SRLV
, IQ2000BF_INSN_SRLV
, IQ2000BF_SFMT_ADD
},
72 { IQ2000_INSN_SRMV
, IQ2000BF_INSN_SRMV
, IQ2000BF_SFMT_SLMV
},
73 { IQ2000_INSN_SUB
, IQ2000BF_INSN_SUB
, IQ2000BF_SFMT_ADD
},
74 { IQ2000_INSN_SUBU
, IQ2000BF_INSN_SUBU
, IQ2000BF_SFMT_ADD
},
75 { IQ2000_INSN_XOR
, IQ2000BF_INSN_XOR
, IQ2000BF_SFMT_ADD
},
76 { IQ2000_INSN_XORI
, IQ2000BF_INSN_XORI
, IQ2000BF_SFMT_ADDI
},
77 { IQ2000_INSN_BBI
, IQ2000BF_INSN_BBI
, IQ2000BF_SFMT_BBI
},
78 { IQ2000_INSN_BBIN
, IQ2000BF_INSN_BBIN
, IQ2000BF_SFMT_BBI
},
79 { IQ2000_INSN_BBV
, IQ2000BF_INSN_BBV
, IQ2000BF_SFMT_BBV
},
80 { IQ2000_INSN_BBVN
, IQ2000BF_INSN_BBVN
, IQ2000BF_SFMT_BBV
},
81 { IQ2000_INSN_BEQ
, IQ2000BF_INSN_BEQ
, IQ2000BF_SFMT_BBV
},
82 { IQ2000_INSN_BEQL
, IQ2000BF_INSN_BEQL
, IQ2000BF_SFMT_BBV
},
83 { IQ2000_INSN_BGEZ
, IQ2000BF_INSN_BGEZ
, IQ2000BF_SFMT_BGEZ
},
84 { IQ2000_INSN_BGEZAL
, IQ2000BF_INSN_BGEZAL
, IQ2000BF_SFMT_BGEZAL
},
85 { IQ2000_INSN_BGEZALL
, IQ2000BF_INSN_BGEZALL
, IQ2000BF_SFMT_BGEZAL
},
86 { IQ2000_INSN_BGEZL
, IQ2000BF_INSN_BGEZL
, IQ2000BF_SFMT_BGEZ
},
87 { IQ2000_INSN_BLTZ
, IQ2000BF_INSN_BLTZ
, IQ2000BF_SFMT_BGEZ
},
88 { IQ2000_INSN_BLTZL
, IQ2000BF_INSN_BLTZL
, IQ2000BF_SFMT_BGEZ
},
89 { IQ2000_INSN_BLTZAL
, IQ2000BF_INSN_BLTZAL
, IQ2000BF_SFMT_BGEZAL
},
90 { IQ2000_INSN_BLTZALL
, IQ2000BF_INSN_BLTZALL
, IQ2000BF_SFMT_BGEZAL
},
91 { IQ2000_INSN_BMB0
, IQ2000BF_INSN_BMB0
, IQ2000BF_SFMT_BBV
},
92 { IQ2000_INSN_BMB1
, IQ2000BF_INSN_BMB1
, IQ2000BF_SFMT_BBV
},
93 { IQ2000_INSN_BMB2
, IQ2000BF_INSN_BMB2
, IQ2000BF_SFMT_BBV
},
94 { IQ2000_INSN_BMB3
, IQ2000BF_INSN_BMB3
, IQ2000BF_SFMT_BBV
},
95 { IQ2000_INSN_BNE
, IQ2000BF_INSN_BNE
, IQ2000BF_SFMT_BBV
},
96 { IQ2000_INSN_BNEL
, IQ2000BF_INSN_BNEL
, IQ2000BF_SFMT_BBV
},
97 { IQ2000_INSN_JALR
, IQ2000BF_INSN_JALR
, IQ2000BF_SFMT_JALR
},
98 { IQ2000_INSN_JR
, IQ2000BF_INSN_JR
, IQ2000BF_SFMT_JR
},
99 { IQ2000_INSN_LB
, IQ2000BF_INSN_LB
, IQ2000BF_SFMT_LB
},
100 { IQ2000_INSN_LBU
, IQ2000BF_INSN_LBU
, IQ2000BF_SFMT_LB
},
101 { IQ2000_INSN_LH
, IQ2000BF_INSN_LH
, IQ2000BF_SFMT_LH
},
102 { IQ2000_INSN_LHU
, IQ2000BF_INSN_LHU
, IQ2000BF_SFMT_LH
},
103 { IQ2000_INSN_LUI
, IQ2000BF_INSN_LUI
, IQ2000BF_SFMT_LUI
},
104 { IQ2000_INSN_LW
, IQ2000BF_INSN_LW
, IQ2000BF_SFMT_LW
},
105 { IQ2000_INSN_SB
, IQ2000BF_INSN_SB
, IQ2000BF_SFMT_SB
},
106 { IQ2000_INSN_SH
, IQ2000BF_INSN_SH
, IQ2000BF_SFMT_SH
},
107 { IQ2000_INSN_SW
, IQ2000BF_INSN_SW
, IQ2000BF_SFMT_SW
},
108 { IQ2000_INSN_BREAK
, IQ2000BF_INSN_BREAK
, IQ2000BF_SFMT_BREAK
},
109 { IQ2000_INSN_SYSCALL
, IQ2000BF_INSN_SYSCALL
, IQ2000BF_SFMT_SYSCALL
},
110 { IQ2000_INSN_ANDOUI
, IQ2000BF_INSN_ANDOUI
, IQ2000BF_SFMT_ANDOUI
},
111 { IQ2000_INSN_ORUI
, IQ2000BF_INSN_ORUI
, IQ2000BF_SFMT_ANDOUI
},
112 { IQ2000_INSN_BGTZ
, IQ2000BF_INSN_BGTZ
, IQ2000BF_SFMT_BGEZ
},
113 { IQ2000_INSN_BGTZL
, IQ2000BF_INSN_BGTZL
, IQ2000BF_SFMT_BGEZ
},
114 { IQ2000_INSN_BLEZ
, IQ2000BF_INSN_BLEZ
, IQ2000BF_SFMT_BGEZ
},
115 { IQ2000_INSN_BLEZL
, IQ2000BF_INSN_BLEZL
, IQ2000BF_SFMT_BGEZ
},
116 { IQ2000_INSN_MRGB
, IQ2000BF_INSN_MRGB
, IQ2000BF_SFMT_MRGB
},
117 { IQ2000_INSN_BCTXT
, IQ2000BF_INSN_BCTXT
, IQ2000BF_SFMT_BCTXT
},
118 { IQ2000_INSN_BC0F
, IQ2000BF_INSN_BC0F
, IQ2000BF_SFMT_BCTXT
},
119 { IQ2000_INSN_BC0FL
, IQ2000BF_INSN_BC0FL
, IQ2000BF_SFMT_BCTXT
},
120 { IQ2000_INSN_BC3F
, IQ2000BF_INSN_BC3F
, IQ2000BF_SFMT_BCTXT
},
121 { IQ2000_INSN_BC3FL
, IQ2000BF_INSN_BC3FL
, IQ2000BF_SFMT_BCTXT
},
122 { IQ2000_INSN_BC0T
, IQ2000BF_INSN_BC0T
, IQ2000BF_SFMT_BCTXT
},
123 { IQ2000_INSN_BC0TL
, IQ2000BF_INSN_BC0TL
, IQ2000BF_SFMT_BCTXT
},
124 { IQ2000_INSN_BC3T
, IQ2000BF_INSN_BC3T
, IQ2000BF_SFMT_BCTXT
},
125 { IQ2000_INSN_BC3TL
, IQ2000BF_INSN_BC3TL
, IQ2000BF_SFMT_BCTXT
},
126 { IQ2000_INSN_CFC0
, IQ2000BF_INSN_CFC0
, IQ2000BF_SFMT_SYSCALL
},
127 { IQ2000_INSN_CFC1
, IQ2000BF_INSN_CFC1
, IQ2000BF_SFMT_SYSCALL
},
128 { IQ2000_INSN_CFC2
, IQ2000BF_INSN_CFC2
, IQ2000BF_SFMT_SYSCALL
},
129 { IQ2000_INSN_CFC3
, IQ2000BF_INSN_CFC3
, IQ2000BF_SFMT_SYSCALL
},
130 { IQ2000_INSN_CHKHDR
, IQ2000BF_INSN_CHKHDR
, IQ2000BF_SFMT_SYSCALL
},
131 { IQ2000_INSN_CTC0
, IQ2000BF_INSN_CTC0
, IQ2000BF_SFMT_SYSCALL
},
132 { IQ2000_INSN_CTC1
, IQ2000BF_INSN_CTC1
, IQ2000BF_SFMT_SYSCALL
},
133 { IQ2000_INSN_CTC2
, IQ2000BF_INSN_CTC2
, IQ2000BF_SFMT_SYSCALL
},
134 { IQ2000_INSN_CTC3
, IQ2000BF_INSN_CTC3
, IQ2000BF_SFMT_SYSCALL
},
135 { IQ2000_INSN_JCR
, IQ2000BF_INSN_JCR
, IQ2000BF_SFMT_BCTXT
},
136 { IQ2000_INSN_LUC32
, IQ2000BF_INSN_LUC32
, IQ2000BF_SFMT_SYSCALL
},
137 { IQ2000_INSN_LUC32L
, IQ2000BF_INSN_LUC32L
, IQ2000BF_SFMT_SYSCALL
},
138 { IQ2000_INSN_LUC64
, IQ2000BF_INSN_LUC64
, IQ2000BF_SFMT_SYSCALL
},
139 { IQ2000_INSN_LUC64L
, IQ2000BF_INSN_LUC64L
, IQ2000BF_SFMT_SYSCALL
},
140 { IQ2000_INSN_LUK
, IQ2000BF_INSN_LUK
, IQ2000BF_SFMT_SYSCALL
},
141 { IQ2000_INSN_LULCK
, IQ2000BF_INSN_LULCK
, IQ2000BF_SFMT_SYSCALL
},
142 { IQ2000_INSN_LUM32
, IQ2000BF_INSN_LUM32
, IQ2000BF_SFMT_SYSCALL
},
143 { IQ2000_INSN_LUM32L
, IQ2000BF_INSN_LUM32L
, IQ2000BF_SFMT_SYSCALL
},
144 { IQ2000_INSN_LUM64
, IQ2000BF_INSN_LUM64
, IQ2000BF_SFMT_SYSCALL
},
145 { IQ2000_INSN_LUM64L
, IQ2000BF_INSN_LUM64L
, IQ2000BF_SFMT_SYSCALL
},
146 { IQ2000_INSN_LUR
, IQ2000BF_INSN_LUR
, IQ2000BF_SFMT_SYSCALL
},
147 { IQ2000_INSN_LURL
, IQ2000BF_INSN_LURL
, IQ2000BF_SFMT_SYSCALL
},
148 { IQ2000_INSN_LUULCK
, IQ2000BF_INSN_LUULCK
, IQ2000BF_SFMT_SYSCALL
},
149 { IQ2000_INSN_MFC0
, IQ2000BF_INSN_MFC0
, IQ2000BF_SFMT_SYSCALL
},
150 { IQ2000_INSN_MFC1
, IQ2000BF_INSN_MFC1
, IQ2000BF_SFMT_SYSCALL
},
151 { IQ2000_INSN_MFC2
, IQ2000BF_INSN_MFC2
, IQ2000BF_SFMT_SYSCALL
},
152 { IQ2000_INSN_MFC3
, IQ2000BF_INSN_MFC3
, IQ2000BF_SFMT_SYSCALL
},
153 { IQ2000_INSN_MTC0
, IQ2000BF_INSN_MTC0
, IQ2000BF_SFMT_SYSCALL
},
154 { IQ2000_INSN_MTC1
, IQ2000BF_INSN_MTC1
, IQ2000BF_SFMT_SYSCALL
},
155 { IQ2000_INSN_MTC2
, IQ2000BF_INSN_MTC2
, IQ2000BF_SFMT_SYSCALL
},
156 { IQ2000_INSN_MTC3
, IQ2000BF_INSN_MTC3
, IQ2000BF_SFMT_SYSCALL
},
157 { IQ2000_INSN_PKRL
, IQ2000BF_INSN_PKRL
, IQ2000BF_SFMT_SYSCALL
},
158 { IQ2000_INSN_PKRLR1
, IQ2000BF_INSN_PKRLR1
, IQ2000BF_SFMT_SYSCALL
},
159 { IQ2000_INSN_PKRLR30
, IQ2000BF_INSN_PKRLR30
, IQ2000BF_SFMT_SYSCALL
},
160 { IQ2000_INSN_RB
, IQ2000BF_INSN_RB
, IQ2000BF_SFMT_SYSCALL
},
161 { IQ2000_INSN_RBR1
, IQ2000BF_INSN_RBR1
, IQ2000BF_SFMT_SYSCALL
},
162 { IQ2000_INSN_RBR30
, IQ2000BF_INSN_RBR30
, IQ2000BF_SFMT_SYSCALL
},
163 { IQ2000_INSN_RFE
, IQ2000BF_INSN_RFE
, IQ2000BF_SFMT_SYSCALL
},
164 { IQ2000_INSN_RX
, IQ2000BF_INSN_RX
, IQ2000BF_SFMT_SYSCALL
},
165 { IQ2000_INSN_RXR1
, IQ2000BF_INSN_RXR1
, IQ2000BF_SFMT_SYSCALL
},
166 { IQ2000_INSN_RXR30
, IQ2000BF_INSN_RXR30
, IQ2000BF_SFMT_SYSCALL
},
167 { IQ2000_INSN_SLEEP
, IQ2000BF_INSN_SLEEP
, IQ2000BF_SFMT_SYSCALL
},
168 { IQ2000_INSN_SRRD
, IQ2000BF_INSN_SRRD
, IQ2000BF_SFMT_SYSCALL
},
169 { IQ2000_INSN_SRRDL
, IQ2000BF_INSN_SRRDL
, IQ2000BF_SFMT_SYSCALL
},
170 { IQ2000_INSN_SRULCK
, IQ2000BF_INSN_SRULCK
, IQ2000BF_SFMT_SYSCALL
},
171 { IQ2000_INSN_SRWR
, IQ2000BF_INSN_SRWR
, IQ2000BF_SFMT_SYSCALL
},
172 { IQ2000_INSN_SRWRU
, IQ2000BF_INSN_SRWRU
, IQ2000BF_SFMT_SYSCALL
},
173 { IQ2000_INSN_TRAPQFL
, IQ2000BF_INSN_TRAPQFL
, IQ2000BF_SFMT_SYSCALL
},
174 { IQ2000_INSN_TRAPQNE
, IQ2000BF_INSN_TRAPQNE
, IQ2000BF_SFMT_SYSCALL
},
175 { IQ2000_INSN_TRAPREL
, IQ2000BF_INSN_TRAPREL
, IQ2000BF_SFMT_SYSCALL
},
176 { IQ2000_INSN_WB
, IQ2000BF_INSN_WB
, IQ2000BF_SFMT_SYSCALL
},
177 { IQ2000_INSN_WBU
, IQ2000BF_INSN_WBU
, IQ2000BF_SFMT_SYSCALL
},
178 { IQ2000_INSN_WBR1
, IQ2000BF_INSN_WBR1
, IQ2000BF_SFMT_SYSCALL
},
179 { IQ2000_INSN_WBR1U
, IQ2000BF_INSN_WBR1U
, IQ2000BF_SFMT_SYSCALL
},
180 { IQ2000_INSN_WBR30
, IQ2000BF_INSN_WBR30
, IQ2000BF_SFMT_SYSCALL
},
181 { IQ2000_INSN_WBR30U
, IQ2000BF_INSN_WBR30U
, IQ2000BF_SFMT_SYSCALL
},
182 { IQ2000_INSN_WX
, IQ2000BF_INSN_WX
, IQ2000BF_SFMT_SYSCALL
},
183 { IQ2000_INSN_WXU
, IQ2000BF_INSN_WXU
, IQ2000BF_SFMT_SYSCALL
},
184 { IQ2000_INSN_WXR1
, IQ2000BF_INSN_WXR1
, IQ2000BF_SFMT_SYSCALL
},
185 { IQ2000_INSN_WXR1U
, IQ2000BF_INSN_WXR1U
, IQ2000BF_SFMT_SYSCALL
},
186 { IQ2000_INSN_WXR30
, IQ2000BF_INSN_WXR30
, IQ2000BF_SFMT_SYSCALL
},
187 { IQ2000_INSN_WXR30U
, IQ2000BF_INSN_WXR30U
, IQ2000BF_SFMT_SYSCALL
},
188 { IQ2000_INSN_LDW
, IQ2000BF_INSN_LDW
, IQ2000BF_SFMT_LDW
},
189 { IQ2000_INSN_SDW
, IQ2000BF_INSN_SDW
, IQ2000BF_SFMT_SDW
},
190 { IQ2000_INSN_J
, IQ2000BF_INSN_J
, IQ2000BF_SFMT_J
},
191 { IQ2000_INSN_JAL
, IQ2000BF_INSN_JAL
, IQ2000BF_SFMT_JAL
},
192 { IQ2000_INSN_BMB
, IQ2000BF_INSN_BMB
, IQ2000BF_SFMT_BBV
},
195 static const struct insn_sem iq2000bf_insn_sem_invalid
=
197 VIRTUAL_INSN_X_INVALID
, IQ2000BF_INSN_X_INVALID
, IQ2000BF_SFMT_EMPTY
200 /* Initialize an IDESC from the compile-time computable parts. */
203 init_idesc (SIM_CPU
*cpu
, IDESC
*id
, const struct insn_sem
*t
)
205 const CGEN_INSN
*insn_table
= CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu
))->init_entries
;
209 if ((int) t
->type
<= 0)
210 id
->idata
= & cgen_virtual_insn_table
[- (int) t
->type
];
212 id
->idata
= & insn_table
[t
->type
];
213 id
->attrs
= CGEN_INSN_ATTRS (id
->idata
);
214 /* Oh my god, a magic number. */
215 id
->length
= CGEN_INSN_BITSIZE (id
->idata
) / 8;
217 #if WITH_PROFILE_MODEL_P
218 id
->timing
= & MODEL_TIMING (CPU_MODEL (cpu
)) [t
->index
];
220 SIM_DESC sd
= CPU_STATE (cpu
);
221 SIM_ASSERT (t
->index
== id
->timing
->num
);
225 /* Semantic pointers are initialized elsewhere. */
228 /* Initialize the instruction descriptor table. */
231 iq2000bf_init_idesc_table (SIM_CPU
*cpu
)
234 const struct insn_sem
*t
,*tend
;
235 int tabsize
= IQ2000BF_INSN__MAX
;
236 IDESC
*table
= iq2000bf_insn_data
;
238 memset (table
, 0, tabsize
* sizeof (IDESC
));
240 /* First set all entries to the `invalid insn'. */
241 t
= & iq2000bf_insn_sem_invalid
;
242 for (id
= table
, tabend
= table
+ tabsize
; id
< tabend
; ++id
)
243 init_idesc (cpu
, id
, t
);
245 /* Now fill in the values for the chosen cpu. */
246 for (t
= iq2000bf_insn_sem
, tend
= t
+ sizeof (iq2000bf_insn_sem
) / sizeof (*t
);
249 init_idesc (cpu
, & table
[t
->index
], t
);
252 /* Link the IDESC table into the cpu. */
253 CPU_IDESC (cpu
) = table
;
256 /* Given an instruction, return a pointer to its IDESC entry. */
259 iq2000bf_decode (SIM_CPU
*current_cpu
, IADDR pc
,
260 CGEN_INSN_WORD base_insn
, CGEN_INSN_WORD entire_insn
,
263 /* Result of decoder. */
264 IQ2000BF_INSN_TYPE itype
;
267 CGEN_INSN_WORD insn
= base_insn
;
270 unsigned int val
= (((insn
>> 26) & (63 << 0)));
275 unsigned int val
= (((insn
>> 1) & (1 << 4)) | ((insn
>> 0) & (15 << 0)));
279 if ((entire_insn
& 0xffe0003f) == 0x0)
280 { itype
= IQ2000BF_INSN_SLL
; goto extract_sfmt_sll
; }
281 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
283 if ((entire_insn
& 0xfc00003f) == 0x1)
284 { itype
= IQ2000BF_INSN_SLMV
; goto extract_sfmt_slmv
; }
285 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
287 if ((entire_insn
& 0xffe0003f) == 0x2)
288 { itype
= IQ2000BF_INSN_SRL
; goto extract_sfmt_sll
; }
289 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
291 if ((entire_insn
& 0xffe0003f) == 0x3)
292 { itype
= IQ2000BF_INSN_SRA
; goto extract_sfmt_sll
; }
293 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
295 if ((entire_insn
& 0xfc0007ff) == 0x4)
296 { itype
= IQ2000BF_INSN_SLLV
; goto extract_sfmt_add
; }
297 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
299 if ((entire_insn
& 0xfc00003f) == 0x5)
300 { itype
= IQ2000BF_INSN_SRMV
; goto extract_sfmt_slmv
; }
301 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
303 if ((entire_insn
& 0xfc0007ff) == 0x6)
304 { itype
= IQ2000BF_INSN_SRLV
; goto extract_sfmt_add
; }
305 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
307 if ((entire_insn
& 0xfc0007ff) == 0x7)
308 { itype
= IQ2000BF_INSN_SRAV
; goto extract_sfmt_add
; }
309 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
311 if ((entire_insn
& 0xfc1fffff) == 0x8)
312 { itype
= IQ2000BF_INSN_JR
; goto extract_sfmt_jr
; }
313 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
315 if ((entire_insn
& 0xfc1f07ff) == 0x9)
316 { itype
= IQ2000BF_INSN_JALR
; goto extract_sfmt_jalr
; }
317 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
319 if ((entire_insn
& 0xfc1fffff) == 0xa)
320 { itype
= IQ2000BF_INSN_JCR
; goto extract_sfmt_bctxt
; }
321 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
323 if ((entire_insn
& 0xfc00003f) == 0xc)
324 { itype
= IQ2000BF_INSN_SYSCALL
; goto extract_sfmt_syscall
; }
325 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
327 if ((entire_insn
& 0xffffffff) == 0xd)
328 { itype
= IQ2000BF_INSN_BREAK
; goto extract_sfmt_break
; }
329 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
331 if ((entire_insn
& 0xfc00003f) == 0xe)
332 { itype
= IQ2000BF_INSN_SLEEP
; goto extract_sfmt_syscall
; }
333 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
335 if ((entire_insn
& 0xfc0007ff) == 0x20)
336 { itype
= IQ2000BF_INSN_ADD
; goto extract_sfmt_add
; }
337 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
339 if ((entire_insn
& 0xfc0007ff) == 0x21)
340 { itype
= IQ2000BF_INSN_ADDU
; goto extract_sfmt_add
; }
341 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
343 if ((entire_insn
& 0xfc0007ff) == 0x22)
344 { itype
= IQ2000BF_INSN_SUB
; goto extract_sfmt_add
; }
345 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
347 if ((entire_insn
& 0xfc0007ff) == 0x23)
348 { itype
= IQ2000BF_INSN_SUBU
; goto extract_sfmt_add
; }
349 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
351 if ((entire_insn
& 0xfc0007ff) == 0x24)
352 { itype
= IQ2000BF_INSN_AND
; goto extract_sfmt_add
; }
353 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
355 if ((entire_insn
& 0xfc0007ff) == 0x25)
356 { itype
= IQ2000BF_INSN_OR
; goto extract_sfmt_add
; }
357 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
359 if ((entire_insn
& 0xfc0007ff) == 0x26)
360 { itype
= IQ2000BF_INSN_XOR
; goto extract_sfmt_add
; }
361 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
363 if ((entire_insn
& 0xfc0007ff) == 0x27)
364 { itype
= IQ2000BF_INSN_NOR
; goto extract_sfmt_add
; }
365 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
367 if ((entire_insn
& 0xfc0007ff) == 0x29)
368 { itype
= IQ2000BF_INSN_ADO16
; goto extract_sfmt_add
; }
369 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
371 if ((entire_insn
& 0xfc0007ff) == 0x2a)
372 { itype
= IQ2000BF_INSN_SLT
; goto extract_sfmt_slt
; }
373 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
375 if ((entire_insn
& 0xfc0007ff) == 0x2b)
376 { itype
= IQ2000BF_INSN_SLTU
; goto extract_sfmt_slt
; }
377 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
379 if ((entire_insn
& 0xfc00043f) == 0x2d)
380 { itype
= IQ2000BF_INSN_MRGB
; goto extract_sfmt_mrgb
; }
381 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
382 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
387 unsigned int val
= (((insn
>> 17) & (1 << 3)) | ((insn
>> 16) & (7 << 0)));
391 if ((entire_insn
& 0xfc1f0000) == 0x4000000)
392 { itype
= IQ2000BF_INSN_BLTZ
; goto extract_sfmt_bgez
; }
393 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
395 if ((entire_insn
& 0xfc1f0000) == 0x4010000)
396 { itype
= IQ2000BF_INSN_BGEZ
; goto extract_sfmt_bgez
; }
397 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
399 if ((entire_insn
& 0xfc1f0000) == 0x4020000)
400 { itype
= IQ2000BF_INSN_BLTZL
; goto extract_sfmt_bgez
; }
401 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
403 if ((entire_insn
& 0xfc1f0000) == 0x4030000)
404 { itype
= IQ2000BF_INSN_BGEZL
; goto extract_sfmt_bgez
; }
405 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
407 if ((entire_insn
& 0xfc1f0000) == 0x4060000)
408 { itype
= IQ2000BF_INSN_BCTXT
; goto extract_sfmt_bctxt
; }
409 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
411 if ((entire_insn
& 0xfc1f0000) == 0x4100000)
412 { itype
= IQ2000BF_INSN_BLTZAL
; goto extract_sfmt_bgezal
; }
413 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
415 if ((entire_insn
& 0xfc1f0000) == 0x4110000)
416 { itype
= IQ2000BF_INSN_BGEZAL
; goto extract_sfmt_bgezal
; }
417 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
419 if ((entire_insn
& 0xfc1f0000) == 0x4120000)
420 { itype
= IQ2000BF_INSN_BLTZALL
; goto extract_sfmt_bgezal
; }
421 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
423 if ((entire_insn
& 0xfc1f0000) == 0x4130000)
424 { itype
= IQ2000BF_INSN_BGEZALL
; goto extract_sfmt_bgezal
; }
425 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
426 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
430 if ((entire_insn
& 0xffff0000) == 0x8000000)
431 { itype
= IQ2000BF_INSN_J
; goto extract_sfmt_j
; }
432 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
434 if ((entire_insn
& 0xffff0000) == 0xc000000)
435 { itype
= IQ2000BF_INSN_JAL
; goto extract_sfmt_jal
; }
436 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
437 case 4 : itype
= IQ2000BF_INSN_BEQ
; goto extract_sfmt_bbv
;
438 case 5 : itype
= IQ2000BF_INSN_BNE
; goto extract_sfmt_bbv
;
440 if ((entire_insn
& 0xfc1f0000) == 0x18000000)
441 { itype
= IQ2000BF_INSN_BLEZ
; goto extract_sfmt_bgez
; }
442 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
444 if ((entire_insn
& 0xfc1f0000) == 0x1c000000)
445 { itype
= IQ2000BF_INSN_BGTZ
; goto extract_sfmt_bgez
; }
446 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
447 case 8 : itype
= IQ2000BF_INSN_ADDI
; goto extract_sfmt_addi
;
448 case 9 : itype
= IQ2000BF_INSN_ADDIU
; goto extract_sfmt_addi
;
449 case 10 : itype
= IQ2000BF_INSN_SLTI
; goto extract_sfmt_slti
;
450 case 11 : itype
= IQ2000BF_INSN_SLTIU
; goto extract_sfmt_slti
;
451 case 12 : itype
= IQ2000BF_INSN_ANDI
; goto extract_sfmt_addi
;
452 case 13 : itype
= IQ2000BF_INSN_ORI
; goto extract_sfmt_addi
;
453 case 14 : itype
= IQ2000BF_INSN_XORI
; goto extract_sfmt_addi
;
455 if ((entire_insn
& 0xffe00000) == 0x3c000000)
456 { itype
= IQ2000BF_INSN_LUI
; goto extract_sfmt_lui
; }
457 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
460 unsigned int val
= (((insn
>> 19) & (15 << 3)) | ((insn
>> 15) & (3 << 1)) | ((insn
>> 4) & (1 << 0)));
463 case 0 : /* fall through */
464 case 2 : /* fall through */
465 case 4 : /* fall through */
467 if ((entire_insn
& 0xffe007ff) == 0x40000000)
468 { itype
= IQ2000BF_INSN_MFC0
; goto extract_sfmt_syscall
; }
469 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
470 case 8 : /* fall through */
471 case 10 : /* fall through */
472 case 12 : /* fall through */
474 if ((entire_insn
& 0xffe007ff) == 0x40400000)
475 { itype
= IQ2000BF_INSN_CFC0
; goto extract_sfmt_syscall
; }
476 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
477 case 16 : /* fall through */
478 case 18 : /* fall through */
479 case 20 : /* fall through */
481 if ((entire_insn
& 0xffe007ff) == 0x40800000)
482 { itype
= IQ2000BF_INSN_MTC0
; goto extract_sfmt_syscall
; }
483 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
484 case 24 : /* fall through */
485 case 26 : /* fall through */
486 case 28 : /* fall through */
488 if ((entire_insn
& 0xffe007ff) == 0x40c00000)
489 { itype
= IQ2000BF_INSN_CTC0
; goto extract_sfmt_syscall
; }
490 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
491 case 32 : /* fall through */
493 if ((entire_insn
& 0xffff0000) == 0x41000000)
494 { itype
= IQ2000BF_INSN_BC0F
; goto extract_sfmt_bctxt
; }
495 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
496 case 34 : /* fall through */
498 if ((entire_insn
& 0xffff0000) == 0x41010000)
499 { itype
= IQ2000BF_INSN_BC0T
; goto extract_sfmt_bctxt
; }
500 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
501 case 36 : /* fall through */
503 if ((entire_insn
& 0xffff0000) == 0x41020000)
504 { itype
= IQ2000BF_INSN_BC0FL
; goto extract_sfmt_bctxt
; }
505 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
506 case 38 : /* fall through */
508 if ((entire_insn
& 0xffff0000) == 0x41030000)
509 { itype
= IQ2000BF_INSN_BC0TL
; goto extract_sfmt_bctxt
; }
510 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
512 if ((entire_insn
& 0xffffffff) == 0x42000010)
513 { itype
= IQ2000BF_INSN_RFE
; goto extract_sfmt_syscall
; }
514 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
515 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
520 unsigned int val
= (((insn
>> 22) & (3 << 0)));
524 if ((entire_insn
& 0xffe007ff) == 0x44000000)
525 { itype
= IQ2000BF_INSN_MFC1
; goto extract_sfmt_syscall
; }
526 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
528 if ((entire_insn
& 0xffe007ff) == 0x44400000)
529 { itype
= IQ2000BF_INSN_CFC1
; goto extract_sfmt_syscall
; }
530 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
532 if ((entire_insn
& 0xffe007ff) == 0x44800000)
533 { itype
= IQ2000BF_INSN_MTC1
; goto extract_sfmt_syscall
; }
534 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
536 if ((entire_insn
& 0xffe007ff) == 0x44c00000)
537 { itype
= IQ2000BF_INSN_CTC1
; goto extract_sfmt_syscall
; }
538 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
539 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
544 unsigned int val
= (((insn
>> 16) & (3 << 5)) | ((insn
>> 0) & (31 << 0)));
549 unsigned int val
= (((insn
>> 23) & (1 << 0)));
553 if ((entire_insn
& 0xffe007ff) == 0x48000000)
554 { itype
= IQ2000BF_INSN_MFC2
; goto extract_sfmt_syscall
; }
555 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
557 if ((entire_insn
& 0xffe007ff) == 0x48800000)
558 { itype
= IQ2000BF_INSN_MTC2
; goto extract_sfmt_syscall
; }
559 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
560 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
564 if ((entire_insn
& 0xffe0ffff) == 0x48200000)
565 { itype
= IQ2000BF_INSN_LUULCK
; goto extract_sfmt_syscall
; }
566 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
568 if ((entire_insn
& 0xffe007ff) == 0x48200001)
569 { itype
= IQ2000BF_INSN_LUR
; goto extract_sfmt_syscall
; }
570 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
572 if ((entire_insn
& 0xffe007ff) == 0x48200002)
573 { itype
= IQ2000BF_INSN_LUM32
; goto extract_sfmt_syscall
; }
574 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
576 if ((entire_insn
& 0xffe007ff) == 0x48200003)
577 { itype
= IQ2000BF_INSN_LUC32
; goto extract_sfmt_syscall
; }
578 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
580 if ((entire_insn
& 0xffe0ffff) == 0x48200004)
581 { itype
= IQ2000BF_INSN_LULCK
; goto extract_sfmt_syscall
; }
582 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
584 if ((entire_insn
& 0xffe007ff) == 0x48200005)
585 { itype
= IQ2000BF_INSN_LURL
; goto extract_sfmt_syscall
; }
586 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
588 if ((entire_insn
& 0xffe007ff) == 0x48200006)
589 { itype
= IQ2000BF_INSN_LUM32L
; goto extract_sfmt_syscall
; }
590 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
592 if ((entire_insn
& 0xffe007ff) == 0x48200007)
593 { itype
= IQ2000BF_INSN_LUC32L
; goto extract_sfmt_syscall
; }
594 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
596 if ((entire_insn
& 0xffe007ff) == 0x48200008)
597 { itype
= IQ2000BF_INSN_LUK
; goto extract_sfmt_syscall
; }
598 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
600 if ((entire_insn
& 0xffe007ff) == 0x4820000a)
601 { itype
= IQ2000BF_INSN_LUM64
; goto extract_sfmt_syscall
; }
602 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
604 if ((entire_insn
& 0xffe007ff) == 0x4820000b)
605 { itype
= IQ2000BF_INSN_LUC64
; goto extract_sfmt_syscall
; }
606 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
608 if ((entire_insn
& 0xffe007ff) == 0x4820000e)
609 { itype
= IQ2000BF_INSN_LUM64L
; goto extract_sfmt_syscall
; }
610 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
612 if ((entire_insn
& 0xffe007ff) == 0x4820000f)
613 { itype
= IQ2000BF_INSN_LUC64L
; goto extract_sfmt_syscall
; }
614 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
616 if ((entire_insn
& 0xffe0ffff) == 0x48200010)
617 { itype
= IQ2000BF_INSN_SRRD
; goto extract_sfmt_syscall
; }
618 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
620 if ((entire_insn
& 0xffe007ff) == 0x48200011)
621 { itype
= IQ2000BF_INSN_SRWR
; goto extract_sfmt_syscall
; }
622 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
624 if ((entire_insn
& 0xffe0ffff) == 0x48200014)
625 { itype
= IQ2000BF_INSN_SRRDL
; goto extract_sfmt_syscall
; }
626 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
628 if ((entire_insn
& 0xffe007ff) == 0x48200015)
629 { itype
= IQ2000BF_INSN_SRWRU
; goto extract_sfmt_syscall
; }
630 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
632 if ((entire_insn
& 0xffe0ffff) == 0x48200016)
633 { itype
= IQ2000BF_INSN_SRULCK
; goto extract_sfmt_syscall
; }
634 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
637 unsigned int val
= (((insn
>> 23) & (1 << 0)));
641 if ((entire_insn
& 0xffe007ff) == 0x48400000)
642 { itype
= IQ2000BF_INSN_CFC2
; goto extract_sfmt_syscall
; }
643 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
645 if ((entire_insn
& 0xffe007ff) == 0x48c00000)
646 { itype
= IQ2000BF_INSN_CTC2
; goto extract_sfmt_syscall
; }
647 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
648 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
651 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
656 unsigned int val
= (((insn
>> 19) & (31 << 2)) | ((insn
>> 0) & (3 << 0)));
660 if ((entire_insn
& 0xffe007ff) == 0x4c000000)
661 { itype
= IQ2000BF_INSN_MFC3
; goto extract_sfmt_syscall
; }
662 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
665 unsigned int val
= (((insn
>> 2) & (3 << 0)));
669 if ((entire_insn
& 0xffe007ff) == 0x4c200000)
670 { itype
= IQ2000BF_INSN_WB
; goto extract_sfmt_syscall
; }
671 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
673 if ((entire_insn
& 0xffe007ff) == 0x4c200004)
674 { itype
= IQ2000BF_INSN_RB
; goto extract_sfmt_syscall
; }
675 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
677 if ((entire_insn
& 0xffffffff) == 0x4c200008)
678 { itype
= IQ2000BF_INSN_TRAPQFL
; goto extract_sfmt_syscall
; }
679 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
680 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
685 unsigned int val
= (((insn
>> 3) & (1 << 0)));
689 if ((entire_insn
& 0xffe007ff) == 0x4c200001)
690 { itype
= IQ2000BF_INSN_WBU
; goto extract_sfmt_syscall
; }
691 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
693 if ((entire_insn
& 0xffffffff) == 0x4c200009)
694 { itype
= IQ2000BF_INSN_TRAPQNE
; goto extract_sfmt_syscall
; }
695 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
696 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
701 unsigned int val
= (((insn
>> 2) & (3 << 0)));
705 if ((entire_insn
& 0xffe007ff) == 0x4c200002)
706 { itype
= IQ2000BF_INSN_WX
; goto extract_sfmt_syscall
; }
707 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
709 if ((entire_insn
& 0xffe007ff) == 0x4c200006)
710 { itype
= IQ2000BF_INSN_RX
; goto extract_sfmt_syscall
; }
711 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
713 if ((entire_insn
& 0xffe0ffff) == 0x4c20000a)
714 { itype
= IQ2000BF_INSN_TRAPREL
; goto extract_sfmt_syscall
; }
715 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
716 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
721 unsigned int val
= (((insn
>> 2) & (1 << 0)));
725 if ((entire_insn
& 0xffe007ff) == 0x4c200003)
726 { itype
= IQ2000BF_INSN_WXU
; goto extract_sfmt_syscall
; }
727 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
729 if ((entire_insn
& 0xffe007ff) == 0x4c200007)
730 { itype
= IQ2000BF_INSN_PKRL
; goto extract_sfmt_syscall
; }
731 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
732 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
736 if ((entire_insn
& 0xffe007ff) == 0x4c400000)
737 { itype
= IQ2000BF_INSN_CFC3
; goto extract_sfmt_syscall
; }
738 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
740 if ((entire_insn
& 0xffe007ff) == 0x4c800000)
741 { itype
= IQ2000BF_INSN_MTC3
; goto extract_sfmt_syscall
; }
742 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
744 if ((entire_insn
& 0xffe007ff) == 0x4cc00000)
745 { itype
= IQ2000BF_INSN_CTC3
; goto extract_sfmt_syscall
; }
746 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
747 case 32 : /* fall through */
748 case 33 : /* fall through */
749 case 34 : /* fall through */
752 unsigned int val
= (((insn
>> 16) & (3 << 0)));
756 if ((entire_insn
& 0xffff0000) == 0x4d000000)
757 { itype
= IQ2000BF_INSN_BC3F
; goto extract_sfmt_bctxt
; }
758 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
760 if ((entire_insn
& 0xffff0000) == 0x4d010000)
761 { itype
= IQ2000BF_INSN_BC3T
; goto extract_sfmt_bctxt
; }
762 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
764 if ((entire_insn
& 0xffff0000) == 0x4d020000)
765 { itype
= IQ2000BF_INSN_BC3FL
; goto extract_sfmt_bctxt
; }
766 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
768 if ((entire_insn
& 0xffff0000) == 0x4d030000)
769 { itype
= IQ2000BF_INSN_BC3TL
; goto extract_sfmt_bctxt
; }
770 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
771 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
775 if ((entire_insn
& 0xffe007ff) == 0x4d200000)
776 { itype
= IQ2000BF_INSN_CHKHDR
; goto extract_sfmt_syscall
; }
777 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
778 case 64 : /* fall through */
779 case 65 : /* fall through */
780 case 66 : /* fall through */
781 case 67 : itype
= IQ2000BF_INSN_WBR1
; goto extract_sfmt_syscall
;
782 case 68 : /* fall through */
783 case 69 : /* fall through */
784 case 70 : /* fall through */
785 case 71 : itype
= IQ2000BF_INSN_WBR1U
; goto extract_sfmt_syscall
;
786 case 72 : /* fall through */
787 case 73 : /* fall through */
788 case 74 : /* fall through */
789 case 75 : itype
= IQ2000BF_INSN_WBR30
; goto extract_sfmt_syscall
;
790 case 76 : /* fall through */
791 case 77 : /* fall through */
792 case 78 : /* fall through */
793 case 79 : itype
= IQ2000BF_INSN_WBR30U
; goto extract_sfmt_syscall
;
794 case 80 : /* fall through */
795 case 81 : /* fall through */
796 case 82 : /* fall through */
797 case 83 : itype
= IQ2000BF_INSN_WXR1
; goto extract_sfmt_syscall
;
798 case 84 : /* fall through */
799 case 85 : /* fall through */
800 case 86 : /* fall through */
801 case 87 : itype
= IQ2000BF_INSN_WXR1U
; goto extract_sfmt_syscall
;
802 case 88 : /* fall through */
803 case 89 : /* fall through */
804 case 90 : /* fall through */
805 case 91 : itype
= IQ2000BF_INSN_WXR30
; goto extract_sfmt_syscall
;
806 case 92 : /* fall through */
807 case 93 : /* fall through */
808 case 94 : /* fall through */
809 case 95 : itype
= IQ2000BF_INSN_WXR30U
; goto extract_sfmt_syscall
;
810 case 96 : /* fall through */
811 case 97 : /* fall through */
812 case 98 : /* fall through */
813 case 99 : itype
= IQ2000BF_INSN_RBR1
; goto extract_sfmt_syscall
;
814 case 104 : /* fall through */
815 case 105 : /* fall through */
816 case 106 : /* fall through */
817 case 107 : itype
= IQ2000BF_INSN_RBR30
; goto extract_sfmt_syscall
;
818 case 112 : /* fall through */
819 case 113 : /* fall through */
820 case 114 : /* fall through */
821 case 115 : itype
= IQ2000BF_INSN_RXR1
; goto extract_sfmt_syscall
;
822 case 116 : /* fall through */
823 case 117 : /* fall through */
824 case 118 : /* fall through */
825 case 119 : itype
= IQ2000BF_INSN_PKRLR1
; goto extract_sfmt_syscall
;
826 case 120 : /* fall through */
827 case 121 : /* fall through */
828 case 122 : /* fall through */
829 case 123 : itype
= IQ2000BF_INSN_RXR30
; goto extract_sfmt_syscall
;
830 case 124 : /* fall through */
831 case 125 : /* fall through */
832 case 126 : /* fall through */
833 case 127 : itype
= IQ2000BF_INSN_PKRLR30
; goto extract_sfmt_syscall
;
834 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
837 case 20 : itype
= IQ2000BF_INSN_BEQL
; goto extract_sfmt_bbv
;
838 case 21 : itype
= IQ2000BF_INSN_BNEL
; goto extract_sfmt_bbv
;
840 if ((entire_insn
& 0xfc1f0000) == 0x58000000)
841 { itype
= IQ2000BF_INSN_BLEZL
; goto extract_sfmt_bgez
; }
842 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
844 if ((entire_insn
& 0xfc1f0000) == 0x5c000000)
845 { itype
= IQ2000BF_INSN_BGTZL
; goto extract_sfmt_bgez
; }
846 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
847 case 24 : itype
= IQ2000BF_INSN_BMB0
; goto extract_sfmt_bbv
;
848 case 25 : itype
= IQ2000BF_INSN_BMB1
; goto extract_sfmt_bbv
;
849 case 26 : itype
= IQ2000BF_INSN_BMB2
; goto extract_sfmt_bbv
;
850 case 27 : itype
= IQ2000BF_INSN_BMB3
; goto extract_sfmt_bbv
;
851 case 28 : itype
= IQ2000BF_INSN_BBI
; goto extract_sfmt_bbi
;
852 case 29 : itype
= IQ2000BF_INSN_BBV
; goto extract_sfmt_bbv
;
853 case 30 : itype
= IQ2000BF_INSN_BBIN
; goto extract_sfmt_bbi
;
854 case 31 : itype
= IQ2000BF_INSN_BBVN
; goto extract_sfmt_bbv
;
855 case 32 : itype
= IQ2000BF_INSN_LB
; goto extract_sfmt_lb
;
856 case 33 : itype
= IQ2000BF_INSN_LH
; goto extract_sfmt_lh
;
857 case 35 : itype
= IQ2000BF_INSN_LW
; goto extract_sfmt_lw
;
858 case 36 : itype
= IQ2000BF_INSN_LBU
; goto extract_sfmt_lb
;
859 case 37 : itype
= IQ2000BF_INSN_LHU
; goto extract_sfmt_lh
;
861 if ((entire_insn
& 0xfc000020) == 0x9c000000)
862 { itype
= IQ2000BF_INSN_RAM
; goto extract_sfmt_ram
; }
863 itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
864 case 40 : itype
= IQ2000BF_INSN_SB
; goto extract_sfmt_sb
;
865 case 41 : itype
= IQ2000BF_INSN_SH
; goto extract_sfmt_sh
;
866 case 43 : itype
= IQ2000BF_INSN_SW
; goto extract_sfmt_sw
;
867 case 44 : itype
= IQ2000BF_INSN_ANDOI
; goto extract_sfmt_addi
;
868 case 45 : itype
= IQ2000BF_INSN_BMB
; goto extract_sfmt_bbv
;
869 case 47 : itype
= IQ2000BF_INSN_ORUI
; goto extract_sfmt_andoui
;
870 case 48 : itype
= IQ2000BF_INSN_LDW
; goto extract_sfmt_ldw
;
871 case 56 : itype
= IQ2000BF_INSN_SDW
; goto extract_sfmt_sdw
;
872 case 63 : itype
= IQ2000BF_INSN_ANDOUI
; goto extract_sfmt_andoui
;
873 default : itype
= IQ2000BF_INSN_X_INVALID
; goto extract_sfmt_empty
;
878 /* The instruction has been decoded, now extract the fields. */
882 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
883 #define FLD(f) abuf->fields.sfmt_empty.f
886 /* Record the fields for the semantic handler. */
887 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_empty", (char *) 0));
895 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
896 CGEN_INSN_WORD insn
= entire_insn
;
897 #define FLD(f) abuf->fields.sfmt_mrgb.f
902 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
903 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
904 f_rd
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
906 /* Record the fields for the semantic handler. */
910 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));
918 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
919 CGEN_INSN_WORD insn
= entire_insn
;
920 #define FLD(f) abuf->fields.sfmt_addi.f
925 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
926 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
927 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
929 /* Record the fields for the semantic handler. */
933 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));
941 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
942 CGEN_INSN_WORD insn
= entire_insn
;
943 #define FLD(f) abuf->fields.sfmt_ram.f
950 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
951 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
952 f_rd
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
953 f_shamt
= EXTRACT_LSB0_UINT (insn
, 32, 10, 5);
954 f_maskl
= EXTRACT_LSB0_UINT (insn
, 32, 4, 5);
956 /* Record the fields for the semantic handler. */
957 FLD (f_maskl
) = f_maskl
;
961 FLD (f_shamt
) = f_shamt
;
962 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));
970 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
971 CGEN_INSN_WORD insn
= entire_insn
;
972 #define FLD(f) abuf->fields.sfmt_ram.f
977 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
978 f_rd
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
979 f_shamt
= EXTRACT_LSB0_UINT (insn
, 32, 10, 5);
981 /* Record the fields for the semantic handler. */
983 FLD (f_shamt
) = f_shamt
;
985 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));
993 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
994 CGEN_INSN_WORD insn
= entire_insn
;
995 #define FLD(f) abuf->fields.sfmt_ram.f
1001 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1002 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1003 f_rd
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
1004 f_shamt
= EXTRACT_LSB0_UINT (insn
, 32, 10, 5);
1006 /* Record the fields for the semantic handler. */
1009 FLD (f_shamt
) = f_shamt
;
1011 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));
1019 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1020 CGEN_INSN_WORD insn
= entire_insn
;
1021 #define FLD(f) abuf->fields.sfmt_mrgb.f
1026 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1027 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1028 f_rd
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
1030 /* Record the fields for the semantic handler. */
1034 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));
1042 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1043 CGEN_INSN_WORD insn
= entire_insn
;
1044 #define FLD(f) abuf->fields.sfmt_addi.f
1049 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1050 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1051 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1053 /* Record the fields for the semantic handler. */
1054 FLD (f_imm
) = f_imm
;
1057 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));
1065 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1066 CGEN_INSN_WORD insn
= entire_insn
;
1067 #define FLD(f) abuf->fields.sfmt_bbi.f
1072 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1073 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1074 f_offset
= ((((EXTRACT_LSB0_SINT (insn
, 32, 15, 16)) << (2))) + (((pc
) + (4))));
1076 /* Record the fields for the semantic handler. */
1079 FLD (i_offset
) = f_offset
;
1080 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));
1082 #if WITH_PROFILE_MODEL_P
1083 /* Record the fields for profiling. */
1084 if (PROFILE_MODEL_P (current_cpu
))
1094 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1095 CGEN_INSN_WORD insn
= entire_insn
;
1096 #define FLD(f) abuf->fields.sfmt_bbi.f
1101 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1102 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1103 f_offset
= ((((EXTRACT_LSB0_SINT (insn
, 32, 15, 16)) << (2))) + (((pc
) + (4))));
1105 /* Record the fields for the semantic handler. */
1108 FLD (i_offset
) = f_offset
;
1109 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));
1111 #if WITH_PROFILE_MODEL_P
1112 /* Record the fields for profiling. */
1113 if (PROFILE_MODEL_P (current_cpu
))
1123 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1124 CGEN_INSN_WORD insn
= entire_insn
;
1125 #define FLD(f) abuf->fields.sfmt_bbi.f
1129 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1130 f_offset
= ((((EXTRACT_LSB0_SINT (insn
, 32, 15, 16)) << (2))) + (((pc
) + (4))));
1132 /* Record the fields for the semantic handler. */
1134 FLD (i_offset
) = f_offset
;
1135 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));
1137 #if WITH_PROFILE_MODEL_P
1138 /* Record the fields for profiling. */
1139 if (PROFILE_MODEL_P (current_cpu
))
1147 extract_sfmt_bgezal
:
1149 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1150 CGEN_INSN_WORD insn
= entire_insn
;
1151 #define FLD(f) abuf->fields.sfmt_bbi.f
1155 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1156 f_offset
= ((((EXTRACT_LSB0_SINT (insn
, 32, 15, 16)) << (2))) + (((pc
) + (4))));
1158 /* Record the fields for the semantic handler. */
1160 FLD (i_offset
) = f_offset
;
1161 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));
1163 #if WITH_PROFILE_MODEL_P
1164 /* Record the fields for profiling. */
1165 if (PROFILE_MODEL_P (current_cpu
))
1175 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1176 CGEN_INSN_WORD insn
= entire_insn
;
1177 #define FLD(f) abuf->fields.sfmt_mrgb.f
1181 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1182 f_rd
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
1184 /* Record the fields for the semantic handler. */
1187 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));
1189 #if WITH_PROFILE_MODEL_P
1190 /* Record the fields for profiling. */
1191 if (PROFILE_MODEL_P (current_cpu
))
1201 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1202 CGEN_INSN_WORD insn
= entire_insn
;
1203 #define FLD(f) abuf->fields.sfmt_bbi.f
1206 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1208 /* Record the fields for the semantic handler. */
1210 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_jr", "f_rs 0x%x", 'x', f_rs
, (char *) 0));
1212 #if WITH_PROFILE_MODEL_P
1213 /* Record the fields for profiling. */
1214 if (PROFILE_MODEL_P (current_cpu
))
1224 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1225 CGEN_INSN_WORD insn
= entire_insn
;
1226 #define FLD(f) abuf->fields.sfmt_addi.f
1231 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1232 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1233 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1235 /* Record the fields for the semantic handler. */
1237 FLD (f_imm
) = f_imm
;
1239 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));
1247 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1248 CGEN_INSN_WORD insn
= entire_insn
;
1249 #define FLD(f) abuf->fields.sfmt_addi.f
1254 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1255 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1256 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1258 /* Record the fields for the semantic handler. */
1260 FLD (f_imm
) = f_imm
;
1262 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));
1270 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1271 CGEN_INSN_WORD insn
= entire_insn
;
1272 #define FLD(f) abuf->fields.sfmt_addi.f
1276 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1277 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1279 /* Record the fields for the semantic handler. */
1280 FLD (f_imm
) = f_imm
;
1282 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));
1290 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1291 CGEN_INSN_WORD insn
= entire_insn
;
1292 #define FLD(f) abuf->fields.sfmt_addi.f
1297 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1298 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1299 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1301 /* Record the fields for the semantic handler. */
1303 FLD (f_imm
) = f_imm
;
1305 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));
1313 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1314 CGEN_INSN_WORD insn
= entire_insn
;
1315 #define FLD(f) abuf->fields.sfmt_addi.f
1320 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1321 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1322 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1324 /* Record the fields for the semantic handler. */
1326 FLD (f_imm
) = f_imm
;
1328 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));
1336 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1337 CGEN_INSN_WORD insn
= entire_insn
;
1338 #define FLD(f) abuf->fields.sfmt_addi.f
1343 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1344 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1345 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1347 /* Record the fields for the semantic handler. */
1349 FLD (f_imm
) = f_imm
;
1351 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));
1359 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1360 CGEN_INSN_WORD insn
= entire_insn
;
1361 #define FLD(f) abuf->fields.sfmt_addi.f
1366 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1367 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1368 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1370 /* Record the fields for the semantic handler. */
1372 FLD (f_imm
) = f_imm
;
1374 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));
1382 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1383 #define FLD(f) abuf->fields.sfmt_empty.f
1386 /* Record the fields for the semantic handler. */
1387 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_break", (char *) 0));
1389 #if WITH_PROFILE_MODEL_P
1390 /* Record the fields for profiling. */
1391 if (PROFILE_MODEL_P (current_cpu
))
1399 extract_sfmt_syscall
:
1401 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1402 #define FLD(f) abuf->fields.sfmt_empty.f
1405 /* Record the fields for the semantic handler. */
1406 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_syscall", (char *) 0));
1412 extract_sfmt_andoui
:
1414 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1415 CGEN_INSN_WORD insn
= entire_insn
;
1416 #define FLD(f) abuf->fields.sfmt_addi.f
1421 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1422 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1423 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1425 /* Record the fields for the semantic handler. */
1426 FLD (f_imm
) = f_imm
;
1429 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));
1437 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1438 CGEN_INSN_WORD insn
= entire_insn
;
1439 #define FLD(f) abuf->fields.sfmt_mrgb.f
1445 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1446 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1447 f_rd
= EXTRACT_LSB0_UINT (insn
, 32, 15, 5);
1448 f_mask
= EXTRACT_LSB0_UINT (insn
, 32, 9, 4);
1450 /* Record the fields for the semantic handler. */
1451 FLD (f_mask
) = f_mask
;
1455 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));
1463 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1464 #define FLD(f) abuf->fields.sfmt_empty.f
1467 /* Record the fields for the semantic handler. */
1468 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_bctxt", (char *) 0));
1476 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1477 CGEN_INSN_WORD insn
= entire_insn
;
1478 #define FLD(f) abuf->fields.sfmt_addi.f
1483 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1484 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1485 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1487 /* Record the fields for the semantic handler. */
1490 FLD (f_imm
) = f_imm
;
1491 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));
1499 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1500 CGEN_INSN_WORD insn
= entire_insn
;
1501 #define FLD(f) abuf->fields.sfmt_addi.f
1506 f_rs
= EXTRACT_LSB0_UINT (insn
, 32, 25, 5);
1507 f_rt
= EXTRACT_LSB0_UINT (insn
, 32, 20, 5);
1508 f_imm
= EXTRACT_LSB0_UINT (insn
, 32, 15, 16);
1510 /* Record the fields for the semantic handler. */
1513 FLD (f_imm
) = f_imm
;
1514 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));
1522 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1523 CGEN_INSN_WORD insn
= entire_insn
;
1524 #define FLD(f) abuf->fields.sfmt_j.f
1527 f_jtarg
= ((((pc
) & (0xf0000000))) | (((EXTRACT_LSB0_UINT (insn
, 32, 15, 16)) << (2))));
1529 /* Record the fields for the semantic handler. */
1530 FLD (i_jmptarg
) = f_jtarg
;
1531 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_j", "jmptarg 0x%x", 'x', f_jtarg
, (char *) 0));
1533 #if WITH_PROFILE_MODEL_P
1534 /* Record the fields for profiling. */
1535 if (PROFILE_MODEL_P (current_cpu
))
1545 const IDESC
*idesc
= &iq2000bf_insn_data
[itype
];
1546 CGEN_INSN_WORD insn
= entire_insn
;
1547 #define FLD(f) abuf->fields.sfmt_j.f
1550 f_jtarg
= ((((pc
) & (0xf0000000))) | (((EXTRACT_LSB0_UINT (insn
, 32, 15, 16)) << (2))));
1552 /* Record the fields for the semantic handler. */
1553 FLD (i_jmptarg
) = f_jtarg
;
1554 TRACE_EXTRACT (current_cpu
, abuf
, (current_cpu
, pc
, "sfmt_jal", "jmptarg 0x%x", 'x', f_jtarg
, (char *) 0));
1556 #if WITH_PROFILE_MODEL_P
1557 /* Record the fields for profiling. */
1558 if (PROFILE_MODEL_P (current_cpu
))