Commit | Line | Data |
---|---|---|
6e51bfa7 SH |
1 | /* Simulator instruction decoder for or1k32bf. |
2 | ||
3 | THIS FILE IS MACHINE GENERATED WITH CGEN. | |
4 | ||
e2882c85 | 5 | Copyright 1996-2018 Free Software Foundation, Inc. |
6e51bfa7 SH |
6 | |
7 | This file is part of the GNU simulators. | |
8 | ||
9 | This file is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
11 | the Free Software Foundation; either version 3, or (at your option) | |
12 | any later version. | |
13 | ||
14 | It is distributed in the hope that it will be useful, but WITHOUT | |
15 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
16 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
17 | License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License along | |
20 | with this program; if not, write to the Free Software Foundation, Inc., | |
21 | 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
22 | ||
23 | */ | |
24 | ||
25 | #define WANT_CPU or1k32bf | |
26 | #define WANT_CPU_OR1K32BF | |
27 | ||
28 | #include "sim-main.h" | |
29 | #include "sim-assert.h" | |
30 | ||
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 or1k32bf_insn_data[OR1K32BF_INSN__MAX]; | |
37 | ||
38 | /* Commas between elements are contained in the macros. | |
39 | Some of these are conditionally compiled out. */ | |
40 | ||
41 | static const struct insn_sem or1k32bf_insn_sem[] = | |
42 | { | |
43 | { VIRTUAL_INSN_X_INVALID, OR1K32BF_INSN_X_INVALID, OR1K32BF_SFMT_EMPTY }, | |
44 | { VIRTUAL_INSN_X_AFTER, OR1K32BF_INSN_X_AFTER, OR1K32BF_SFMT_EMPTY }, | |
45 | { VIRTUAL_INSN_X_BEFORE, OR1K32BF_INSN_X_BEFORE, OR1K32BF_SFMT_EMPTY }, | |
46 | { VIRTUAL_INSN_X_CTI_CHAIN, OR1K32BF_INSN_X_CTI_CHAIN, OR1K32BF_SFMT_EMPTY }, | |
47 | { VIRTUAL_INSN_X_CHAIN, OR1K32BF_INSN_X_CHAIN, OR1K32BF_SFMT_EMPTY }, | |
48 | { VIRTUAL_INSN_X_BEGIN, OR1K32BF_INSN_X_BEGIN, OR1K32BF_SFMT_EMPTY }, | |
49 | { OR1K_INSN_L_J, OR1K32BF_INSN_L_J, OR1K32BF_SFMT_L_J }, | |
07f5f4c6 | 50 | { OR1K_INSN_L_ADRP, OR1K32BF_INSN_L_ADRP, OR1K32BF_SFMT_L_ADRP }, |
6e51bfa7 SH |
51 | { OR1K_INSN_L_JAL, OR1K32BF_INSN_L_JAL, OR1K32BF_SFMT_L_JAL }, |
52 | { OR1K_INSN_L_JR, OR1K32BF_INSN_L_JR, OR1K32BF_SFMT_L_JR }, | |
53 | { OR1K_INSN_L_JALR, OR1K32BF_INSN_L_JALR, OR1K32BF_SFMT_L_JALR }, | |
54 | { OR1K_INSN_L_BNF, OR1K32BF_INSN_L_BNF, OR1K32BF_SFMT_L_BNF }, | |
55 | { OR1K_INSN_L_BF, OR1K32BF_INSN_L_BF, OR1K32BF_SFMT_L_BNF }, | |
56 | { OR1K_INSN_L_TRAP, OR1K32BF_INSN_L_TRAP, OR1K32BF_SFMT_L_TRAP }, | |
57 | { OR1K_INSN_L_SYS, OR1K32BF_INSN_L_SYS, OR1K32BF_SFMT_L_TRAP }, | |
58 | { OR1K_INSN_L_MSYNC, OR1K32BF_INSN_L_MSYNC, OR1K32BF_SFMT_L_MSYNC }, | |
59 | { OR1K_INSN_L_PSYNC, OR1K32BF_INSN_L_PSYNC, OR1K32BF_SFMT_L_MSYNC }, | |
60 | { OR1K_INSN_L_CSYNC, OR1K32BF_INSN_L_CSYNC, OR1K32BF_SFMT_L_MSYNC }, | |
61 | { OR1K_INSN_L_RFE, OR1K32BF_INSN_L_RFE, OR1K32BF_SFMT_L_MSYNC }, | |
62 | { OR1K_INSN_L_NOP_IMM, OR1K32BF_INSN_L_NOP_IMM, OR1K32BF_SFMT_L_NOP_IMM }, | |
63 | { OR1K_INSN_L_MOVHI, OR1K32BF_INSN_L_MOVHI, OR1K32BF_SFMT_L_MOVHI }, | |
64 | { OR1K_INSN_L_MACRC, OR1K32BF_INSN_L_MACRC, OR1K32BF_SFMT_L_MACRC }, | |
65 | { OR1K_INSN_L_MFSPR, OR1K32BF_INSN_L_MFSPR, OR1K32BF_SFMT_L_MFSPR }, | |
66 | { OR1K_INSN_L_MTSPR, OR1K32BF_INSN_L_MTSPR, OR1K32BF_SFMT_L_MTSPR }, | |
67 | { OR1K_INSN_L_LWZ, OR1K32BF_INSN_L_LWZ, OR1K32BF_SFMT_L_LWZ }, | |
68 | { OR1K_INSN_L_LWS, OR1K32BF_INSN_L_LWS, OR1K32BF_SFMT_L_LWS }, | |
69 | { OR1K_INSN_L_LWA, OR1K32BF_INSN_L_LWA, OR1K32BF_SFMT_L_LWA }, | |
70 | { OR1K_INSN_L_LBZ, OR1K32BF_INSN_L_LBZ, OR1K32BF_SFMT_L_LBZ }, | |
71 | { OR1K_INSN_L_LBS, OR1K32BF_INSN_L_LBS, OR1K32BF_SFMT_L_LBS }, | |
72 | { OR1K_INSN_L_LHZ, OR1K32BF_INSN_L_LHZ, OR1K32BF_SFMT_L_LHZ }, | |
73 | { OR1K_INSN_L_LHS, OR1K32BF_INSN_L_LHS, OR1K32BF_SFMT_L_LHS }, | |
74 | { OR1K_INSN_L_SW, OR1K32BF_INSN_L_SW, OR1K32BF_SFMT_L_SW }, | |
75 | { OR1K_INSN_L_SB, OR1K32BF_INSN_L_SB, OR1K32BF_SFMT_L_SB }, | |
76 | { OR1K_INSN_L_SH, OR1K32BF_INSN_L_SH, OR1K32BF_SFMT_L_SH }, | |
77 | { OR1K_INSN_L_SWA, OR1K32BF_INSN_L_SWA, OR1K32BF_SFMT_L_SWA }, | |
78 | { OR1K_INSN_L_SLL, OR1K32BF_INSN_L_SLL, OR1K32BF_SFMT_L_SLL }, | |
79 | { OR1K_INSN_L_SLLI, OR1K32BF_INSN_L_SLLI, OR1K32BF_SFMT_L_SLLI }, | |
80 | { OR1K_INSN_L_SRL, OR1K32BF_INSN_L_SRL, OR1K32BF_SFMT_L_SLL }, | |
81 | { OR1K_INSN_L_SRLI, OR1K32BF_INSN_L_SRLI, OR1K32BF_SFMT_L_SLLI }, | |
82 | { OR1K_INSN_L_SRA, OR1K32BF_INSN_L_SRA, OR1K32BF_SFMT_L_SLL }, | |
83 | { OR1K_INSN_L_SRAI, OR1K32BF_INSN_L_SRAI, OR1K32BF_SFMT_L_SLLI }, | |
84 | { OR1K_INSN_L_ROR, OR1K32BF_INSN_L_ROR, OR1K32BF_SFMT_L_SLL }, | |
85 | { OR1K_INSN_L_RORI, OR1K32BF_INSN_L_RORI, OR1K32BF_SFMT_L_SLLI }, | |
86 | { OR1K_INSN_L_AND, OR1K32BF_INSN_L_AND, OR1K32BF_SFMT_L_AND }, | |
87 | { OR1K_INSN_L_OR, OR1K32BF_INSN_L_OR, OR1K32BF_SFMT_L_AND }, | |
88 | { OR1K_INSN_L_XOR, OR1K32BF_INSN_L_XOR, OR1K32BF_SFMT_L_AND }, | |
89 | { OR1K_INSN_L_ADD, OR1K32BF_INSN_L_ADD, OR1K32BF_SFMT_L_ADD }, | |
90 | { OR1K_INSN_L_SUB, OR1K32BF_INSN_L_SUB, OR1K32BF_SFMT_L_ADD }, | |
91 | { OR1K_INSN_L_ADDC, OR1K32BF_INSN_L_ADDC, OR1K32BF_SFMT_L_ADDC }, | |
07f5f4c6 RH |
92 | { OR1K_INSN_L_MUL, OR1K32BF_INSN_L_MUL, OR1K32BF_SFMT_L_MUL }, |
93 | { OR1K_INSN_L_MULD, OR1K32BF_INSN_L_MULD, OR1K32BF_SFMT_L_MULD }, | |
94 | { OR1K_INSN_L_MULU, OR1K32BF_INSN_L_MULU, OR1K32BF_SFMT_L_MULU }, | |
95 | { OR1K_INSN_L_MULDU, OR1K32BF_INSN_L_MULDU, OR1K32BF_SFMT_L_MULD }, | |
6e51bfa7 | 96 | { OR1K_INSN_L_DIV, OR1K32BF_INSN_L_DIV, OR1K32BF_SFMT_L_DIV }, |
07f5f4c6 | 97 | { OR1K_INSN_L_DIVU, OR1K32BF_INSN_L_DIVU, OR1K32BF_SFMT_L_DIVU }, |
6e51bfa7 SH |
98 | { OR1K_INSN_L_FF1, OR1K32BF_INSN_L_FF1, OR1K32BF_SFMT_L_FF1 }, |
99 | { OR1K_INSN_L_FL1, OR1K32BF_INSN_L_FL1, OR1K32BF_SFMT_L_FF1 }, | |
100 | { OR1K_INSN_L_ANDI, OR1K32BF_INSN_L_ANDI, OR1K32BF_SFMT_L_MFSPR }, | |
101 | { OR1K_INSN_L_ORI, OR1K32BF_INSN_L_ORI, OR1K32BF_SFMT_L_MFSPR }, | |
102 | { OR1K_INSN_L_XORI, OR1K32BF_INSN_L_XORI, OR1K32BF_SFMT_L_XORI }, | |
103 | { OR1K_INSN_L_ADDI, OR1K32BF_INSN_L_ADDI, OR1K32BF_SFMT_L_ADDI }, | |
104 | { OR1K_INSN_L_ADDIC, OR1K32BF_INSN_L_ADDIC, OR1K32BF_SFMT_L_ADDIC }, | |
07f5f4c6 | 105 | { OR1K_INSN_L_MULI, OR1K32BF_INSN_L_MULI, OR1K32BF_SFMT_L_MULI }, |
6e51bfa7 SH |
106 | { OR1K_INSN_L_EXTHS, OR1K32BF_INSN_L_EXTHS, OR1K32BF_SFMT_L_EXTHS }, |
107 | { OR1K_INSN_L_EXTBS, OR1K32BF_INSN_L_EXTBS, OR1K32BF_SFMT_L_EXTHS }, | |
108 | { OR1K_INSN_L_EXTHZ, OR1K32BF_INSN_L_EXTHZ, OR1K32BF_SFMT_L_EXTHS }, | |
109 | { OR1K_INSN_L_EXTBZ, OR1K32BF_INSN_L_EXTBZ, OR1K32BF_SFMT_L_EXTHS }, | |
110 | { OR1K_INSN_L_EXTWS, OR1K32BF_INSN_L_EXTWS, OR1K32BF_SFMT_L_EXTHS }, | |
111 | { OR1K_INSN_L_EXTWZ, OR1K32BF_INSN_L_EXTWZ, OR1K32BF_SFMT_L_EXTHS }, | |
112 | { OR1K_INSN_L_CMOV, OR1K32BF_INSN_L_CMOV, OR1K32BF_SFMT_L_CMOV }, | |
113 | { OR1K_INSN_L_SFGTS, OR1K32BF_INSN_L_SFGTS, OR1K32BF_SFMT_L_SFGTS }, | |
114 | { OR1K_INSN_L_SFGTSI, OR1K32BF_INSN_L_SFGTSI, OR1K32BF_SFMT_L_SFGTSI }, | |
115 | { OR1K_INSN_L_SFGTU, OR1K32BF_INSN_L_SFGTU, OR1K32BF_SFMT_L_SFGTS }, | |
116 | { OR1K_INSN_L_SFGTUI, OR1K32BF_INSN_L_SFGTUI, OR1K32BF_SFMT_L_SFGTSI }, | |
117 | { OR1K_INSN_L_SFGES, OR1K32BF_INSN_L_SFGES, OR1K32BF_SFMT_L_SFGTS }, | |
118 | { OR1K_INSN_L_SFGESI, OR1K32BF_INSN_L_SFGESI, OR1K32BF_SFMT_L_SFGTSI }, | |
119 | { OR1K_INSN_L_SFGEU, OR1K32BF_INSN_L_SFGEU, OR1K32BF_SFMT_L_SFGTS }, | |
120 | { OR1K_INSN_L_SFGEUI, OR1K32BF_INSN_L_SFGEUI, OR1K32BF_SFMT_L_SFGTSI }, | |
121 | { OR1K_INSN_L_SFLTS, OR1K32BF_INSN_L_SFLTS, OR1K32BF_SFMT_L_SFGTS }, | |
122 | { OR1K_INSN_L_SFLTSI, OR1K32BF_INSN_L_SFLTSI, OR1K32BF_SFMT_L_SFGTSI }, | |
123 | { OR1K_INSN_L_SFLTU, OR1K32BF_INSN_L_SFLTU, OR1K32BF_SFMT_L_SFGTS }, | |
124 | { OR1K_INSN_L_SFLTUI, OR1K32BF_INSN_L_SFLTUI, OR1K32BF_SFMT_L_SFGTSI }, | |
125 | { OR1K_INSN_L_SFLES, OR1K32BF_INSN_L_SFLES, OR1K32BF_SFMT_L_SFGTS }, | |
126 | { OR1K_INSN_L_SFLESI, OR1K32BF_INSN_L_SFLESI, OR1K32BF_SFMT_L_SFGTSI }, | |
127 | { OR1K_INSN_L_SFLEU, OR1K32BF_INSN_L_SFLEU, OR1K32BF_SFMT_L_SFGTS }, | |
128 | { OR1K_INSN_L_SFLEUI, OR1K32BF_INSN_L_SFLEUI, OR1K32BF_SFMT_L_SFGTSI }, | |
129 | { OR1K_INSN_L_SFEQ, OR1K32BF_INSN_L_SFEQ, OR1K32BF_SFMT_L_SFGTS }, | |
130 | { OR1K_INSN_L_SFEQI, OR1K32BF_INSN_L_SFEQI, OR1K32BF_SFMT_L_SFGTSI }, | |
131 | { OR1K_INSN_L_SFNE, OR1K32BF_INSN_L_SFNE, OR1K32BF_SFMT_L_SFGTS }, | |
132 | { OR1K_INSN_L_SFNEI, OR1K32BF_INSN_L_SFNEI, OR1K32BF_SFMT_L_SFGTSI }, | |
133 | { OR1K_INSN_L_MAC, OR1K32BF_INSN_L_MAC, OR1K32BF_SFMT_L_MAC }, | |
6e51bfa7 | 134 | { OR1K_INSN_L_MACI, OR1K32BF_INSN_L_MACI, OR1K32BF_SFMT_L_MACI }, |
07f5f4c6 RH |
135 | { OR1K_INSN_L_MACU, OR1K32BF_INSN_L_MACU, OR1K32BF_SFMT_L_MACU }, |
136 | { OR1K_INSN_L_MSB, OR1K32BF_INSN_L_MSB, OR1K32BF_SFMT_L_MAC }, | |
137 | { OR1K_INSN_L_MSBU, OR1K32BF_INSN_L_MSBU, OR1K32BF_SFMT_L_MACU }, | |
6e51bfa7 SH |
138 | { OR1K_INSN_L_CUST1, OR1K32BF_INSN_L_CUST1, OR1K32BF_SFMT_L_MSYNC }, |
139 | { OR1K_INSN_L_CUST2, OR1K32BF_INSN_L_CUST2, OR1K32BF_SFMT_L_MSYNC }, | |
140 | { OR1K_INSN_L_CUST3, OR1K32BF_INSN_L_CUST3, OR1K32BF_SFMT_L_MSYNC }, | |
141 | { OR1K_INSN_L_CUST4, OR1K32BF_INSN_L_CUST4, OR1K32BF_SFMT_L_MSYNC }, | |
142 | { OR1K_INSN_L_CUST5, OR1K32BF_INSN_L_CUST5, OR1K32BF_SFMT_L_MSYNC }, | |
143 | { OR1K_INSN_L_CUST6, OR1K32BF_INSN_L_CUST6, OR1K32BF_SFMT_L_MSYNC }, | |
144 | { OR1K_INSN_L_CUST7, OR1K32BF_INSN_L_CUST7, OR1K32BF_SFMT_L_MSYNC }, | |
145 | { OR1K_INSN_L_CUST8, OR1K32BF_INSN_L_CUST8, OR1K32BF_SFMT_L_MSYNC }, | |
146 | { OR1K_INSN_LF_ADD_S, OR1K32BF_INSN_LF_ADD_S, OR1K32BF_SFMT_LF_ADD_S }, | |
147 | { OR1K_INSN_LF_SUB_S, OR1K32BF_INSN_LF_SUB_S, OR1K32BF_SFMT_LF_ADD_S }, | |
148 | { OR1K_INSN_LF_MUL_S, OR1K32BF_INSN_LF_MUL_S, OR1K32BF_SFMT_LF_ADD_S }, | |
149 | { OR1K_INSN_LF_DIV_S, OR1K32BF_INSN_LF_DIV_S, OR1K32BF_SFMT_LF_ADD_S }, | |
150 | { OR1K_INSN_LF_REM_S, OR1K32BF_INSN_LF_REM_S, OR1K32BF_SFMT_LF_ADD_S }, | |
151 | { OR1K_INSN_LF_ITOF_S, OR1K32BF_INSN_LF_ITOF_S, OR1K32BF_SFMT_LF_ITOF_S }, | |
152 | { OR1K_INSN_LF_FTOI_S, OR1K32BF_INSN_LF_FTOI_S, OR1K32BF_SFMT_LF_FTOI_S }, | |
153 | { OR1K_INSN_LF_EQ_S, OR1K32BF_INSN_LF_EQ_S, OR1K32BF_SFMT_LF_EQ_S }, | |
154 | { OR1K_INSN_LF_NE_S, OR1K32BF_INSN_LF_NE_S, OR1K32BF_SFMT_LF_EQ_S }, | |
155 | { OR1K_INSN_LF_GE_S, OR1K32BF_INSN_LF_GE_S, OR1K32BF_SFMT_LF_EQ_S }, | |
156 | { OR1K_INSN_LF_GT_S, OR1K32BF_INSN_LF_GT_S, OR1K32BF_SFMT_LF_EQ_S }, | |
157 | { OR1K_INSN_LF_LT_S, OR1K32BF_INSN_LF_LT_S, OR1K32BF_SFMT_LF_EQ_S }, | |
158 | { OR1K_INSN_LF_LE_S, OR1K32BF_INSN_LF_LE_S, OR1K32BF_SFMT_LF_EQ_S }, | |
159 | { OR1K_INSN_LF_MADD_S, OR1K32BF_INSN_LF_MADD_S, OR1K32BF_SFMT_LF_MADD_S }, | |
160 | { OR1K_INSN_LF_CUST1_S, OR1K32BF_INSN_LF_CUST1_S, OR1K32BF_SFMT_L_MSYNC }, | |
161 | }; | |
162 | ||
163 | static const struct insn_sem or1k32bf_insn_sem_invalid = | |
164 | { | |
165 | VIRTUAL_INSN_X_INVALID, OR1K32BF_INSN_X_INVALID, OR1K32BF_SFMT_EMPTY | |
166 | }; | |
167 | ||
168 | /* Initialize an IDESC from the compile-time computable parts. */ | |
169 | ||
170 | static INLINE void | |
171 | init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t) | |
172 | { | |
173 | const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries; | |
174 | ||
175 | id->num = t->index; | |
176 | id->sfmt = t->sfmt; | |
177 | if ((int) t->type <= 0) | |
178 | id->idata = & cgen_virtual_insn_table[- (int) t->type]; | |
179 | else | |
180 | id->idata = & insn_table[t->type]; | |
181 | id->attrs = CGEN_INSN_ATTRS (id->idata); | |
182 | /* Oh my god, a magic number. */ | |
183 | id->length = CGEN_INSN_BITSIZE (id->idata) / 8; | |
184 | ||
185 | #if WITH_PROFILE_MODEL_P | |
186 | id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index]; | |
187 | { | |
188 | SIM_DESC sd = CPU_STATE (cpu); | |
189 | SIM_ASSERT (t->index == id->timing->num); | |
190 | } | |
191 | #endif | |
192 | ||
193 | /* Semantic pointers are initialized elsewhere. */ | |
194 | } | |
195 | ||
196 | /* Initialize the instruction descriptor table. */ | |
197 | ||
198 | void | |
199 | or1k32bf_init_idesc_table (SIM_CPU *cpu) | |
200 | { | |
201 | IDESC *id,*tabend; | |
202 | const struct insn_sem *t,*tend; | |
203 | int tabsize = OR1K32BF_INSN__MAX; | |
204 | IDESC *table = or1k32bf_insn_data; | |
205 | ||
206 | memset (table, 0, tabsize * sizeof (IDESC)); | |
207 | ||
208 | /* First set all entries to the `invalid insn'. */ | |
209 | t = & or1k32bf_insn_sem_invalid; | |
210 | for (id = table, tabend = table + tabsize; id < tabend; ++id) | |
211 | init_idesc (cpu, id, t); | |
212 | ||
213 | /* Now fill in the values for the chosen cpu. */ | |
214 | for (t = or1k32bf_insn_sem, tend = t + sizeof (or1k32bf_insn_sem) / sizeof (*t); | |
215 | t != tend; ++t) | |
216 | { | |
217 | init_idesc (cpu, & table[t->index], t); | |
218 | } | |
219 | ||
220 | /* Link the IDESC table into the cpu. */ | |
221 | CPU_IDESC (cpu) = table; | |
222 | } | |
223 | ||
224 | /* Given an instruction, return a pointer to its IDESC entry. */ | |
225 | ||
226 | const IDESC * | |
227 | or1k32bf_decode (SIM_CPU *current_cpu, IADDR pc, | |
228 | CGEN_INSN_WORD base_insn, CGEN_INSN_WORD entire_insn, | |
229 | ARGBUF *abuf) | |
230 | { | |
231 | /* Result of decoder. */ | |
232 | OR1K32BF_INSN_TYPE itype; | |
233 | ||
234 | { | |
235 | CGEN_INSN_WORD insn = base_insn; | |
236 | ||
237 | { | |
238 | unsigned int val = (((insn >> 21) & (63 << 5)) | ((insn >> 2) & (1 << 4)) | ((insn >> 0) & (15 << 0))); | |
239 | switch (val) | |
240 | { | |
241 | case 0 : /* fall through */ | |
242 | case 1 : /* fall through */ | |
243 | case 2 : /* fall through */ | |
244 | case 3 : /* fall through */ | |
245 | case 4 : /* fall through */ | |
246 | case 5 : /* fall through */ | |
247 | case 6 : /* fall through */ | |
248 | case 7 : /* fall through */ | |
249 | case 8 : /* fall through */ | |
250 | case 9 : /* fall through */ | |
251 | case 10 : /* fall through */ | |
252 | case 11 : /* fall through */ | |
253 | case 12 : /* fall through */ | |
254 | case 13 : /* fall through */ | |
255 | case 14 : /* fall through */ | |
256 | case 15 : /* fall through */ | |
257 | case 16 : /* fall through */ | |
258 | case 17 : /* fall through */ | |
259 | case 18 : /* fall through */ | |
260 | case 19 : /* fall through */ | |
261 | case 20 : /* fall through */ | |
262 | case 21 : /* fall through */ | |
263 | case 22 : /* fall through */ | |
264 | case 23 : /* fall through */ | |
265 | case 24 : /* fall through */ | |
266 | case 25 : /* fall through */ | |
267 | case 26 : /* fall through */ | |
268 | case 27 : /* fall through */ | |
269 | case 28 : /* fall through */ | |
270 | case 29 : /* fall through */ | |
271 | case 30 : /* fall through */ | |
272 | case 31 : itype = OR1K32BF_INSN_L_J; goto extract_sfmt_l_j; | |
273 | case 32 : /* fall through */ | |
274 | case 33 : /* fall through */ | |
275 | case 34 : /* fall through */ | |
276 | case 35 : /* fall through */ | |
277 | case 36 : /* fall through */ | |
278 | case 37 : /* fall through */ | |
279 | case 38 : /* fall through */ | |
280 | case 39 : /* fall through */ | |
281 | case 40 : /* fall through */ | |
282 | case 41 : /* fall through */ | |
283 | case 42 : /* fall through */ | |
284 | case 43 : /* fall through */ | |
285 | case 44 : /* fall through */ | |
286 | case 45 : /* fall through */ | |
287 | case 46 : /* fall through */ | |
288 | case 47 : /* fall through */ | |
289 | case 48 : /* fall through */ | |
290 | case 49 : /* fall through */ | |
291 | case 50 : /* fall through */ | |
292 | case 51 : /* fall through */ | |
293 | case 52 : /* fall through */ | |
294 | case 53 : /* fall through */ | |
295 | case 54 : /* fall through */ | |
296 | case 55 : /* fall through */ | |
297 | case 56 : /* fall through */ | |
298 | case 57 : /* fall through */ | |
299 | case 58 : /* fall through */ | |
300 | case 59 : /* fall through */ | |
301 | case 60 : /* fall through */ | |
302 | case 61 : /* fall through */ | |
303 | case 62 : /* fall through */ | |
304 | case 63 : itype = OR1K32BF_INSN_L_JAL; goto extract_sfmt_l_jal; | |
07f5f4c6 RH |
305 | case 64 : /* fall through */ |
306 | case 65 : /* fall through */ | |
307 | case 66 : /* fall through */ | |
308 | case 67 : /* fall through */ | |
309 | case 68 : /* fall through */ | |
310 | case 69 : /* fall through */ | |
311 | case 70 : /* fall through */ | |
312 | case 71 : /* fall through */ | |
313 | case 72 : /* fall through */ | |
314 | case 73 : /* fall through */ | |
315 | case 74 : /* fall through */ | |
316 | case 75 : /* fall through */ | |
317 | case 76 : /* fall through */ | |
318 | case 77 : /* fall through */ | |
319 | case 78 : /* fall through */ | |
320 | case 79 : /* fall through */ | |
321 | case 80 : /* fall through */ | |
322 | case 81 : /* fall through */ | |
323 | case 82 : /* fall through */ | |
324 | case 83 : /* fall through */ | |
325 | case 84 : /* fall through */ | |
326 | case 85 : /* fall through */ | |
327 | case 86 : /* fall through */ | |
328 | case 87 : /* fall through */ | |
329 | case 88 : /* fall through */ | |
330 | case 89 : /* fall through */ | |
331 | case 90 : /* fall through */ | |
332 | case 91 : /* fall through */ | |
333 | case 92 : /* fall through */ | |
334 | case 93 : /* fall through */ | |
335 | case 94 : /* fall through */ | |
336 | case 95 : itype = OR1K32BF_INSN_L_ADRP; goto extract_sfmt_l_adrp; | |
6e51bfa7 SH |
337 | case 96 : /* fall through */ |
338 | case 97 : /* fall through */ | |
339 | case 98 : /* fall through */ | |
340 | case 99 : /* fall through */ | |
341 | case 100 : /* fall through */ | |
342 | case 101 : /* fall through */ | |
343 | case 102 : /* fall through */ | |
344 | case 103 : /* fall through */ | |
345 | case 104 : /* fall through */ | |
346 | case 105 : /* fall through */ | |
347 | case 106 : /* fall through */ | |
348 | case 107 : /* fall through */ | |
349 | case 108 : /* fall through */ | |
350 | case 109 : /* fall through */ | |
351 | case 110 : /* fall through */ | |
352 | case 111 : /* fall through */ | |
353 | case 112 : /* fall through */ | |
354 | case 113 : /* fall through */ | |
355 | case 114 : /* fall through */ | |
356 | case 115 : /* fall through */ | |
357 | case 116 : /* fall through */ | |
358 | case 117 : /* fall through */ | |
359 | case 118 : /* fall through */ | |
360 | case 119 : /* fall through */ | |
361 | case 120 : /* fall through */ | |
362 | case 121 : /* fall through */ | |
363 | case 122 : /* fall through */ | |
364 | case 123 : /* fall through */ | |
365 | case 124 : /* fall through */ | |
366 | case 125 : /* fall through */ | |
367 | case 126 : /* fall through */ | |
368 | case 127 : itype = OR1K32BF_INSN_L_BNF; goto extract_sfmt_l_bnf; | |
369 | case 128 : /* fall through */ | |
370 | case 129 : /* fall through */ | |
371 | case 130 : /* fall through */ | |
372 | case 131 : /* fall through */ | |
373 | case 132 : /* fall through */ | |
374 | case 133 : /* fall through */ | |
375 | case 134 : /* fall through */ | |
376 | case 135 : /* fall through */ | |
377 | case 136 : /* fall through */ | |
378 | case 137 : /* fall through */ | |
379 | case 138 : /* fall through */ | |
380 | case 139 : /* fall through */ | |
381 | case 140 : /* fall through */ | |
382 | case 141 : /* fall through */ | |
383 | case 142 : /* fall through */ | |
384 | case 143 : /* fall through */ | |
385 | case 144 : /* fall through */ | |
386 | case 145 : /* fall through */ | |
387 | case 146 : /* fall through */ | |
388 | case 147 : /* fall through */ | |
389 | case 148 : /* fall through */ | |
390 | case 149 : /* fall through */ | |
391 | case 150 : /* fall through */ | |
392 | case 151 : /* fall through */ | |
393 | case 152 : /* fall through */ | |
394 | case 153 : /* fall through */ | |
395 | case 154 : /* fall through */ | |
396 | case 155 : /* fall through */ | |
397 | case 156 : /* fall through */ | |
398 | case 157 : /* fall through */ | |
399 | case 158 : /* fall through */ | |
400 | case 159 : itype = OR1K32BF_INSN_L_BF; goto extract_sfmt_l_bnf; | |
401 | case 160 : /* fall through */ | |
402 | case 161 : /* fall through */ | |
403 | case 162 : /* fall through */ | |
404 | case 163 : /* fall through */ | |
405 | case 164 : /* fall through */ | |
406 | case 165 : /* fall through */ | |
407 | case 166 : /* fall through */ | |
408 | case 167 : /* fall through */ | |
409 | case 168 : /* fall through */ | |
410 | case 169 : /* fall through */ | |
411 | case 170 : /* fall through */ | |
412 | case 171 : /* fall through */ | |
413 | case 172 : /* fall through */ | |
414 | case 173 : /* fall through */ | |
415 | case 174 : /* fall through */ | |
416 | case 175 : /* fall through */ | |
417 | case 176 : /* fall through */ | |
418 | case 177 : /* fall through */ | |
419 | case 178 : /* fall through */ | |
420 | case 179 : /* fall through */ | |
421 | case 180 : /* fall through */ | |
422 | case 181 : /* fall through */ | |
423 | case 182 : /* fall through */ | |
424 | case 183 : /* fall through */ | |
425 | case 184 : /* fall through */ | |
426 | case 185 : /* fall through */ | |
427 | case 186 : /* fall through */ | |
428 | case 187 : /* fall through */ | |
429 | case 188 : /* fall through */ | |
430 | case 189 : /* fall through */ | |
431 | case 190 : /* fall through */ | |
432 | case 191 : | |
433 | if ((entire_insn & 0xffff0000) == 0x15000000) | |
434 | { itype = OR1K32BF_INSN_L_NOP_IMM; goto extract_sfmt_l_nop_imm; } | |
435 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
436 | case 192 : | |
437 | { | |
438 | unsigned int val = (((insn >> 16) & (1 << 0))); | |
439 | switch (val) | |
440 | { | |
441 | case 0 : | |
442 | if ((entire_insn & 0xfc1f0000) == 0x18000000) | |
443 | { itype = OR1K32BF_INSN_L_MOVHI; goto extract_sfmt_l_movhi; } | |
444 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
445 | case 1 : | |
446 | if ((entire_insn & 0xfc1fffff) == 0x18010000) | |
447 | { itype = OR1K32BF_INSN_L_MACRC; goto extract_sfmt_l_macrc; } | |
448 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
449 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
450 | } | |
451 | } | |
452 | case 193 : /* fall through */ | |
453 | case 194 : /* fall through */ | |
454 | case 195 : /* fall through */ | |
455 | case 196 : /* fall through */ | |
456 | case 197 : /* fall through */ | |
457 | case 198 : /* fall through */ | |
458 | case 199 : /* fall through */ | |
459 | case 200 : /* fall through */ | |
460 | case 201 : /* fall through */ | |
461 | case 202 : /* fall through */ | |
462 | case 203 : /* fall through */ | |
463 | case 204 : /* fall through */ | |
464 | case 205 : /* fall through */ | |
465 | case 206 : /* fall through */ | |
466 | case 207 : /* fall through */ | |
467 | case 208 : /* fall through */ | |
468 | case 209 : /* fall through */ | |
469 | case 210 : /* fall through */ | |
470 | case 211 : /* fall through */ | |
471 | case 212 : /* fall through */ | |
472 | case 213 : /* fall through */ | |
473 | case 214 : /* fall through */ | |
474 | case 215 : /* fall through */ | |
475 | case 216 : /* fall through */ | |
476 | case 217 : /* fall through */ | |
477 | case 218 : /* fall through */ | |
478 | case 219 : /* fall through */ | |
479 | case 220 : /* fall through */ | |
480 | case 221 : /* fall through */ | |
481 | case 222 : /* fall through */ | |
482 | case 223 : | |
483 | if ((entire_insn & 0xfc1f0000) == 0x18000000) | |
484 | { itype = OR1K32BF_INSN_L_MOVHI; goto extract_sfmt_l_movhi; } | |
485 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
486 | case 256 : | |
487 | { | |
488 | unsigned int val = (((insn >> 23) & (7 << 0))); | |
489 | switch (val) | |
490 | { | |
491 | case 0 : | |
492 | if ((entire_insn & 0xffff0000) == 0x20000000) | |
493 | { itype = OR1K32BF_INSN_L_SYS; goto extract_sfmt_l_trap; } | |
494 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
495 | case 2 : | |
496 | if ((entire_insn & 0xffff0000) == 0x21000000) | |
497 | { itype = OR1K32BF_INSN_L_TRAP; goto extract_sfmt_l_trap; } | |
498 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
499 | case 4 : | |
500 | if ((entire_insn & 0xffffffff) == 0x22000000) | |
501 | { itype = OR1K32BF_INSN_L_MSYNC; goto extract_sfmt_l_msync; } | |
502 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
503 | case 5 : | |
504 | if ((entire_insn & 0xffffffff) == 0x22800000) | |
505 | { itype = OR1K32BF_INSN_L_PSYNC; goto extract_sfmt_l_msync; } | |
506 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
507 | case 6 : | |
508 | if ((entire_insn & 0xffffffff) == 0x23000000) | |
509 | { itype = OR1K32BF_INSN_L_CSYNC; goto extract_sfmt_l_msync; } | |
510 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
511 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
512 | } | |
513 | } | |
514 | case 257 : /* fall through */ | |
515 | case 258 : /* fall through */ | |
516 | case 259 : /* fall through */ | |
517 | case 260 : /* fall through */ | |
518 | case 261 : /* fall through */ | |
519 | case 262 : /* fall through */ | |
520 | case 263 : /* fall through */ | |
521 | case 264 : /* fall through */ | |
522 | case 265 : /* fall through */ | |
523 | case 266 : /* fall through */ | |
524 | case 267 : /* fall through */ | |
525 | case 268 : /* fall through */ | |
526 | case 269 : /* fall through */ | |
527 | case 270 : /* fall through */ | |
528 | case 271 : /* fall through */ | |
529 | case 272 : /* fall through */ | |
530 | case 273 : /* fall through */ | |
531 | case 274 : /* fall through */ | |
532 | case 275 : /* fall through */ | |
533 | case 276 : /* fall through */ | |
534 | case 277 : /* fall through */ | |
535 | case 278 : /* fall through */ | |
536 | case 279 : /* fall through */ | |
537 | case 280 : /* fall through */ | |
538 | case 281 : /* fall through */ | |
539 | case 282 : /* fall through */ | |
540 | case 283 : /* fall through */ | |
541 | case 284 : /* fall through */ | |
542 | case 285 : /* fall through */ | |
543 | case 286 : /* fall through */ | |
544 | case 287 : | |
545 | { | |
546 | unsigned int val = (((insn >> 24) & (1 << 0))); | |
547 | switch (val) | |
548 | { | |
549 | case 0 : | |
550 | if ((entire_insn & 0xffff0000) == 0x20000000) | |
551 | { itype = OR1K32BF_INSN_L_SYS; goto extract_sfmt_l_trap; } | |
552 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
553 | case 1 : | |
554 | if ((entire_insn & 0xffff0000) == 0x21000000) | |
555 | { itype = OR1K32BF_INSN_L_TRAP; goto extract_sfmt_l_trap; } | |
556 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
557 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
558 | } | |
559 | } | |
560 | case 288 : | |
561 | if ((entire_insn & 0xffffffff) == 0x24000000) | |
562 | { itype = OR1K32BF_INSN_L_RFE; goto extract_sfmt_l_msync; } | |
563 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
564 | case 544 : | |
565 | if ((entire_insn & 0xffff07ff) == 0x44000000) | |
566 | { itype = OR1K32BF_INSN_L_JR; goto extract_sfmt_l_jr; } | |
567 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
568 | case 576 : | |
569 | if ((entire_insn & 0xffff07ff) == 0x48000000) | |
570 | { itype = OR1K32BF_INSN_L_JALR; goto extract_sfmt_l_jalr; } | |
571 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
572 | case 608 : /* fall through */ | |
573 | case 609 : /* fall through */ | |
574 | case 610 : /* fall through */ | |
575 | case 611 : /* fall through */ | |
576 | case 612 : /* fall through */ | |
577 | case 613 : /* fall through */ | |
578 | case 614 : /* fall through */ | |
579 | case 615 : /* fall through */ | |
580 | case 616 : /* fall through */ | |
581 | case 617 : /* fall through */ | |
582 | case 618 : /* fall through */ | |
583 | case 619 : /* fall through */ | |
584 | case 620 : /* fall through */ | |
585 | case 621 : /* fall through */ | |
586 | case 622 : /* fall through */ | |
587 | case 623 : /* fall through */ | |
588 | case 624 : /* fall through */ | |
589 | case 625 : /* fall through */ | |
590 | case 626 : /* fall through */ | |
591 | case 627 : /* fall through */ | |
592 | case 628 : /* fall through */ | |
593 | case 629 : /* fall through */ | |
594 | case 630 : /* fall through */ | |
595 | case 631 : /* fall through */ | |
596 | case 632 : /* fall through */ | |
597 | case 633 : /* fall through */ | |
598 | case 634 : /* fall through */ | |
599 | case 635 : /* fall through */ | |
600 | case 636 : /* fall through */ | |
601 | case 637 : /* fall through */ | |
602 | case 638 : /* fall through */ | |
603 | case 639 : | |
604 | if ((entire_insn & 0xffe00000) == 0x4c000000) | |
605 | { itype = OR1K32BF_INSN_L_MACI; goto extract_sfmt_l_maci; } | |
606 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
607 | case 864 : /* fall through */ | |
608 | case 865 : /* fall through */ | |
609 | case 866 : /* fall through */ | |
610 | case 867 : /* fall through */ | |
611 | case 868 : /* fall through */ | |
612 | case 869 : /* fall through */ | |
613 | case 870 : /* fall through */ | |
614 | case 871 : /* fall through */ | |
615 | case 872 : /* fall through */ | |
616 | case 873 : /* fall through */ | |
617 | case 874 : /* fall through */ | |
618 | case 875 : /* fall through */ | |
619 | case 876 : /* fall through */ | |
620 | case 877 : /* fall through */ | |
621 | case 878 : /* fall through */ | |
622 | case 879 : /* fall through */ | |
623 | case 880 : /* fall through */ | |
624 | case 881 : /* fall through */ | |
625 | case 882 : /* fall through */ | |
626 | case 883 : /* fall through */ | |
627 | case 884 : /* fall through */ | |
628 | case 885 : /* fall through */ | |
629 | case 886 : /* fall through */ | |
630 | case 887 : /* fall through */ | |
631 | case 888 : /* fall through */ | |
632 | case 889 : /* fall through */ | |
633 | case 890 : /* fall through */ | |
634 | case 891 : /* fall through */ | |
635 | case 892 : /* fall through */ | |
636 | case 893 : /* fall through */ | |
637 | case 894 : /* fall through */ | |
638 | case 895 : itype = OR1K32BF_INSN_L_LWA; goto extract_sfmt_l_lwa; | |
639 | case 896 : | |
640 | if ((entire_insn & 0xffffffff) == 0x70000000) | |
641 | { itype = OR1K32BF_INSN_L_CUST1; goto extract_sfmt_l_msync; } | |
642 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
643 | case 928 : | |
644 | if ((entire_insn & 0xffffffff) == 0x74000000) | |
645 | { itype = OR1K32BF_INSN_L_CUST2; goto extract_sfmt_l_msync; } | |
646 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
647 | case 960 : | |
648 | if ((entire_insn & 0xffffffff) == 0x78000000) | |
649 | { itype = OR1K32BF_INSN_L_CUST3; goto extract_sfmt_l_msync; } | |
650 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
651 | case 992 : | |
652 | if ((entire_insn & 0xffffffff) == 0x7c000000) | |
653 | { itype = OR1K32BF_INSN_L_CUST4; goto extract_sfmt_l_msync; } | |
654 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
655 | case 1056 : /* fall through */ | |
656 | case 1057 : /* fall through */ | |
657 | case 1058 : /* fall through */ | |
658 | case 1059 : /* fall through */ | |
659 | case 1060 : /* fall through */ | |
660 | case 1061 : /* fall through */ | |
661 | case 1062 : /* fall through */ | |
662 | case 1063 : /* fall through */ | |
663 | case 1064 : /* fall through */ | |
664 | case 1065 : /* fall through */ | |
665 | case 1066 : /* fall through */ | |
666 | case 1067 : /* fall through */ | |
667 | case 1068 : /* fall through */ | |
668 | case 1069 : /* fall through */ | |
669 | case 1070 : /* fall through */ | |
670 | case 1071 : /* fall through */ | |
671 | case 1072 : /* fall through */ | |
672 | case 1073 : /* fall through */ | |
673 | case 1074 : /* fall through */ | |
674 | case 1075 : /* fall through */ | |
675 | case 1076 : /* fall through */ | |
676 | case 1077 : /* fall through */ | |
677 | case 1078 : /* fall through */ | |
678 | case 1079 : /* fall through */ | |
679 | case 1080 : /* fall through */ | |
680 | case 1081 : /* fall through */ | |
681 | case 1082 : /* fall through */ | |
682 | case 1083 : /* fall through */ | |
683 | case 1084 : /* fall through */ | |
684 | case 1085 : /* fall through */ | |
685 | case 1086 : /* fall through */ | |
686 | case 1087 : itype = OR1K32BF_INSN_L_LWZ; goto extract_sfmt_l_lwz; | |
687 | case 1088 : /* fall through */ | |
688 | case 1089 : /* fall through */ | |
689 | case 1090 : /* fall through */ | |
690 | case 1091 : /* fall through */ | |
691 | case 1092 : /* fall through */ | |
692 | case 1093 : /* fall through */ | |
693 | case 1094 : /* fall through */ | |
694 | case 1095 : /* fall through */ | |
695 | case 1096 : /* fall through */ | |
696 | case 1097 : /* fall through */ | |
697 | case 1098 : /* fall through */ | |
698 | case 1099 : /* fall through */ | |
699 | case 1100 : /* fall through */ | |
700 | case 1101 : /* fall through */ | |
701 | case 1102 : /* fall through */ | |
702 | case 1103 : /* fall through */ | |
703 | case 1104 : /* fall through */ | |
704 | case 1105 : /* fall through */ | |
705 | case 1106 : /* fall through */ | |
706 | case 1107 : /* fall through */ | |
707 | case 1108 : /* fall through */ | |
708 | case 1109 : /* fall through */ | |
709 | case 1110 : /* fall through */ | |
710 | case 1111 : /* fall through */ | |
711 | case 1112 : /* fall through */ | |
712 | case 1113 : /* fall through */ | |
713 | case 1114 : /* fall through */ | |
714 | case 1115 : /* fall through */ | |
715 | case 1116 : /* fall through */ | |
716 | case 1117 : /* fall through */ | |
717 | case 1118 : /* fall through */ | |
718 | case 1119 : itype = OR1K32BF_INSN_L_LWS; goto extract_sfmt_l_lws; | |
719 | case 1120 : /* fall through */ | |
720 | case 1121 : /* fall through */ | |
721 | case 1122 : /* fall through */ | |
722 | case 1123 : /* fall through */ | |
723 | case 1124 : /* fall through */ | |
724 | case 1125 : /* fall through */ | |
725 | case 1126 : /* fall through */ | |
726 | case 1127 : /* fall through */ | |
727 | case 1128 : /* fall through */ | |
728 | case 1129 : /* fall through */ | |
729 | case 1130 : /* fall through */ | |
730 | case 1131 : /* fall through */ | |
731 | case 1132 : /* fall through */ | |
732 | case 1133 : /* fall through */ | |
733 | case 1134 : /* fall through */ | |
734 | case 1135 : /* fall through */ | |
735 | case 1136 : /* fall through */ | |
736 | case 1137 : /* fall through */ | |
737 | case 1138 : /* fall through */ | |
738 | case 1139 : /* fall through */ | |
739 | case 1140 : /* fall through */ | |
740 | case 1141 : /* fall through */ | |
741 | case 1142 : /* fall through */ | |
742 | case 1143 : /* fall through */ | |
743 | case 1144 : /* fall through */ | |
744 | case 1145 : /* fall through */ | |
745 | case 1146 : /* fall through */ | |
746 | case 1147 : /* fall through */ | |
747 | case 1148 : /* fall through */ | |
748 | case 1149 : /* fall through */ | |
749 | case 1150 : /* fall through */ | |
750 | case 1151 : itype = OR1K32BF_INSN_L_LBZ; goto extract_sfmt_l_lbz; | |
751 | case 1152 : /* fall through */ | |
752 | case 1153 : /* fall through */ | |
753 | case 1154 : /* fall through */ | |
754 | case 1155 : /* fall through */ | |
755 | case 1156 : /* fall through */ | |
756 | case 1157 : /* fall through */ | |
757 | case 1158 : /* fall through */ | |
758 | case 1159 : /* fall through */ | |
759 | case 1160 : /* fall through */ | |
760 | case 1161 : /* fall through */ | |
761 | case 1162 : /* fall through */ | |
762 | case 1163 : /* fall through */ | |
763 | case 1164 : /* fall through */ | |
764 | case 1165 : /* fall through */ | |
765 | case 1166 : /* fall through */ | |
766 | case 1167 : /* fall through */ | |
767 | case 1168 : /* fall through */ | |
768 | case 1169 : /* fall through */ | |
769 | case 1170 : /* fall through */ | |
770 | case 1171 : /* fall through */ | |
771 | case 1172 : /* fall through */ | |
772 | case 1173 : /* fall through */ | |
773 | case 1174 : /* fall through */ | |
774 | case 1175 : /* fall through */ | |
775 | case 1176 : /* fall through */ | |
776 | case 1177 : /* fall through */ | |
777 | case 1178 : /* fall through */ | |
778 | case 1179 : /* fall through */ | |
779 | case 1180 : /* fall through */ | |
780 | case 1181 : /* fall through */ | |
781 | case 1182 : /* fall through */ | |
782 | case 1183 : itype = OR1K32BF_INSN_L_LBS; goto extract_sfmt_l_lbs; | |
783 | case 1184 : /* fall through */ | |
784 | case 1185 : /* fall through */ | |
785 | case 1186 : /* fall through */ | |
786 | case 1187 : /* fall through */ | |
787 | case 1188 : /* fall through */ | |
788 | case 1189 : /* fall through */ | |
789 | case 1190 : /* fall through */ | |
790 | case 1191 : /* fall through */ | |
791 | case 1192 : /* fall through */ | |
792 | case 1193 : /* fall through */ | |
793 | case 1194 : /* fall through */ | |
794 | case 1195 : /* fall through */ | |
795 | case 1196 : /* fall through */ | |
796 | case 1197 : /* fall through */ | |
797 | case 1198 : /* fall through */ | |
798 | case 1199 : /* fall through */ | |
799 | case 1200 : /* fall through */ | |
800 | case 1201 : /* fall through */ | |
801 | case 1202 : /* fall through */ | |
802 | case 1203 : /* fall through */ | |
803 | case 1204 : /* fall through */ | |
804 | case 1205 : /* fall through */ | |
805 | case 1206 : /* fall through */ | |
806 | case 1207 : /* fall through */ | |
807 | case 1208 : /* fall through */ | |
808 | case 1209 : /* fall through */ | |
809 | case 1210 : /* fall through */ | |
810 | case 1211 : /* fall through */ | |
811 | case 1212 : /* fall through */ | |
812 | case 1213 : /* fall through */ | |
813 | case 1214 : /* fall through */ | |
814 | case 1215 : itype = OR1K32BF_INSN_L_LHZ; goto extract_sfmt_l_lhz; | |
815 | case 1216 : /* fall through */ | |
816 | case 1217 : /* fall through */ | |
817 | case 1218 : /* fall through */ | |
818 | case 1219 : /* fall through */ | |
819 | case 1220 : /* fall through */ | |
820 | case 1221 : /* fall through */ | |
821 | case 1222 : /* fall through */ | |
822 | case 1223 : /* fall through */ | |
823 | case 1224 : /* fall through */ | |
824 | case 1225 : /* fall through */ | |
825 | case 1226 : /* fall through */ | |
826 | case 1227 : /* fall through */ | |
827 | case 1228 : /* fall through */ | |
828 | case 1229 : /* fall through */ | |
829 | case 1230 : /* fall through */ | |
830 | case 1231 : /* fall through */ | |
831 | case 1232 : /* fall through */ | |
832 | case 1233 : /* fall through */ | |
833 | case 1234 : /* fall through */ | |
834 | case 1235 : /* fall through */ | |
835 | case 1236 : /* fall through */ | |
836 | case 1237 : /* fall through */ | |
837 | case 1238 : /* fall through */ | |
838 | case 1239 : /* fall through */ | |
839 | case 1240 : /* fall through */ | |
840 | case 1241 : /* fall through */ | |
841 | case 1242 : /* fall through */ | |
842 | case 1243 : /* fall through */ | |
843 | case 1244 : /* fall through */ | |
844 | case 1245 : /* fall through */ | |
845 | case 1246 : /* fall through */ | |
846 | case 1247 : itype = OR1K32BF_INSN_L_LHS; goto extract_sfmt_l_lhs; | |
847 | case 1248 : /* fall through */ | |
848 | case 1249 : /* fall through */ | |
849 | case 1250 : /* fall through */ | |
850 | case 1251 : /* fall through */ | |
851 | case 1252 : /* fall through */ | |
852 | case 1253 : /* fall through */ | |
853 | case 1254 : /* fall through */ | |
854 | case 1255 : /* fall through */ | |
855 | case 1256 : /* fall through */ | |
856 | case 1257 : /* fall through */ | |
857 | case 1258 : /* fall through */ | |
858 | case 1259 : /* fall through */ | |
859 | case 1260 : /* fall through */ | |
860 | case 1261 : /* fall through */ | |
861 | case 1262 : /* fall through */ | |
862 | case 1263 : /* fall through */ | |
863 | case 1264 : /* fall through */ | |
864 | case 1265 : /* fall through */ | |
865 | case 1266 : /* fall through */ | |
866 | case 1267 : /* fall through */ | |
867 | case 1268 : /* fall through */ | |
868 | case 1269 : /* fall through */ | |
869 | case 1270 : /* fall through */ | |
870 | case 1271 : /* fall through */ | |
871 | case 1272 : /* fall through */ | |
872 | case 1273 : /* fall through */ | |
873 | case 1274 : /* fall through */ | |
874 | case 1275 : /* fall through */ | |
875 | case 1276 : /* fall through */ | |
876 | case 1277 : /* fall through */ | |
877 | case 1278 : /* fall through */ | |
878 | case 1279 : itype = OR1K32BF_INSN_L_ADDI; goto extract_sfmt_l_addi; | |
879 | case 1280 : /* fall through */ | |
880 | case 1281 : /* fall through */ | |
881 | case 1282 : /* fall through */ | |
882 | case 1283 : /* fall through */ | |
883 | case 1284 : /* fall through */ | |
884 | case 1285 : /* fall through */ | |
885 | case 1286 : /* fall through */ | |
886 | case 1287 : /* fall through */ | |
887 | case 1288 : /* fall through */ | |
888 | case 1289 : /* fall through */ | |
889 | case 1290 : /* fall through */ | |
890 | case 1291 : /* fall through */ | |
891 | case 1292 : /* fall through */ | |
892 | case 1293 : /* fall through */ | |
893 | case 1294 : /* fall through */ | |
894 | case 1295 : /* fall through */ | |
895 | case 1296 : /* fall through */ | |
896 | case 1297 : /* fall through */ | |
897 | case 1298 : /* fall through */ | |
898 | case 1299 : /* fall through */ | |
899 | case 1300 : /* fall through */ | |
900 | case 1301 : /* fall through */ | |
901 | case 1302 : /* fall through */ | |
902 | case 1303 : /* fall through */ | |
903 | case 1304 : /* fall through */ | |
904 | case 1305 : /* fall through */ | |
905 | case 1306 : /* fall through */ | |
906 | case 1307 : /* fall through */ | |
907 | case 1308 : /* fall through */ | |
908 | case 1309 : /* fall through */ | |
909 | case 1310 : /* fall through */ | |
910 | case 1311 : itype = OR1K32BF_INSN_L_ADDIC; goto extract_sfmt_l_addic; | |
911 | case 1312 : /* fall through */ | |
912 | case 1313 : /* fall through */ | |
913 | case 1314 : /* fall through */ | |
914 | case 1315 : /* fall through */ | |
915 | case 1316 : /* fall through */ | |
916 | case 1317 : /* fall through */ | |
917 | case 1318 : /* fall through */ | |
918 | case 1319 : /* fall through */ | |
919 | case 1320 : /* fall through */ | |
920 | case 1321 : /* fall through */ | |
921 | case 1322 : /* fall through */ | |
922 | case 1323 : /* fall through */ | |
923 | case 1324 : /* fall through */ | |
924 | case 1325 : /* fall through */ | |
925 | case 1326 : /* fall through */ | |
926 | case 1327 : /* fall through */ | |
927 | case 1328 : /* fall through */ | |
928 | case 1329 : /* fall through */ | |
929 | case 1330 : /* fall through */ | |
930 | case 1331 : /* fall through */ | |
931 | case 1332 : /* fall through */ | |
932 | case 1333 : /* fall through */ | |
933 | case 1334 : /* fall through */ | |
934 | case 1335 : /* fall through */ | |
935 | case 1336 : /* fall through */ | |
936 | case 1337 : /* fall through */ | |
937 | case 1338 : /* fall through */ | |
938 | case 1339 : /* fall through */ | |
939 | case 1340 : /* fall through */ | |
940 | case 1341 : /* fall through */ | |
941 | case 1342 : /* fall through */ | |
942 | case 1343 : itype = OR1K32BF_INSN_L_ANDI; goto extract_sfmt_l_mfspr; | |
943 | case 1344 : /* fall through */ | |
944 | case 1345 : /* fall through */ | |
945 | case 1346 : /* fall through */ | |
946 | case 1347 : /* fall through */ | |
947 | case 1348 : /* fall through */ | |
948 | case 1349 : /* fall through */ | |
949 | case 1350 : /* fall through */ | |
950 | case 1351 : /* fall through */ | |
951 | case 1352 : /* fall through */ | |
952 | case 1353 : /* fall through */ | |
953 | case 1354 : /* fall through */ | |
954 | case 1355 : /* fall through */ | |
955 | case 1356 : /* fall through */ | |
956 | case 1357 : /* fall through */ | |
957 | case 1358 : /* fall through */ | |
958 | case 1359 : /* fall through */ | |
959 | case 1360 : /* fall through */ | |
960 | case 1361 : /* fall through */ | |
961 | case 1362 : /* fall through */ | |
962 | case 1363 : /* fall through */ | |
963 | case 1364 : /* fall through */ | |
964 | case 1365 : /* fall through */ | |
965 | case 1366 : /* fall through */ | |
966 | case 1367 : /* fall through */ | |
967 | case 1368 : /* fall through */ | |
968 | case 1369 : /* fall through */ | |
969 | case 1370 : /* fall through */ | |
970 | case 1371 : /* fall through */ | |
971 | case 1372 : /* fall through */ | |
972 | case 1373 : /* fall through */ | |
973 | case 1374 : /* fall through */ | |
974 | case 1375 : itype = OR1K32BF_INSN_L_ORI; goto extract_sfmt_l_mfspr; | |
975 | case 1376 : /* fall through */ | |
976 | case 1377 : /* fall through */ | |
977 | case 1378 : /* fall through */ | |
978 | case 1379 : /* fall through */ | |
979 | case 1380 : /* fall through */ | |
980 | case 1381 : /* fall through */ | |
981 | case 1382 : /* fall through */ | |
982 | case 1383 : /* fall through */ | |
983 | case 1384 : /* fall through */ | |
984 | case 1385 : /* fall through */ | |
985 | case 1386 : /* fall through */ | |
986 | case 1387 : /* fall through */ | |
987 | case 1388 : /* fall through */ | |
988 | case 1389 : /* fall through */ | |
989 | case 1390 : /* fall through */ | |
990 | case 1391 : /* fall through */ | |
991 | case 1392 : /* fall through */ | |
992 | case 1393 : /* fall through */ | |
993 | case 1394 : /* fall through */ | |
994 | case 1395 : /* fall through */ | |
995 | case 1396 : /* fall through */ | |
996 | case 1397 : /* fall through */ | |
997 | case 1398 : /* fall through */ | |
998 | case 1399 : /* fall through */ | |
999 | case 1400 : /* fall through */ | |
1000 | case 1401 : /* fall through */ | |
1001 | case 1402 : /* fall through */ | |
1002 | case 1403 : /* fall through */ | |
1003 | case 1404 : /* fall through */ | |
1004 | case 1405 : /* fall through */ | |
1005 | case 1406 : /* fall through */ | |
1006 | case 1407 : itype = OR1K32BF_INSN_L_XORI; goto extract_sfmt_l_xori; | |
1007 | case 1408 : /* fall through */ | |
1008 | case 1409 : /* fall through */ | |
1009 | case 1410 : /* fall through */ | |
1010 | case 1411 : /* fall through */ | |
1011 | case 1412 : /* fall through */ | |
1012 | case 1413 : /* fall through */ | |
1013 | case 1414 : /* fall through */ | |
1014 | case 1415 : /* fall through */ | |
1015 | case 1416 : /* fall through */ | |
1016 | case 1417 : /* fall through */ | |
1017 | case 1418 : /* fall through */ | |
1018 | case 1419 : /* fall through */ | |
1019 | case 1420 : /* fall through */ | |
1020 | case 1421 : /* fall through */ | |
1021 | case 1422 : /* fall through */ | |
1022 | case 1423 : /* fall through */ | |
1023 | case 1424 : /* fall through */ | |
1024 | case 1425 : /* fall through */ | |
1025 | case 1426 : /* fall through */ | |
1026 | case 1427 : /* fall through */ | |
1027 | case 1428 : /* fall through */ | |
1028 | case 1429 : /* fall through */ | |
1029 | case 1430 : /* fall through */ | |
1030 | case 1431 : /* fall through */ | |
1031 | case 1432 : /* fall through */ | |
1032 | case 1433 : /* fall through */ | |
1033 | case 1434 : /* fall through */ | |
1034 | case 1435 : /* fall through */ | |
1035 | case 1436 : /* fall through */ | |
1036 | case 1437 : /* fall through */ | |
1037 | case 1438 : /* fall through */ | |
07f5f4c6 | 1038 | case 1439 : itype = OR1K32BF_INSN_L_MULI; goto extract_sfmt_l_muli; |
6e51bfa7 SH |
1039 | case 1440 : /* fall through */ |
1040 | case 1441 : /* fall through */ | |
1041 | case 1442 : /* fall through */ | |
1042 | case 1443 : /* fall through */ | |
1043 | case 1444 : /* fall through */ | |
1044 | case 1445 : /* fall through */ | |
1045 | case 1446 : /* fall through */ | |
1046 | case 1447 : /* fall through */ | |
1047 | case 1448 : /* fall through */ | |
1048 | case 1449 : /* fall through */ | |
1049 | case 1450 : /* fall through */ | |
1050 | case 1451 : /* fall through */ | |
1051 | case 1452 : /* fall through */ | |
1052 | case 1453 : /* fall through */ | |
1053 | case 1454 : /* fall through */ | |
1054 | case 1455 : /* fall through */ | |
1055 | case 1456 : /* fall through */ | |
1056 | case 1457 : /* fall through */ | |
1057 | case 1458 : /* fall through */ | |
1058 | case 1459 : /* fall through */ | |
1059 | case 1460 : /* fall through */ | |
1060 | case 1461 : /* fall through */ | |
1061 | case 1462 : /* fall through */ | |
1062 | case 1463 : /* fall through */ | |
1063 | case 1464 : /* fall through */ | |
1064 | case 1465 : /* fall through */ | |
1065 | case 1466 : /* fall through */ | |
1066 | case 1467 : /* fall through */ | |
1067 | case 1468 : /* fall through */ | |
1068 | case 1469 : /* fall through */ | |
1069 | case 1470 : /* fall through */ | |
1070 | case 1471 : itype = OR1K32BF_INSN_L_MFSPR; goto extract_sfmt_l_mfspr; | |
1071 | case 1472 : /* fall through */ | |
1072 | case 1473 : /* fall through */ | |
1073 | case 1474 : /* fall through */ | |
1074 | case 1475 : /* fall through */ | |
1075 | case 1476 : /* fall through */ | |
1076 | case 1477 : /* fall through */ | |
1077 | case 1478 : /* fall through */ | |
1078 | case 1479 : /* fall through */ | |
1079 | case 1480 : /* fall through */ | |
1080 | case 1481 : /* fall through */ | |
1081 | case 1482 : /* fall through */ | |
1082 | case 1483 : /* fall through */ | |
1083 | case 1484 : /* fall through */ | |
1084 | case 1485 : /* fall through */ | |
1085 | case 1486 : /* fall through */ | |
1086 | case 1487 : | |
1087 | { | |
1088 | unsigned int val = (((insn >> 7) & (1 << 0))); | |
1089 | switch (val) | |
1090 | { | |
1091 | case 0 : | |
1092 | if ((entire_insn & 0xfc00ffc0) == 0xb8000000) | |
1093 | { itype = OR1K32BF_INSN_L_SLLI; goto extract_sfmt_l_slli; } | |
1094 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1095 | case 1 : | |
1096 | if ((entire_insn & 0xfc00ffc0) == 0xb8000080) | |
1097 | { itype = OR1K32BF_INSN_L_SRAI; goto extract_sfmt_l_slli; } | |
1098 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1099 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1100 | } | |
1101 | } | |
1102 | case 1488 : /* fall through */ | |
1103 | case 1489 : /* fall through */ | |
1104 | case 1490 : /* fall through */ | |
1105 | case 1491 : /* fall through */ | |
1106 | case 1492 : /* fall through */ | |
1107 | case 1493 : /* fall through */ | |
1108 | case 1494 : /* fall through */ | |
1109 | case 1495 : /* fall through */ | |
1110 | case 1496 : /* fall through */ | |
1111 | case 1497 : /* fall through */ | |
1112 | case 1498 : /* fall through */ | |
1113 | case 1499 : /* fall through */ | |
1114 | case 1500 : /* fall through */ | |
1115 | case 1501 : /* fall through */ | |
1116 | case 1502 : /* fall through */ | |
1117 | case 1503 : | |
1118 | { | |
1119 | unsigned int val = (((insn >> 7) & (1 << 0))); | |
1120 | switch (val) | |
1121 | { | |
1122 | case 0 : | |
1123 | if ((entire_insn & 0xfc00ffc0) == 0xb8000040) | |
1124 | { itype = OR1K32BF_INSN_L_SRLI; goto extract_sfmt_l_slli; } | |
1125 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1126 | case 1 : | |
1127 | if ((entire_insn & 0xfc00ffc0) == 0xb80000c0) | |
1128 | { itype = OR1K32BF_INSN_L_RORI; goto extract_sfmt_l_slli; } | |
1129 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1130 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1131 | } | |
1132 | } | |
1133 | case 1504 : /* fall through */ | |
1134 | case 1505 : /* fall through */ | |
1135 | case 1506 : /* fall through */ | |
1136 | case 1507 : /* fall through */ | |
1137 | case 1508 : /* fall through */ | |
1138 | case 1509 : /* fall through */ | |
1139 | case 1510 : /* fall through */ | |
1140 | case 1511 : /* fall through */ | |
1141 | case 1512 : /* fall through */ | |
1142 | case 1513 : /* fall through */ | |
1143 | case 1514 : /* fall through */ | |
1144 | case 1515 : /* fall through */ | |
1145 | case 1516 : /* fall through */ | |
1146 | case 1517 : /* fall through */ | |
1147 | case 1518 : /* fall through */ | |
1148 | case 1519 : /* fall through */ | |
1149 | case 1520 : /* fall through */ | |
1150 | case 1521 : /* fall through */ | |
1151 | case 1522 : /* fall through */ | |
1152 | case 1523 : /* fall through */ | |
1153 | case 1524 : /* fall through */ | |
1154 | case 1525 : /* fall through */ | |
1155 | case 1526 : /* fall through */ | |
1156 | case 1527 : /* fall through */ | |
1157 | case 1528 : /* fall through */ | |
1158 | case 1529 : /* fall through */ | |
1159 | case 1530 : /* fall through */ | |
1160 | case 1531 : /* fall through */ | |
1161 | case 1532 : /* fall through */ | |
1162 | case 1533 : /* fall through */ | |
1163 | case 1534 : /* fall through */ | |
1164 | case 1535 : | |
1165 | { | |
1166 | unsigned int val = (((insn >> 21) & (15 << 0))); | |
1167 | switch (val) | |
1168 | { | |
1169 | case 0 : | |
1170 | if ((entire_insn & 0xffe00000) == 0xbc000000) | |
1171 | { itype = OR1K32BF_INSN_L_SFEQI; goto extract_sfmt_l_sfgtsi; } | |
1172 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1173 | case 1 : | |
1174 | if ((entire_insn & 0xffe00000) == 0xbc200000) | |
1175 | { itype = OR1K32BF_INSN_L_SFNEI; goto extract_sfmt_l_sfgtsi; } | |
1176 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1177 | case 2 : | |
1178 | if ((entire_insn & 0xffe00000) == 0xbc400000) | |
1179 | { itype = OR1K32BF_INSN_L_SFGTUI; goto extract_sfmt_l_sfgtsi; } | |
1180 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1181 | case 3 : | |
1182 | if ((entire_insn & 0xffe00000) == 0xbc600000) | |
1183 | { itype = OR1K32BF_INSN_L_SFGEUI; goto extract_sfmt_l_sfgtsi; } | |
1184 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1185 | case 4 : | |
1186 | if ((entire_insn & 0xffe00000) == 0xbc800000) | |
1187 | { itype = OR1K32BF_INSN_L_SFLTUI; goto extract_sfmt_l_sfgtsi; } | |
1188 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1189 | case 5 : | |
1190 | if ((entire_insn & 0xffe00000) == 0xbca00000) | |
1191 | { itype = OR1K32BF_INSN_L_SFLEUI; goto extract_sfmt_l_sfgtsi; } | |
1192 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1193 | case 10 : | |
1194 | if ((entire_insn & 0xffe00000) == 0xbd400000) | |
1195 | { itype = OR1K32BF_INSN_L_SFGTSI; goto extract_sfmt_l_sfgtsi; } | |
1196 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1197 | case 11 : | |
1198 | if ((entire_insn & 0xffe00000) == 0xbd600000) | |
1199 | { itype = OR1K32BF_INSN_L_SFGESI; goto extract_sfmt_l_sfgtsi; } | |
1200 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1201 | case 12 : | |
1202 | if ((entire_insn & 0xffe00000) == 0xbd800000) | |
1203 | { itype = OR1K32BF_INSN_L_SFLTSI; goto extract_sfmt_l_sfgtsi; } | |
1204 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1205 | case 13 : | |
1206 | if ((entire_insn & 0xffe00000) == 0xbda00000) | |
1207 | { itype = OR1K32BF_INSN_L_SFLESI; goto extract_sfmt_l_sfgtsi; } | |
1208 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1209 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1210 | } | |
1211 | } | |
1212 | case 1536 : /* fall through */ | |
1213 | case 1537 : /* fall through */ | |
1214 | case 1538 : /* fall through */ | |
1215 | case 1539 : /* fall through */ | |
1216 | case 1540 : /* fall through */ | |
1217 | case 1541 : /* fall through */ | |
1218 | case 1542 : /* fall through */ | |
1219 | case 1543 : /* fall through */ | |
1220 | case 1544 : /* fall through */ | |
1221 | case 1545 : /* fall through */ | |
1222 | case 1546 : /* fall through */ | |
1223 | case 1547 : /* fall through */ | |
1224 | case 1548 : /* fall through */ | |
1225 | case 1549 : /* fall through */ | |
1226 | case 1550 : /* fall through */ | |
1227 | case 1551 : /* fall through */ | |
1228 | case 1552 : /* fall through */ | |
1229 | case 1553 : /* fall through */ | |
1230 | case 1554 : /* fall through */ | |
1231 | case 1555 : /* fall through */ | |
1232 | case 1556 : /* fall through */ | |
1233 | case 1557 : /* fall through */ | |
1234 | case 1558 : /* fall through */ | |
1235 | case 1559 : /* fall through */ | |
1236 | case 1560 : /* fall through */ | |
1237 | case 1561 : /* fall through */ | |
1238 | case 1562 : /* fall through */ | |
1239 | case 1563 : /* fall through */ | |
1240 | case 1564 : /* fall through */ | |
1241 | case 1565 : /* fall through */ | |
1242 | case 1566 : /* fall through */ | |
1243 | case 1567 : itype = OR1K32BF_INSN_L_MTSPR; goto extract_sfmt_l_mtspr; | |
1244 | case 1569 : | |
1245 | if ((entire_insn & 0xffe007ff) == 0xc4000001) | |
1246 | { itype = OR1K32BF_INSN_L_MAC; goto extract_sfmt_l_mac; } | |
1247 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1248 | case 1570 : | |
1249 | if ((entire_insn & 0xffe007ff) == 0xc4000002) | |
1250 | { itype = OR1K32BF_INSN_L_MSB; goto extract_sfmt_l_mac; } | |
1251 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
07f5f4c6 RH |
1252 | case 1571 : |
1253 | if ((entire_insn & 0xffe007ff) == 0xc4000003) | |
1254 | { itype = OR1K32BF_INSN_L_MACU; goto extract_sfmt_l_macu; } | |
1255 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1256 | case 1572 : | |
1257 | if ((entire_insn & 0xffe007ff) == 0xc4000004) | |
1258 | { itype = OR1K32BF_INSN_L_MSBU; goto extract_sfmt_l_macu; } | |
1259 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
6e51bfa7 SH |
1260 | case 1600 : |
1261 | if ((entire_insn & 0xfc0007ff) == 0xc8000000) | |
1262 | { itype = OR1K32BF_INSN_LF_ADD_S; goto extract_sfmt_lf_add_s; } | |
1263 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1264 | case 1601 : | |
1265 | if ((entire_insn & 0xfc0007ff) == 0xc8000001) | |
1266 | { itype = OR1K32BF_INSN_LF_SUB_S; goto extract_sfmt_lf_add_s; } | |
1267 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1268 | case 1602 : | |
1269 | if ((entire_insn & 0xfc0007ff) == 0xc8000002) | |
1270 | { itype = OR1K32BF_INSN_LF_MUL_S; goto extract_sfmt_lf_add_s; } | |
1271 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1272 | case 1603 : | |
1273 | if ((entire_insn & 0xfc0007ff) == 0xc8000003) | |
1274 | { itype = OR1K32BF_INSN_LF_DIV_S; goto extract_sfmt_lf_add_s; } | |
1275 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1276 | case 1604 : | |
1277 | if ((entire_insn & 0xfc00ffff) == 0xc8000004) | |
1278 | { itype = OR1K32BF_INSN_LF_ITOF_S; goto extract_sfmt_lf_itof_s; } | |
1279 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1280 | case 1605 : | |
1281 | if ((entire_insn & 0xfc00ffff) == 0xc8000005) | |
1282 | { itype = OR1K32BF_INSN_LF_FTOI_S; goto extract_sfmt_lf_ftoi_s; } | |
1283 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1284 | case 1606 : | |
1285 | if ((entire_insn & 0xfc0007ff) == 0xc8000006) | |
1286 | { itype = OR1K32BF_INSN_LF_REM_S; goto extract_sfmt_lf_add_s; } | |
1287 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1288 | case 1607 : | |
1289 | if ((entire_insn & 0xfc0007ff) == 0xc8000007) | |
1290 | { itype = OR1K32BF_INSN_LF_MADD_S; goto extract_sfmt_lf_madd_s; } | |
1291 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1292 | case 1608 : | |
1293 | if ((entire_insn & 0xffe007ff) == 0xc8000008) | |
1294 | { itype = OR1K32BF_INSN_LF_EQ_S; goto extract_sfmt_lf_eq_s; } | |
1295 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1296 | case 1609 : | |
1297 | if ((entire_insn & 0xffe007ff) == 0xc8000009) | |
1298 | { itype = OR1K32BF_INSN_LF_NE_S; goto extract_sfmt_lf_eq_s; } | |
1299 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1300 | case 1610 : | |
1301 | if ((entire_insn & 0xffe007ff) == 0xc800000a) | |
1302 | { itype = OR1K32BF_INSN_LF_GT_S; goto extract_sfmt_lf_eq_s; } | |
1303 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1304 | case 1611 : | |
1305 | if ((entire_insn & 0xffe007ff) == 0xc800000b) | |
1306 | { itype = OR1K32BF_INSN_LF_GE_S; goto extract_sfmt_lf_eq_s; } | |
1307 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1308 | case 1612 : | |
1309 | if ((entire_insn & 0xffe007ff) == 0xc800000c) | |
1310 | { itype = OR1K32BF_INSN_LF_LT_S; goto extract_sfmt_lf_eq_s; } | |
1311 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1312 | case 1613 : | |
1313 | if ((entire_insn & 0xffe007ff) == 0xc800000d) | |
1314 | { itype = OR1K32BF_INSN_LF_LE_S; goto extract_sfmt_lf_eq_s; } | |
1315 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1316 | case 1616 : | |
1317 | if ((entire_insn & 0xffe007ff) == 0xc80000d0) | |
1318 | { itype = OR1K32BF_INSN_LF_CUST1_S; goto extract_sfmt_l_msync; } | |
1319 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1320 | case 1632 : /* fall through */ | |
1321 | case 1633 : /* fall through */ | |
1322 | case 1634 : /* fall through */ | |
1323 | case 1635 : /* fall through */ | |
1324 | case 1636 : /* fall through */ | |
1325 | case 1637 : /* fall through */ | |
1326 | case 1638 : /* fall through */ | |
1327 | case 1639 : /* fall through */ | |
1328 | case 1640 : /* fall through */ | |
1329 | case 1641 : /* fall through */ | |
1330 | case 1642 : /* fall through */ | |
1331 | case 1643 : /* fall through */ | |
1332 | case 1644 : /* fall through */ | |
1333 | case 1645 : /* fall through */ | |
1334 | case 1646 : /* fall through */ | |
1335 | case 1647 : /* fall through */ | |
1336 | case 1648 : /* fall through */ | |
1337 | case 1649 : /* fall through */ | |
1338 | case 1650 : /* fall through */ | |
1339 | case 1651 : /* fall through */ | |
1340 | case 1652 : /* fall through */ | |
1341 | case 1653 : /* fall through */ | |
1342 | case 1654 : /* fall through */ | |
1343 | case 1655 : /* fall through */ | |
1344 | case 1656 : /* fall through */ | |
1345 | case 1657 : /* fall through */ | |
1346 | case 1658 : /* fall through */ | |
1347 | case 1659 : /* fall through */ | |
1348 | case 1660 : /* fall through */ | |
1349 | case 1661 : /* fall through */ | |
1350 | case 1662 : /* fall through */ | |
1351 | case 1663 : itype = OR1K32BF_INSN_L_SWA; goto extract_sfmt_l_swa; | |
1352 | case 1696 : /* fall through */ | |
1353 | case 1697 : /* fall through */ | |
1354 | case 1698 : /* fall through */ | |
1355 | case 1699 : /* fall through */ | |
1356 | case 1700 : /* fall through */ | |
1357 | case 1701 : /* fall through */ | |
1358 | case 1702 : /* fall through */ | |
1359 | case 1703 : /* fall through */ | |
1360 | case 1704 : /* fall through */ | |
1361 | case 1705 : /* fall through */ | |
1362 | case 1706 : /* fall through */ | |
1363 | case 1707 : /* fall through */ | |
1364 | case 1708 : /* fall through */ | |
1365 | case 1709 : /* fall through */ | |
1366 | case 1710 : /* fall through */ | |
1367 | case 1711 : /* fall through */ | |
1368 | case 1712 : /* fall through */ | |
1369 | case 1713 : /* fall through */ | |
1370 | case 1714 : /* fall through */ | |
1371 | case 1715 : /* fall through */ | |
1372 | case 1716 : /* fall through */ | |
1373 | case 1717 : /* fall through */ | |
1374 | case 1718 : /* fall through */ | |
1375 | case 1719 : /* fall through */ | |
1376 | case 1720 : /* fall through */ | |
1377 | case 1721 : /* fall through */ | |
1378 | case 1722 : /* fall through */ | |
1379 | case 1723 : /* fall through */ | |
1380 | case 1724 : /* fall through */ | |
1381 | case 1725 : /* fall through */ | |
1382 | case 1726 : /* fall through */ | |
1383 | case 1727 : itype = OR1K32BF_INSN_L_SW; goto extract_sfmt_l_sw; | |
1384 | case 1728 : /* fall through */ | |
1385 | case 1729 : /* fall through */ | |
1386 | case 1730 : /* fall through */ | |
1387 | case 1731 : /* fall through */ | |
1388 | case 1732 : /* fall through */ | |
1389 | case 1733 : /* fall through */ | |
1390 | case 1734 : /* fall through */ | |
1391 | case 1735 : /* fall through */ | |
1392 | case 1736 : /* fall through */ | |
1393 | case 1737 : /* fall through */ | |
1394 | case 1738 : /* fall through */ | |
1395 | case 1739 : /* fall through */ | |
1396 | case 1740 : /* fall through */ | |
1397 | case 1741 : /* fall through */ | |
1398 | case 1742 : /* fall through */ | |
1399 | case 1743 : /* fall through */ | |
1400 | case 1744 : /* fall through */ | |
1401 | case 1745 : /* fall through */ | |
1402 | case 1746 : /* fall through */ | |
1403 | case 1747 : /* fall through */ | |
1404 | case 1748 : /* fall through */ | |
1405 | case 1749 : /* fall through */ | |
1406 | case 1750 : /* fall through */ | |
1407 | case 1751 : /* fall through */ | |
1408 | case 1752 : /* fall through */ | |
1409 | case 1753 : /* fall through */ | |
1410 | case 1754 : /* fall through */ | |
1411 | case 1755 : /* fall through */ | |
1412 | case 1756 : /* fall through */ | |
1413 | case 1757 : /* fall through */ | |
1414 | case 1758 : /* fall through */ | |
1415 | case 1759 : itype = OR1K32BF_INSN_L_SB; goto extract_sfmt_l_sb; | |
1416 | case 1760 : /* fall through */ | |
1417 | case 1761 : /* fall through */ | |
1418 | case 1762 : /* fall through */ | |
1419 | case 1763 : /* fall through */ | |
1420 | case 1764 : /* fall through */ | |
1421 | case 1765 : /* fall through */ | |
1422 | case 1766 : /* fall through */ | |
1423 | case 1767 : /* fall through */ | |
1424 | case 1768 : /* fall through */ | |
1425 | case 1769 : /* fall through */ | |
1426 | case 1770 : /* fall through */ | |
1427 | case 1771 : /* fall through */ | |
1428 | case 1772 : /* fall through */ | |
1429 | case 1773 : /* fall through */ | |
1430 | case 1774 : /* fall through */ | |
1431 | case 1775 : /* fall through */ | |
1432 | case 1776 : /* fall through */ | |
1433 | case 1777 : /* fall through */ | |
1434 | case 1778 : /* fall through */ | |
1435 | case 1779 : /* fall through */ | |
1436 | case 1780 : /* fall through */ | |
1437 | case 1781 : /* fall through */ | |
1438 | case 1782 : /* fall through */ | |
1439 | case 1783 : /* fall through */ | |
1440 | case 1784 : /* fall through */ | |
1441 | case 1785 : /* fall through */ | |
1442 | case 1786 : /* fall through */ | |
1443 | case 1787 : /* fall through */ | |
1444 | case 1788 : /* fall through */ | |
1445 | case 1789 : /* fall through */ | |
1446 | case 1790 : /* fall through */ | |
1447 | case 1791 : itype = OR1K32BF_INSN_L_SH; goto extract_sfmt_l_sh; | |
1448 | case 1792 : | |
1449 | if ((entire_insn & 0xfc0007ff) == 0xe0000000) | |
1450 | { itype = OR1K32BF_INSN_L_ADD; goto extract_sfmt_l_add; } | |
1451 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1452 | case 1793 : | |
1453 | if ((entire_insn & 0xfc0007ff) == 0xe0000001) | |
1454 | { itype = OR1K32BF_INSN_L_ADDC; goto extract_sfmt_l_addc; } | |
1455 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1456 | case 1794 : | |
1457 | if ((entire_insn & 0xfc0007ff) == 0xe0000002) | |
1458 | { itype = OR1K32BF_INSN_L_SUB; goto extract_sfmt_l_add; } | |
1459 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1460 | case 1795 : | |
1461 | if ((entire_insn & 0xfc0007ff) == 0xe0000003) | |
1462 | { itype = OR1K32BF_INSN_L_AND; goto extract_sfmt_l_and; } | |
1463 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1464 | case 1796 : | |
1465 | if ((entire_insn & 0xfc0007ff) == 0xe0000004) | |
1466 | { itype = OR1K32BF_INSN_L_OR; goto extract_sfmt_l_and; } | |
1467 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1468 | case 1797 : | |
1469 | if ((entire_insn & 0xfc0007ff) == 0xe0000005) | |
1470 | { itype = OR1K32BF_INSN_L_XOR; goto extract_sfmt_l_and; } | |
1471 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1472 | case 1798 : | |
1473 | if ((entire_insn & 0xfc0007ff) == 0xe0000306) | |
07f5f4c6 RH |
1474 | { itype = OR1K32BF_INSN_L_MUL; goto extract_sfmt_l_mul; } |
1475 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1476 | case 1799 : | |
1477 | if ((entire_insn & 0xffe007ff) == 0xe0000307) | |
1478 | { itype = OR1K32BF_INSN_L_MULD; goto extract_sfmt_l_muld; } | |
6e51bfa7 SH |
1479 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; |
1480 | case 1800 : | |
1481 | { | |
1482 | unsigned int val = (((insn >> 7) & (1 << 0))); | |
1483 | switch (val) | |
1484 | { | |
1485 | case 0 : | |
1486 | if ((entire_insn & 0xfc0007ff) == 0xe0000008) | |
1487 | { itype = OR1K32BF_INSN_L_SLL; goto extract_sfmt_l_sll; } | |
1488 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1489 | case 1 : | |
1490 | if ((entire_insn & 0xfc0007ff) == 0xe0000088) | |
1491 | { itype = OR1K32BF_INSN_L_SRA; goto extract_sfmt_l_sll; } | |
1492 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1493 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1494 | } | |
1495 | } | |
1496 | case 1801 : | |
1497 | if ((entire_insn & 0xfc0007ff) == 0xe0000309) | |
1498 | { itype = OR1K32BF_INSN_L_DIV; goto extract_sfmt_l_div; } | |
1499 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1500 | case 1802 : | |
1501 | if ((entire_insn & 0xfc0007ff) == 0xe000030a) | |
07f5f4c6 | 1502 | { itype = OR1K32BF_INSN_L_DIVU; goto extract_sfmt_l_divu; } |
6e51bfa7 SH |
1503 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; |
1504 | case 1803 : | |
1505 | if ((entire_insn & 0xfc0007ff) == 0xe000030b) | |
07f5f4c6 | 1506 | { itype = OR1K32BF_INSN_L_MULU; goto extract_sfmt_l_mulu; } |
6e51bfa7 SH |
1507 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; |
1508 | case 1804 : | |
1509 | { | |
1510 | unsigned int val = (((insn >> 7) & (1 << 0))); | |
1511 | switch (val) | |
1512 | { | |
1513 | case 0 : | |
1514 | if ((entire_insn & 0xfc00ffff) == 0xe000000c) | |
1515 | { itype = OR1K32BF_INSN_L_EXTHS; goto extract_sfmt_l_exths; } | |
1516 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1517 | case 1 : | |
1518 | if ((entire_insn & 0xfc00ffff) == 0xe000008c) | |
1519 | { itype = OR1K32BF_INSN_L_EXTHZ; goto extract_sfmt_l_exths; } | |
1520 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1521 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1522 | } | |
1523 | } | |
1524 | case 1805 : | |
07f5f4c6 RH |
1525 | { |
1526 | unsigned int val = (((insn >> 8) & (3 << 0))); | |
1527 | switch (val) | |
1528 | { | |
1529 | case 0 : | |
1530 | if ((entire_insn & 0xfc00ffff) == 0xe000000d) | |
1531 | { itype = OR1K32BF_INSN_L_EXTWS; goto extract_sfmt_l_exths; } | |
1532 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1533 | case 3 : | |
1534 | if ((entire_insn & 0xffe007ff) == 0xe000030d) | |
1535 | { itype = OR1K32BF_INSN_L_MULDU; goto extract_sfmt_l_muld; } | |
1536 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1537 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1538 | } | |
1539 | } | |
6e51bfa7 SH |
1540 | case 1806 : |
1541 | if ((entire_insn & 0xfc0007ff) == 0xe000000e) | |
1542 | { itype = OR1K32BF_INSN_L_CMOV; goto extract_sfmt_l_cmov; } | |
1543 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1544 | case 1807 : | |
1545 | { | |
1546 | unsigned int val = (((insn >> 8) & (1 << 0))); | |
1547 | switch (val) | |
1548 | { | |
1549 | case 0 : | |
1550 | if ((entire_insn & 0xfc0007ff) == 0xe000000f) | |
1551 | { itype = OR1K32BF_INSN_L_FF1; goto extract_sfmt_l_ff1; } | |
1552 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1553 | case 1 : | |
1554 | if ((entire_insn & 0xfc0007ff) == 0xe000010f) | |
1555 | { itype = OR1K32BF_INSN_L_FL1; goto extract_sfmt_l_ff1; } | |
1556 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1557 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1558 | } | |
1559 | } | |
1560 | case 1816 : | |
1561 | { | |
1562 | unsigned int val = (((insn >> 7) & (1 << 0))); | |
1563 | switch (val) | |
1564 | { | |
1565 | case 0 : | |
1566 | if ((entire_insn & 0xfc0007ff) == 0xe0000048) | |
1567 | { itype = OR1K32BF_INSN_L_SRL; goto extract_sfmt_l_sll; } | |
1568 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1569 | case 1 : | |
1570 | if ((entire_insn & 0xfc0007ff) == 0xe00000c8) | |
1571 | { itype = OR1K32BF_INSN_L_ROR; goto extract_sfmt_l_sll; } | |
1572 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1573 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1574 | } | |
1575 | } | |
1576 | case 1820 : | |
1577 | { | |
1578 | unsigned int val = (((insn >> 7) & (1 << 0))); | |
1579 | switch (val) | |
1580 | { | |
1581 | case 0 : | |
1582 | if ((entire_insn & 0xfc00ffff) == 0xe000004c) | |
1583 | { itype = OR1K32BF_INSN_L_EXTBS; goto extract_sfmt_l_exths; } | |
1584 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1585 | case 1 : | |
1586 | if ((entire_insn & 0xfc00ffff) == 0xe00000cc) | |
1587 | { itype = OR1K32BF_INSN_L_EXTBZ; goto extract_sfmt_l_exths; } | |
1588 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1589 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1590 | } | |
1591 | } | |
1592 | case 1821 : | |
1593 | if ((entire_insn & 0xfc00ffff) == 0xe000004d) | |
1594 | { itype = OR1K32BF_INSN_L_EXTWZ; goto extract_sfmt_l_exths; } | |
1595 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1596 | case 1824 : | |
1597 | { | |
1598 | unsigned int val = (((insn >> 21) & (15 << 0))); | |
1599 | switch (val) | |
1600 | { | |
1601 | case 0 : | |
1602 | if ((entire_insn & 0xffe007ff) == 0xe4000000) | |
1603 | { itype = OR1K32BF_INSN_L_SFEQ; goto extract_sfmt_l_sfgts; } | |
1604 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1605 | case 1 : | |
1606 | if ((entire_insn & 0xffe007ff) == 0xe4200000) | |
1607 | { itype = OR1K32BF_INSN_L_SFNE; goto extract_sfmt_l_sfgts; } | |
1608 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1609 | case 2 : | |
1610 | if ((entire_insn & 0xffe007ff) == 0xe4400000) | |
1611 | { itype = OR1K32BF_INSN_L_SFGTU; goto extract_sfmt_l_sfgts; } | |
1612 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1613 | case 3 : | |
1614 | if ((entire_insn & 0xffe007ff) == 0xe4600000) | |
1615 | { itype = OR1K32BF_INSN_L_SFGEU; goto extract_sfmt_l_sfgts; } | |
1616 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1617 | case 4 : | |
1618 | if ((entire_insn & 0xffe007ff) == 0xe4800000) | |
1619 | { itype = OR1K32BF_INSN_L_SFLTU; goto extract_sfmt_l_sfgts; } | |
1620 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1621 | case 5 : | |
1622 | if ((entire_insn & 0xffe007ff) == 0xe4a00000) | |
1623 | { itype = OR1K32BF_INSN_L_SFLEU; goto extract_sfmt_l_sfgts; } | |
1624 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1625 | case 10 : | |
1626 | if ((entire_insn & 0xffe007ff) == 0xe5400000) | |
1627 | { itype = OR1K32BF_INSN_L_SFGTS; goto extract_sfmt_l_sfgts; } | |
1628 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1629 | case 11 : | |
1630 | if ((entire_insn & 0xffe007ff) == 0xe5600000) | |
1631 | { itype = OR1K32BF_INSN_L_SFGES; goto extract_sfmt_l_sfgts; } | |
1632 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1633 | case 12 : | |
1634 | if ((entire_insn & 0xffe007ff) == 0xe5800000) | |
1635 | { itype = OR1K32BF_INSN_L_SFLTS; goto extract_sfmt_l_sfgts; } | |
1636 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1637 | case 13 : | |
1638 | if ((entire_insn & 0xffe007ff) == 0xe5a00000) | |
1639 | { itype = OR1K32BF_INSN_L_SFLES; goto extract_sfmt_l_sfgts; } | |
1640 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1641 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1642 | } | |
1643 | } | |
1644 | case 1920 : | |
1645 | if ((entire_insn & 0xffffffff) == 0xf0000000) | |
1646 | { itype = OR1K32BF_INSN_L_CUST5; goto extract_sfmt_l_msync; } | |
1647 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1648 | case 1952 : | |
1649 | if ((entire_insn & 0xffffffff) == 0xf4000000) | |
1650 | { itype = OR1K32BF_INSN_L_CUST6; goto extract_sfmt_l_msync; } | |
1651 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1652 | case 1984 : | |
1653 | if ((entire_insn & 0xffffffff) == 0xf8000000) | |
1654 | { itype = OR1K32BF_INSN_L_CUST7; goto extract_sfmt_l_msync; } | |
1655 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1656 | case 2016 : | |
1657 | if ((entire_insn & 0xffffffff) == 0xfc000000) | |
1658 | { itype = OR1K32BF_INSN_L_CUST8; goto extract_sfmt_l_msync; } | |
1659 | itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1660 | default : itype = OR1K32BF_INSN_X_INVALID; goto extract_sfmt_empty; | |
1661 | } | |
1662 | } | |
1663 | } | |
1664 | ||
1665 | /* The instruction has been decoded, now extract the fields. */ | |
1666 | ||
1667 | extract_sfmt_empty: | |
1668 | { | |
1669 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1670 | #define FLD(f) abuf->fields.sfmt_empty.f | |
1671 | ||
1672 | ||
1673 | /* Record the fields for the semantic handler. */ | |
1674 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0)); | |
1675 | ||
1676 | #undef FLD | |
1677 | return idesc; | |
1678 | } | |
1679 | ||
1680 | extract_sfmt_l_j: | |
1681 | { | |
1682 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1683 | CGEN_INSN_WORD insn = entire_insn; | |
1684 | #define FLD(f) abuf->fields.sfmt_l_j.f | |
1685 | USI f_disp26; | |
1686 | ||
1687 | f_disp26 = ((((EXTRACT_LSB0_SINT (insn, 32, 25, 26)) << (2))) + (pc)); | |
1688 | ||
1689 | /* Record the fields for the semantic handler. */ | |
1690 | FLD (i_disp26) = f_disp26; | |
1691 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_j", "disp26 0x%x", 'x', f_disp26, (char *) 0)); | |
1692 | ||
07f5f4c6 RH |
1693 | #undef FLD |
1694 | return idesc; | |
1695 | } | |
1696 | ||
1697 | extract_sfmt_l_adrp: | |
1698 | { | |
1699 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1700 | CGEN_INSN_WORD insn = entire_insn; | |
1701 | #define FLD(f) abuf->fields.sfmt_l_adrp.f | |
1702 | UINT f_r1; | |
1703 | USI f_disp21; | |
1704 | ||
1705 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1706 | f_disp21 = ((((EXTRACT_LSB0_SINT (insn, 32, 20, 21)) + (((SI) (pc) >> (13))))) << (13)); | |
1707 | ||
1708 | /* Record the fields for the semantic handler. */ | |
1709 | FLD (f_r1) = f_r1; | |
1710 | FLD (i_disp21) = f_disp21; | |
1711 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_adrp", "f_r1 0x%x", 'x', f_r1, "disp21 0x%x", 'x', f_disp21, (char *) 0)); | |
1712 | ||
6e51bfa7 SH |
1713 | #undef FLD |
1714 | return idesc; | |
1715 | } | |
1716 | ||
1717 | extract_sfmt_l_jal: | |
1718 | { | |
1719 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1720 | CGEN_INSN_WORD insn = entire_insn; | |
1721 | #define FLD(f) abuf->fields.sfmt_l_j.f | |
1722 | USI f_disp26; | |
1723 | ||
1724 | f_disp26 = ((((EXTRACT_LSB0_SINT (insn, 32, 25, 26)) << (2))) + (pc)); | |
1725 | ||
1726 | /* Record the fields for the semantic handler. */ | |
1727 | FLD (i_disp26) = f_disp26; | |
1728 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_jal", "disp26 0x%x", 'x', f_disp26, (char *) 0)); | |
1729 | ||
1730 | #undef FLD | |
1731 | return idesc; | |
1732 | } | |
1733 | ||
1734 | extract_sfmt_l_jr: | |
1735 | { | |
1736 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1737 | CGEN_INSN_WORD insn = entire_insn; | |
1738 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
1739 | UINT f_r3; | |
1740 | ||
1741 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
1742 | ||
1743 | /* Record the fields for the semantic handler. */ | |
1744 | FLD (f_r3) = f_r3; | |
1745 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_jr", "f_r3 0x%x", 'x', f_r3, (char *) 0)); | |
1746 | ||
1747 | #undef FLD | |
1748 | return idesc; | |
1749 | } | |
1750 | ||
1751 | extract_sfmt_l_jalr: | |
1752 | { | |
1753 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1754 | CGEN_INSN_WORD insn = entire_insn; | |
1755 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
1756 | UINT f_r3; | |
1757 | ||
1758 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
1759 | ||
1760 | /* Record the fields for the semantic handler. */ | |
1761 | FLD (f_r3) = f_r3; | |
1762 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_jalr", "f_r3 0x%x", 'x', f_r3, (char *) 0)); | |
1763 | ||
1764 | #undef FLD | |
1765 | return idesc; | |
1766 | } | |
1767 | ||
1768 | extract_sfmt_l_bnf: | |
1769 | { | |
1770 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1771 | CGEN_INSN_WORD insn = entire_insn; | |
1772 | #define FLD(f) abuf->fields.sfmt_l_j.f | |
1773 | USI f_disp26; | |
1774 | ||
1775 | f_disp26 = ((((EXTRACT_LSB0_SINT (insn, 32, 25, 26)) << (2))) + (pc)); | |
1776 | ||
1777 | /* Record the fields for the semantic handler. */ | |
1778 | FLD (i_disp26) = f_disp26; | |
1779 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_bnf", "disp26 0x%x", 'x', f_disp26, (char *) 0)); | |
1780 | ||
1781 | #undef FLD | |
1782 | return idesc; | |
1783 | } | |
1784 | ||
1785 | extract_sfmt_l_trap: | |
1786 | { | |
1787 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1788 | #define FLD(f) abuf->fields.sfmt_empty.f | |
1789 | ||
1790 | ||
1791 | /* Record the fields for the semantic handler. */ | |
1792 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_trap", (char *) 0)); | |
1793 | ||
1794 | #undef FLD | |
1795 | return idesc; | |
1796 | } | |
1797 | ||
1798 | extract_sfmt_l_msync: | |
1799 | { | |
1800 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1801 | #define FLD(f) abuf->fields.sfmt_empty.f | |
1802 | ||
1803 | ||
1804 | /* Record the fields for the semantic handler. */ | |
1805 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_msync", (char *) 0)); | |
1806 | ||
1807 | #undef FLD | |
1808 | return idesc; | |
1809 | } | |
1810 | ||
1811 | extract_sfmt_l_nop_imm: | |
1812 | { | |
1813 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1814 | CGEN_INSN_WORD insn = entire_insn; | |
1815 | #define FLD(f) abuf->fields.sfmt_l_mfspr.f | |
1816 | UINT f_uimm16; | |
1817 | ||
1818 | f_uimm16 = EXTRACT_LSB0_UINT (insn, 32, 15, 16); | |
1819 | ||
1820 | /* Record the fields for the semantic handler. */ | |
1821 | FLD (f_uimm16) = f_uimm16; | |
1822 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_nop_imm", "f_uimm16 0x%x", 'x', f_uimm16, (char *) 0)); | |
1823 | ||
1824 | #undef FLD | |
1825 | return idesc; | |
1826 | } | |
1827 | ||
1828 | extract_sfmt_l_movhi: | |
1829 | { | |
1830 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1831 | CGEN_INSN_WORD insn = entire_insn; | |
1832 | #define FLD(f) abuf->fields.sfmt_l_mfspr.f | |
1833 | UINT f_r1; | |
1834 | UINT f_uimm16; | |
1835 | ||
1836 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1837 | f_uimm16 = EXTRACT_LSB0_UINT (insn, 32, 15, 16); | |
1838 | ||
1839 | /* Record the fields for the semantic handler. */ | |
1840 | FLD (f_uimm16) = f_uimm16; | |
1841 | FLD (f_r1) = f_r1; | |
1842 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_movhi", "f_uimm16 0x%x", 'x', f_uimm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
1843 | ||
1844 | #undef FLD | |
1845 | return idesc; | |
1846 | } | |
1847 | ||
1848 | extract_sfmt_l_macrc: | |
1849 | { | |
1850 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1851 | CGEN_INSN_WORD insn = entire_insn; | |
07f5f4c6 | 1852 | #define FLD(f) abuf->fields.sfmt_l_adrp.f |
6e51bfa7 SH |
1853 | UINT f_r1; |
1854 | ||
1855 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1856 | ||
1857 | /* Record the fields for the semantic handler. */ | |
1858 | FLD (f_r1) = f_r1; | |
1859 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_macrc", "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
1860 | ||
1861 | #undef FLD | |
1862 | return idesc; | |
1863 | } | |
1864 | ||
1865 | extract_sfmt_l_mfspr: | |
1866 | { | |
1867 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1868 | CGEN_INSN_WORD insn = entire_insn; | |
1869 | #define FLD(f) abuf->fields.sfmt_l_mfspr.f | |
1870 | UINT f_r1; | |
1871 | UINT f_r2; | |
1872 | UINT f_uimm16; | |
1873 | ||
1874 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1875 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
1876 | f_uimm16 = EXTRACT_LSB0_UINT (insn, 32, 15, 16); | |
1877 | ||
1878 | /* Record the fields for the semantic handler. */ | |
1879 | FLD (f_r2) = f_r2; | |
1880 | FLD (f_uimm16) = f_uimm16; | |
1881 | FLD (f_r1) = f_r1; | |
1882 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_mfspr", "f_r2 0x%x", 'x', f_r2, "f_uimm16 0x%x", 'x', f_uimm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
1883 | ||
1884 | #undef FLD | |
1885 | return idesc; | |
1886 | } | |
1887 | ||
1888 | extract_sfmt_l_mtspr: | |
1889 | { | |
1890 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1891 | CGEN_INSN_WORD insn = entire_insn; | |
1892 | #define FLD(f) abuf->fields.sfmt_l_mtspr.f | |
1893 | UINT f_imm16_25_5; | |
1894 | UINT f_r2; | |
1895 | UINT f_r3; | |
1896 | UINT f_imm16_10_11; | |
1897 | UINT f_uimm16_split; | |
1898 | ||
1899 | f_imm16_25_5 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1900 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
1901 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
1902 | f_imm16_10_11 = EXTRACT_LSB0_UINT (insn, 32, 10, 11); | |
1903 | f_uimm16_split = ((UHI) (UINT) (((((f_imm16_25_5) << (11))) | (f_imm16_10_11)))); | |
1904 | ||
1905 | /* Record the fields for the semantic handler. */ | |
1906 | FLD (f_r2) = f_r2; | |
1907 | FLD (f_r3) = f_r3; | |
1908 | FLD (f_uimm16_split) = f_uimm16_split; | |
1909 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_mtspr", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_uimm16_split 0x%x", 'x', f_uimm16_split, (char *) 0)); | |
1910 | ||
1911 | #undef FLD | |
1912 | return idesc; | |
1913 | } | |
1914 | ||
1915 | extract_sfmt_l_lwz: | |
1916 | { | |
1917 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1918 | CGEN_INSN_WORD insn = entire_insn; | |
1919 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
1920 | UINT f_r1; | |
1921 | UINT f_r2; | |
1922 | INT f_simm16; | |
1923 | ||
1924 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1925 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
1926 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
1927 | ||
1928 | /* Record the fields for the semantic handler. */ | |
1929 | FLD (f_r2) = f_r2; | |
1930 | FLD (f_simm16) = f_simm16; | |
1931 | FLD (f_r1) = f_r1; | |
1932 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_lwz", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
1933 | ||
1934 | #undef FLD | |
1935 | return idesc; | |
1936 | } | |
1937 | ||
1938 | extract_sfmt_l_lws: | |
1939 | { | |
1940 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1941 | CGEN_INSN_WORD insn = entire_insn; | |
1942 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
1943 | UINT f_r1; | |
1944 | UINT f_r2; | |
1945 | INT f_simm16; | |
1946 | ||
1947 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1948 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
1949 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
1950 | ||
1951 | /* Record the fields for the semantic handler. */ | |
1952 | FLD (f_r2) = f_r2; | |
1953 | FLD (f_simm16) = f_simm16; | |
1954 | FLD (f_r1) = f_r1; | |
1955 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_lws", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
1956 | ||
1957 | #undef FLD | |
1958 | return idesc; | |
1959 | } | |
1960 | ||
1961 | extract_sfmt_l_lwa: | |
1962 | { | |
1963 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1964 | CGEN_INSN_WORD insn = entire_insn; | |
1965 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
1966 | UINT f_r1; | |
1967 | UINT f_r2; | |
1968 | INT f_simm16; | |
1969 | ||
1970 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1971 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
1972 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
1973 | ||
1974 | /* Record the fields for the semantic handler. */ | |
1975 | FLD (f_r2) = f_r2; | |
1976 | FLD (f_simm16) = f_simm16; | |
1977 | FLD (f_r1) = f_r1; | |
1978 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_lwa", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
1979 | ||
1980 | #undef FLD | |
1981 | return idesc; | |
1982 | } | |
1983 | ||
1984 | extract_sfmt_l_lbz: | |
1985 | { | |
1986 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
1987 | CGEN_INSN_WORD insn = entire_insn; | |
1988 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
1989 | UINT f_r1; | |
1990 | UINT f_r2; | |
1991 | INT f_simm16; | |
1992 | ||
1993 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
1994 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
1995 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
1996 | ||
1997 | /* Record the fields for the semantic handler. */ | |
1998 | FLD (f_r2) = f_r2; | |
1999 | FLD (f_simm16) = f_simm16; | |
2000 | FLD (f_r1) = f_r1; | |
2001 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_lbz", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2002 | ||
2003 | #undef FLD | |
2004 | return idesc; | |
2005 | } | |
2006 | ||
2007 | extract_sfmt_l_lbs: | |
2008 | { | |
2009 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2010 | CGEN_INSN_WORD insn = entire_insn; | |
2011 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2012 | UINT f_r1; | |
2013 | UINT f_r2; | |
2014 | INT f_simm16; | |
2015 | ||
2016 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2017 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2018 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2019 | ||
2020 | /* Record the fields for the semantic handler. */ | |
2021 | FLD (f_r2) = f_r2; | |
2022 | FLD (f_simm16) = f_simm16; | |
2023 | FLD (f_r1) = f_r1; | |
2024 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_lbs", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2025 | ||
2026 | #undef FLD | |
2027 | return idesc; | |
2028 | } | |
2029 | ||
2030 | extract_sfmt_l_lhz: | |
2031 | { | |
2032 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2033 | CGEN_INSN_WORD insn = entire_insn; | |
2034 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2035 | UINT f_r1; | |
2036 | UINT f_r2; | |
2037 | INT f_simm16; | |
2038 | ||
2039 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2040 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2041 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2042 | ||
2043 | /* Record the fields for the semantic handler. */ | |
2044 | FLD (f_r2) = f_r2; | |
2045 | FLD (f_simm16) = f_simm16; | |
2046 | FLD (f_r1) = f_r1; | |
2047 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_lhz", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2048 | ||
2049 | #undef FLD | |
2050 | return idesc; | |
2051 | } | |
2052 | ||
2053 | extract_sfmt_l_lhs: | |
2054 | { | |
2055 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2056 | CGEN_INSN_WORD insn = entire_insn; | |
2057 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2058 | UINT f_r1; | |
2059 | UINT f_r2; | |
2060 | INT f_simm16; | |
2061 | ||
2062 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2063 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2064 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2065 | ||
2066 | /* Record the fields for the semantic handler. */ | |
2067 | FLD (f_r2) = f_r2; | |
2068 | FLD (f_simm16) = f_simm16; | |
2069 | FLD (f_r1) = f_r1; | |
2070 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_lhs", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2071 | ||
2072 | #undef FLD | |
2073 | return idesc; | |
2074 | } | |
2075 | ||
2076 | extract_sfmt_l_sw: | |
2077 | { | |
2078 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2079 | CGEN_INSN_WORD insn = entire_insn; | |
2080 | #define FLD(f) abuf->fields.sfmt_l_sw.f | |
2081 | UINT f_imm16_25_5; | |
2082 | UINT f_r2; | |
2083 | UINT f_r3; | |
2084 | UINT f_imm16_10_11; | |
2085 | INT f_simm16_split; | |
2086 | ||
2087 | f_imm16_25_5 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2088 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2089 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2090 | f_imm16_10_11 = EXTRACT_LSB0_UINT (insn, 32, 10, 11); | |
2091 | f_simm16_split = ((HI) (UINT) (((((f_imm16_25_5) << (11))) | (f_imm16_10_11)))); | |
2092 | ||
2093 | /* Record the fields for the semantic handler. */ | |
2094 | FLD (f_r2) = f_r2; | |
2095 | FLD (f_r3) = f_r3; | |
2096 | FLD (f_simm16_split) = f_simm16_split; | |
2097 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_sw", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_simm16_split 0x%x", 'x', f_simm16_split, (char *) 0)); | |
2098 | ||
2099 | #undef FLD | |
2100 | return idesc; | |
2101 | } | |
2102 | ||
2103 | extract_sfmt_l_sb: | |
2104 | { | |
2105 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2106 | CGEN_INSN_WORD insn = entire_insn; | |
2107 | #define FLD(f) abuf->fields.sfmt_l_sw.f | |
2108 | UINT f_imm16_25_5; | |
2109 | UINT f_r2; | |
2110 | UINT f_r3; | |
2111 | UINT f_imm16_10_11; | |
2112 | INT f_simm16_split; | |
2113 | ||
2114 | f_imm16_25_5 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2115 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2116 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2117 | f_imm16_10_11 = EXTRACT_LSB0_UINT (insn, 32, 10, 11); | |
2118 | f_simm16_split = ((HI) (UINT) (((((f_imm16_25_5) << (11))) | (f_imm16_10_11)))); | |
2119 | ||
2120 | /* Record the fields for the semantic handler. */ | |
2121 | FLD (f_r2) = f_r2; | |
2122 | FLD (f_r3) = f_r3; | |
2123 | FLD (f_simm16_split) = f_simm16_split; | |
2124 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_sb", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_simm16_split 0x%x", 'x', f_simm16_split, (char *) 0)); | |
2125 | ||
2126 | #undef FLD | |
2127 | return idesc; | |
2128 | } | |
2129 | ||
2130 | extract_sfmt_l_sh: | |
2131 | { | |
2132 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2133 | CGEN_INSN_WORD insn = entire_insn; | |
2134 | #define FLD(f) abuf->fields.sfmt_l_sw.f | |
2135 | UINT f_imm16_25_5; | |
2136 | UINT f_r2; | |
2137 | UINT f_r3; | |
2138 | UINT f_imm16_10_11; | |
2139 | INT f_simm16_split; | |
2140 | ||
2141 | f_imm16_25_5 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2142 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2143 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2144 | f_imm16_10_11 = EXTRACT_LSB0_UINT (insn, 32, 10, 11); | |
2145 | f_simm16_split = ((HI) (UINT) (((((f_imm16_25_5) << (11))) | (f_imm16_10_11)))); | |
2146 | ||
2147 | /* Record the fields for the semantic handler. */ | |
2148 | FLD (f_r2) = f_r2; | |
2149 | FLD (f_r3) = f_r3; | |
2150 | FLD (f_simm16_split) = f_simm16_split; | |
2151 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_sh", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_simm16_split 0x%x", 'x', f_simm16_split, (char *) 0)); | |
2152 | ||
2153 | #undef FLD | |
2154 | return idesc; | |
2155 | } | |
2156 | ||
2157 | extract_sfmt_l_swa: | |
2158 | { | |
2159 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2160 | CGEN_INSN_WORD insn = entire_insn; | |
2161 | #define FLD(f) abuf->fields.sfmt_l_sw.f | |
2162 | UINT f_imm16_25_5; | |
2163 | UINT f_r2; | |
2164 | UINT f_r3; | |
2165 | UINT f_imm16_10_11; | |
2166 | INT f_simm16_split; | |
2167 | ||
2168 | f_imm16_25_5 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2169 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2170 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2171 | f_imm16_10_11 = EXTRACT_LSB0_UINT (insn, 32, 10, 11); | |
2172 | f_simm16_split = ((HI) (UINT) (((((f_imm16_25_5) << (11))) | (f_imm16_10_11)))); | |
2173 | ||
2174 | /* Record the fields for the semantic handler. */ | |
2175 | FLD (f_r2) = f_r2; | |
2176 | FLD (f_r3) = f_r3; | |
2177 | FLD (f_simm16_split) = f_simm16_split; | |
2178 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_swa", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_simm16_split 0x%x", 'x', f_simm16_split, (char *) 0)); | |
2179 | ||
2180 | #undef FLD | |
2181 | return idesc; | |
2182 | } | |
2183 | ||
2184 | extract_sfmt_l_sll: | |
2185 | { | |
2186 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2187 | CGEN_INSN_WORD insn = entire_insn; | |
2188 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2189 | UINT f_r1; | |
2190 | UINT f_r2; | |
2191 | UINT f_r3; | |
2192 | ||
2193 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2194 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2195 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2196 | ||
2197 | /* Record the fields for the semantic handler. */ | |
2198 | FLD (f_r2) = f_r2; | |
2199 | FLD (f_r3) = f_r3; | |
2200 | FLD (f_r1) = f_r1; | |
2201 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_sll", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2202 | ||
2203 | #undef FLD | |
2204 | return idesc; | |
2205 | } | |
2206 | ||
2207 | extract_sfmt_l_slli: | |
2208 | { | |
2209 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2210 | CGEN_INSN_WORD insn = entire_insn; | |
2211 | #define FLD(f) abuf->fields.sfmt_l_slli.f | |
2212 | UINT f_r1; | |
2213 | UINT f_r2; | |
2214 | UINT f_uimm6; | |
2215 | ||
2216 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2217 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2218 | f_uimm6 = EXTRACT_LSB0_UINT (insn, 32, 5, 6); | |
2219 | ||
2220 | /* Record the fields for the semantic handler. */ | |
2221 | FLD (f_r2) = f_r2; | |
2222 | FLD (f_uimm6) = f_uimm6; | |
2223 | FLD (f_r1) = f_r1; | |
2224 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_slli", "f_r2 0x%x", 'x', f_r2, "f_uimm6 0x%x", 'x', f_uimm6, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2225 | ||
2226 | #undef FLD | |
2227 | return idesc; | |
2228 | } | |
2229 | ||
2230 | extract_sfmt_l_and: | |
2231 | { | |
2232 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2233 | CGEN_INSN_WORD insn = entire_insn; | |
2234 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2235 | UINT f_r1; | |
2236 | UINT f_r2; | |
2237 | UINT f_r3; | |
2238 | ||
2239 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2240 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2241 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2242 | ||
2243 | /* Record the fields for the semantic handler. */ | |
2244 | FLD (f_r2) = f_r2; | |
2245 | FLD (f_r3) = f_r3; | |
2246 | FLD (f_r1) = f_r1; | |
2247 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_and", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2248 | ||
2249 | #undef FLD | |
2250 | return idesc; | |
2251 | } | |
2252 | ||
2253 | extract_sfmt_l_add: | |
2254 | { | |
2255 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2256 | CGEN_INSN_WORD insn = entire_insn; | |
2257 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2258 | UINT f_r1; | |
2259 | UINT f_r2; | |
2260 | UINT f_r3; | |
2261 | ||
2262 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2263 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2264 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2265 | ||
2266 | /* Record the fields for the semantic handler. */ | |
2267 | FLD (f_r2) = f_r2; | |
2268 | FLD (f_r3) = f_r3; | |
2269 | FLD (f_r1) = f_r1; | |
2270 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_add", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2271 | ||
2272 | #undef FLD | |
2273 | return idesc; | |
2274 | } | |
2275 | ||
2276 | extract_sfmt_l_addc: | |
2277 | { | |
2278 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2279 | CGEN_INSN_WORD insn = entire_insn; | |
2280 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2281 | UINT f_r1; | |
2282 | UINT f_r2; | |
2283 | UINT f_r3; | |
2284 | ||
2285 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2286 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2287 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2288 | ||
2289 | /* Record the fields for the semantic handler. */ | |
2290 | FLD (f_r2) = f_r2; | |
2291 | FLD (f_r3) = f_r3; | |
2292 | FLD (f_r1) = f_r1; | |
2293 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_addc", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2294 | ||
07f5f4c6 RH |
2295 | #undef FLD |
2296 | return idesc; | |
2297 | } | |
2298 | ||
2299 | extract_sfmt_l_mul: | |
2300 | { | |
2301 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2302 | CGEN_INSN_WORD insn = entire_insn; | |
2303 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2304 | UINT f_r1; | |
2305 | UINT f_r2; | |
2306 | UINT f_r3; | |
2307 | ||
2308 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2309 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2310 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2311 | ||
2312 | /* Record the fields for the semantic handler. */ | |
2313 | FLD (f_r2) = f_r2; | |
2314 | FLD (f_r3) = f_r3; | |
2315 | FLD (f_r1) = f_r1; | |
2316 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_mul", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2317 | ||
2318 | #undef FLD | |
2319 | return idesc; | |
2320 | } | |
2321 | ||
2322 | extract_sfmt_l_muld: | |
2323 | { | |
2324 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2325 | CGEN_INSN_WORD insn = entire_insn; | |
2326 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2327 | UINT f_r2; | |
2328 | UINT f_r3; | |
2329 | ||
2330 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2331 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2332 | ||
2333 | /* Record the fields for the semantic handler. */ | |
2334 | FLD (f_r2) = f_r2; | |
2335 | FLD (f_r3) = f_r3; | |
2336 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_muld", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, (char *) 0)); | |
2337 | ||
2338 | #undef FLD | |
2339 | return idesc; | |
2340 | } | |
2341 | ||
2342 | extract_sfmt_l_mulu: | |
2343 | { | |
2344 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2345 | CGEN_INSN_WORD insn = entire_insn; | |
2346 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2347 | UINT f_r1; | |
2348 | UINT f_r2; | |
2349 | UINT f_r3; | |
2350 | ||
2351 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2352 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2353 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2354 | ||
2355 | /* Record the fields for the semantic handler. */ | |
2356 | FLD (f_r2) = f_r2; | |
2357 | FLD (f_r3) = f_r3; | |
2358 | FLD (f_r1) = f_r1; | |
2359 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_mulu", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2360 | ||
6e51bfa7 SH |
2361 | #undef FLD |
2362 | return idesc; | |
2363 | } | |
2364 | ||
2365 | extract_sfmt_l_div: | |
2366 | { | |
2367 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2368 | CGEN_INSN_WORD insn = entire_insn; | |
2369 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2370 | UINT f_r1; | |
2371 | UINT f_r2; | |
2372 | UINT f_r3; | |
2373 | ||
2374 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2375 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2376 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2377 | ||
2378 | /* Record the fields for the semantic handler. */ | |
2379 | FLD (f_r2) = f_r2; | |
2380 | FLD (f_r3) = f_r3; | |
2381 | FLD (f_r1) = f_r1; | |
2382 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_div", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2383 | ||
07f5f4c6 RH |
2384 | #undef FLD |
2385 | return idesc; | |
2386 | } | |
2387 | ||
2388 | extract_sfmt_l_divu: | |
2389 | { | |
2390 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2391 | CGEN_INSN_WORD insn = entire_insn; | |
2392 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2393 | UINT f_r1; | |
2394 | UINT f_r2; | |
2395 | UINT f_r3; | |
2396 | ||
2397 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2398 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2399 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2400 | ||
2401 | /* Record the fields for the semantic handler. */ | |
2402 | FLD (f_r2) = f_r2; | |
2403 | FLD (f_r3) = f_r3; | |
2404 | FLD (f_r1) = f_r1; | |
2405 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_divu", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2406 | ||
6e51bfa7 SH |
2407 | #undef FLD |
2408 | return idesc; | |
2409 | } | |
2410 | ||
2411 | extract_sfmt_l_ff1: | |
2412 | { | |
2413 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2414 | CGEN_INSN_WORD insn = entire_insn; | |
2415 | #define FLD(f) abuf->fields.sfmt_l_slli.f | |
2416 | UINT f_r1; | |
2417 | UINT f_r2; | |
2418 | ||
2419 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2420 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2421 | ||
2422 | /* Record the fields for the semantic handler. */ | |
2423 | FLD (f_r2) = f_r2; | |
2424 | FLD (f_r1) = f_r1; | |
2425 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_ff1", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2426 | ||
2427 | #undef FLD | |
2428 | return idesc; | |
2429 | } | |
2430 | ||
2431 | extract_sfmt_l_xori: | |
2432 | { | |
2433 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2434 | CGEN_INSN_WORD insn = entire_insn; | |
2435 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2436 | UINT f_r1; | |
2437 | UINT f_r2; | |
2438 | INT f_simm16; | |
2439 | ||
2440 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2441 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2442 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2443 | ||
2444 | /* Record the fields for the semantic handler. */ | |
2445 | FLD (f_r2) = f_r2; | |
2446 | FLD (f_simm16) = f_simm16; | |
2447 | FLD (f_r1) = f_r1; | |
2448 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_xori", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2449 | ||
2450 | #undef FLD | |
2451 | return idesc; | |
2452 | } | |
2453 | ||
2454 | extract_sfmt_l_addi: | |
2455 | { | |
2456 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2457 | CGEN_INSN_WORD insn = entire_insn; | |
2458 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2459 | UINT f_r1; | |
2460 | UINT f_r2; | |
2461 | INT f_simm16; | |
2462 | ||
2463 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2464 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2465 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2466 | ||
2467 | /* Record the fields for the semantic handler. */ | |
2468 | FLD (f_r2) = f_r2; | |
2469 | FLD (f_simm16) = f_simm16; | |
2470 | FLD (f_r1) = f_r1; | |
2471 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_addi", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2472 | ||
2473 | #undef FLD | |
2474 | return idesc; | |
2475 | } | |
2476 | ||
2477 | extract_sfmt_l_addic: | |
2478 | { | |
2479 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2480 | CGEN_INSN_WORD insn = entire_insn; | |
2481 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2482 | UINT f_r1; | |
2483 | UINT f_r2; | |
2484 | INT f_simm16; | |
2485 | ||
2486 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2487 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2488 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2489 | ||
2490 | /* Record the fields for the semantic handler. */ | |
2491 | FLD (f_r2) = f_r2; | |
2492 | FLD (f_simm16) = f_simm16; | |
2493 | FLD (f_r1) = f_r1; | |
2494 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_addic", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2495 | ||
07f5f4c6 RH |
2496 | #undef FLD |
2497 | return idesc; | |
2498 | } | |
2499 | ||
2500 | extract_sfmt_l_muli: | |
2501 | { | |
2502 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2503 | CGEN_INSN_WORD insn = entire_insn; | |
2504 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2505 | UINT f_r1; | |
2506 | UINT f_r2; | |
2507 | INT f_simm16; | |
2508 | ||
2509 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2510 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2511 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2512 | ||
2513 | /* Record the fields for the semantic handler. */ | |
2514 | FLD (f_r2) = f_r2; | |
2515 | FLD (f_simm16) = f_simm16; | |
2516 | FLD (f_r1) = f_r1; | |
2517 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_muli", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2518 | ||
6e51bfa7 SH |
2519 | #undef FLD |
2520 | return idesc; | |
2521 | } | |
2522 | ||
2523 | extract_sfmt_l_exths: | |
2524 | { | |
2525 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2526 | CGEN_INSN_WORD insn = entire_insn; | |
2527 | #define FLD(f) abuf->fields.sfmt_l_slli.f | |
2528 | UINT f_r1; | |
2529 | UINT f_r2; | |
2530 | ||
2531 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2532 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2533 | ||
2534 | /* Record the fields for the semantic handler. */ | |
2535 | FLD (f_r2) = f_r2; | |
2536 | FLD (f_r1) = f_r1; | |
2537 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_exths", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2538 | ||
2539 | #undef FLD | |
2540 | return idesc; | |
2541 | } | |
2542 | ||
2543 | extract_sfmt_l_cmov: | |
2544 | { | |
2545 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2546 | CGEN_INSN_WORD insn = entire_insn; | |
2547 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2548 | UINT f_r1; | |
2549 | UINT f_r2; | |
2550 | UINT f_r3; | |
2551 | ||
2552 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2553 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2554 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2555 | ||
2556 | /* Record the fields for the semantic handler. */ | |
2557 | FLD (f_r2) = f_r2; | |
2558 | FLD (f_r3) = f_r3; | |
2559 | FLD (f_r1) = f_r1; | |
2560 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_cmov", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2561 | ||
2562 | #undef FLD | |
2563 | return idesc; | |
2564 | } | |
2565 | ||
2566 | extract_sfmt_l_sfgts: | |
2567 | { | |
2568 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2569 | CGEN_INSN_WORD insn = entire_insn; | |
2570 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2571 | UINT f_r2; | |
2572 | UINT f_r3; | |
2573 | ||
2574 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2575 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2576 | ||
2577 | /* Record the fields for the semantic handler. */ | |
2578 | FLD (f_r2) = f_r2; | |
2579 | FLD (f_r3) = f_r3; | |
2580 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_sfgts", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, (char *) 0)); | |
2581 | ||
2582 | #undef FLD | |
2583 | return idesc; | |
2584 | } | |
2585 | ||
2586 | extract_sfmt_l_sfgtsi: | |
2587 | { | |
2588 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2589 | CGEN_INSN_WORD insn = entire_insn; | |
2590 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2591 | UINT f_r2; | |
2592 | INT f_simm16; | |
2593 | ||
2594 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2595 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2596 | ||
2597 | /* Record the fields for the semantic handler. */ | |
2598 | FLD (f_r2) = f_r2; | |
2599 | FLD (f_simm16) = f_simm16; | |
2600 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_sfgtsi", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, (char *) 0)); | |
2601 | ||
2602 | #undef FLD | |
2603 | return idesc; | |
2604 | } | |
2605 | ||
2606 | extract_sfmt_l_mac: | |
2607 | { | |
2608 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2609 | CGEN_INSN_WORD insn = entire_insn; | |
2610 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2611 | UINT f_r2; | |
2612 | UINT f_r3; | |
2613 | ||
2614 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2615 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2616 | ||
2617 | /* Record the fields for the semantic handler. */ | |
2618 | FLD (f_r2) = f_r2; | |
2619 | FLD (f_r3) = f_r3; | |
2620 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_mac", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, (char *) 0)); | |
2621 | ||
2622 | #undef FLD | |
2623 | return idesc; | |
2624 | } | |
2625 | ||
2626 | extract_sfmt_l_maci: | |
2627 | { | |
2628 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2629 | CGEN_INSN_WORD insn = entire_insn; | |
2630 | #define FLD(f) abuf->fields.sfmt_l_lwz.f | |
2631 | UINT f_r2; | |
2632 | INT f_simm16; | |
2633 | ||
2634 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2635 | f_simm16 = EXTRACT_LSB0_SINT (insn, 32, 15, 16); | |
2636 | ||
2637 | /* Record the fields for the semantic handler. */ | |
2638 | FLD (f_r2) = f_r2; | |
2639 | FLD (f_simm16) = f_simm16; | |
2640 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_maci", "f_r2 0x%x", 'x', f_r2, "f_simm16 0x%x", 'x', f_simm16, (char *) 0)); | |
2641 | ||
07f5f4c6 RH |
2642 | #undef FLD |
2643 | return idesc; | |
2644 | } | |
2645 | ||
2646 | extract_sfmt_l_macu: | |
2647 | { | |
2648 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2649 | CGEN_INSN_WORD insn = entire_insn; | |
2650 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2651 | UINT f_r2; | |
2652 | UINT f_r3; | |
2653 | ||
2654 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2655 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2656 | ||
2657 | /* Record the fields for the semantic handler. */ | |
2658 | FLD (f_r2) = f_r2; | |
2659 | FLD (f_r3) = f_r3; | |
2660 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_l_macu", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, (char *) 0)); | |
2661 | ||
6e51bfa7 SH |
2662 | #undef FLD |
2663 | return idesc; | |
2664 | } | |
2665 | ||
2666 | extract_sfmt_lf_add_s: | |
2667 | { | |
2668 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2669 | CGEN_INSN_WORD insn = entire_insn; | |
2670 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2671 | UINT f_r1; | |
2672 | UINT f_r2; | |
2673 | UINT f_r3; | |
2674 | ||
2675 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2676 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2677 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2678 | ||
2679 | /* Record the fields for the semantic handler. */ | |
2680 | FLD (f_r2) = f_r2; | |
2681 | FLD (f_r3) = f_r3; | |
2682 | FLD (f_r1) = f_r1; | |
2683 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lf_add_s", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2684 | ||
2685 | #undef FLD | |
2686 | return idesc; | |
2687 | } | |
2688 | ||
2689 | extract_sfmt_lf_itof_s: | |
2690 | { | |
2691 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2692 | CGEN_INSN_WORD insn = entire_insn; | |
2693 | #define FLD(f) abuf->fields.sfmt_l_slli.f | |
2694 | UINT f_r1; | |
2695 | UINT f_r2; | |
2696 | ||
2697 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2698 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2699 | ||
2700 | /* Record the fields for the semantic handler. */ | |
2701 | FLD (f_r2) = f_r2; | |
2702 | FLD (f_r1) = f_r1; | |
2703 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lf_itof_s", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2704 | ||
2705 | #undef FLD | |
2706 | return idesc; | |
2707 | } | |
2708 | ||
2709 | extract_sfmt_lf_ftoi_s: | |
2710 | { | |
2711 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2712 | CGEN_INSN_WORD insn = entire_insn; | |
2713 | #define FLD(f) abuf->fields.sfmt_l_slli.f | |
2714 | UINT f_r1; | |
2715 | UINT f_r2; | |
2716 | ||
2717 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2718 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2719 | ||
2720 | /* Record the fields for the semantic handler. */ | |
2721 | FLD (f_r2) = f_r2; | |
2722 | FLD (f_r1) = f_r1; | |
2723 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lf_ftoi_s", "f_r2 0x%x", 'x', f_r2, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2724 | ||
2725 | #undef FLD | |
2726 | return idesc; | |
2727 | } | |
2728 | ||
2729 | extract_sfmt_lf_eq_s: | |
2730 | { | |
2731 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2732 | CGEN_INSN_WORD insn = entire_insn; | |
2733 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2734 | UINT f_r2; | |
2735 | UINT f_r3; | |
2736 | ||
2737 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2738 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2739 | ||
2740 | /* Record the fields for the semantic handler. */ | |
2741 | FLD (f_r2) = f_r2; | |
2742 | FLD (f_r3) = f_r3; | |
2743 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lf_eq_s", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, (char *) 0)); | |
2744 | ||
2745 | #undef FLD | |
2746 | return idesc; | |
2747 | } | |
2748 | ||
2749 | extract_sfmt_lf_madd_s: | |
2750 | { | |
2751 | const IDESC *idesc = &or1k32bf_insn_data[itype]; | |
2752 | CGEN_INSN_WORD insn = entire_insn; | |
2753 | #define FLD(f) abuf->fields.sfmt_l_sll.f | |
2754 | UINT f_r1; | |
2755 | UINT f_r2; | |
2756 | UINT f_r3; | |
2757 | ||
2758 | f_r1 = EXTRACT_LSB0_UINT (insn, 32, 25, 5); | |
2759 | f_r2 = EXTRACT_LSB0_UINT (insn, 32, 20, 5); | |
2760 | f_r3 = EXTRACT_LSB0_UINT (insn, 32, 15, 5); | |
2761 | ||
2762 | /* Record the fields for the semantic handler. */ | |
2763 | FLD (f_r2) = f_r2; | |
2764 | FLD (f_r3) = f_r3; | |
2765 | FLD (f_r1) = f_r1; | |
2766 | TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lf_madd_s", "f_r2 0x%x", 'x', f_r2, "f_r3 0x%x", 'x', f_r3, "f_r1 0x%x", 'x', f_r1, (char *) 0)); | |
2767 | ||
2768 | #undef FLD | |
2769 | return idesc; | |
2770 | } | |
2771 | ||
2772 | } |