(DVP_OPCODE_IGNORE_DIS): New macro.
[deliverable/binutils-gdb.git] / sim / m32r / readx.c
CommitLineData
8e420152
DE
1/* Simulator instruction operand reader for m32r.
2
b8a9943d
DE
3This file is machine generated with CGEN.
4
8e420152
DE
5Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
6
7This file is part of the GNU Simulators.
8
9This program is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2, or (at your option)
12any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License along
20with this program; if not, write to the Free Software Foundation, Inc.,
2159 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23*/
24
8e420152
DE
25#ifdef DEFINE_LABELS
26#undef DEFINE_LABELS
27
8e420152
DE
28 /* The labels have the case they have because the enum of insn types
29 is all uppercase and in the non-stdc case the fmt symbol is built
30 into the enum name.
31
32 The order here must match the order in m32rx_decode_vars in decode.c. */
33
34 static void *labels[] = {
35 && case_read_READ_ILLEGAL,
36 && case_read_READ_FMT_0_ADD,
37 && case_read_READ_FMT_1_ADD3,
dc4e95ad 38 && case_read_READ_FMT_0_ADD,
8e420152 39 && case_read_READ_FMT_2_AND3,
dc4e95ad 40 && case_read_READ_FMT_0_ADD,
8e420152 41 && case_read_READ_FMT_3_OR3,
dc4e95ad
DE
42 && case_read_READ_FMT_0_ADD,
43 && case_read_READ_FMT_2_AND3,
8e420152 44 && case_read_READ_FMT_4_ADDI,
b8641a4d
DE
45 && case_read_READ_FMT_5_ADDV,
46 && case_read_READ_FMT_6_ADDV3,
47 && case_read_READ_FMT_7_ADDX,
48 && case_read_READ_FMT_8_BC8,
49 && case_read_READ_FMT_9_BC24,
50 && case_read_READ_FMT_10_BEQ,
51 && case_read_READ_FMT_11_BEQZ,
52 && case_read_READ_FMT_11_BEQZ,
53 && case_read_READ_FMT_11_BEQZ,
54 && case_read_READ_FMT_11_BEQZ,
55 && case_read_READ_FMT_11_BEQZ,
56 && case_read_READ_FMT_11_BEQZ,
57 && case_read_READ_FMT_12_BL8,
58 && case_read_READ_FMT_13_BL24,
59 && case_read_READ_FMT_14_BCL8,
60 && case_read_READ_FMT_15_BCL24,
61 && case_read_READ_FMT_8_BC8,
62 && case_read_READ_FMT_9_BC24,
63 && case_read_READ_FMT_10_BEQ,
64 && case_read_READ_FMT_16_BRA8,
65 && case_read_READ_FMT_17_BRA24,
66 && case_read_READ_FMT_14_BCL8,
67 && case_read_READ_FMT_15_BCL24,
68 && case_read_READ_FMT_18_CMP,
69 && case_read_READ_FMT_19_CMPI,
70 && case_read_READ_FMT_18_CMP,
71 && case_read_READ_FMT_20_CMPUI,
72 && case_read_READ_FMT_18_CMP,
73 && case_read_READ_FMT_21_CMPZ,
74 && case_read_READ_FMT_22_DIV,
75 && case_read_READ_FMT_22_DIV,
76 && case_read_READ_FMT_22_DIV,
77 && case_read_READ_FMT_22_DIV,
78 && case_read_READ_FMT_22_DIV,
79 && case_read_READ_FMT_23_JC,
80 && case_read_READ_FMT_23_JC,
81 && case_read_READ_FMT_24_JL,
82 && case_read_READ_FMT_25_JMP,
83 && case_read_READ_FMT_26_LD,
84 && case_read_READ_FMT_27_LD_D,
85 && case_read_READ_FMT_28_LDB,
86 && case_read_READ_FMT_29_LDB_D,
87 && case_read_READ_FMT_30_LDH,
88 && case_read_READ_FMT_31_LDH_D,
89 && case_read_READ_FMT_28_LDB,
90 && case_read_READ_FMT_29_LDB_D,
91 && case_read_READ_FMT_30_LDH,
92 && case_read_READ_FMT_31_LDH_D,
93 && case_read_READ_FMT_32_LD_PLUS,
94 && case_read_READ_FMT_33_LD24,
95 && case_read_READ_FMT_34_LDI8,
96 && case_read_READ_FMT_35_LDI16,
97 && case_read_READ_FMT_36_LOCK,
98 && case_read_READ_FMT_37_MACHI_A,
99 && case_read_READ_FMT_37_MACHI_A,
dc4e95ad 100 && case_read_READ_FMT_0_ADD,
b8641a4d
DE
101 && case_read_READ_FMT_38_MULHI_A,
102 && case_read_READ_FMT_38_MULHI_A,
103 && case_read_READ_FMT_39_MV,
104 && case_read_READ_FMT_40_MVFACHI_A,
105 && case_read_READ_FMT_40_MVFACHI_A,
106 && case_read_READ_FMT_40_MVFACHI_A,
107 && case_read_READ_FMT_41_MVFC,
108 && case_read_READ_FMT_42_MVTACHI_A,
109 && case_read_READ_FMT_42_MVTACHI_A,
110 && case_read_READ_FMT_43_MVTC,
111 && case_read_READ_FMT_39_MV,
112 && case_read_READ_FMT_44_NOP,
113 && case_read_READ_FMT_39_MV,
114 && case_read_READ_FMT_45_RAC_D,
115 && case_read_READ_FMT_46_RAC_DS,
116 && case_read_READ_FMT_47_RAC_DSI,
117 && case_read_READ_FMT_45_RAC_D,
118 && case_read_READ_FMT_46_RAC_DS,
119 && case_read_READ_FMT_47_RAC_DSI,
120 && case_read_READ_FMT_48_RTE,
121 && case_read_READ_FMT_49_SETH,
dc4e95ad 122 && case_read_READ_FMT_0_ADD,
b8641a4d
DE
123 && case_read_READ_FMT_50_SLL3,
124 && case_read_READ_FMT_51_SLLI,
dc4e95ad 125 && case_read_READ_FMT_0_ADD,
b8641a4d
DE
126 && case_read_READ_FMT_50_SLL3,
127 && case_read_READ_FMT_51_SLLI,
dc4e95ad 128 && case_read_READ_FMT_0_ADD,
b8641a4d
DE
129 && case_read_READ_FMT_50_SLL3,
130 && case_read_READ_FMT_51_SLLI,
131 && case_read_READ_FMT_52_ST,
132 && case_read_READ_FMT_53_ST_D,
133 && case_read_READ_FMT_54_STB,
134 && case_read_READ_FMT_55_STB_D,
135 && case_read_READ_FMT_56_STH,
136 && case_read_READ_FMT_57_STH_D,
137 && case_read_READ_FMT_58_ST_PLUS,
138 && case_read_READ_FMT_58_ST_PLUS,
dc4e95ad 139 && case_read_READ_FMT_0_ADD,
b8641a4d
DE
140 && case_read_READ_FMT_5_ADDV,
141 && case_read_READ_FMT_7_ADDX,
142 && case_read_READ_FMT_59_TRAP,
143 && case_read_READ_FMT_60_UNLOCK,
144 && case_read_READ_FMT_61_SATB,
145 && case_read_READ_FMT_61_SATB,
146 && case_read_READ_FMT_62_SAT,
147 && case_read_READ_FMT_21_CMPZ,
148 && case_read_READ_FMT_63_SADD,
149 && case_read_READ_FMT_64_MACWU1,
150 && case_read_READ_FMT_65_MSBLO,
151 && case_read_READ_FMT_66_MULWU1,
152 && case_read_READ_FMT_64_MACWU1,
153 && case_read_READ_FMT_67_SC,
154 && case_read_READ_FMT_67_SC,
8e420152
DE
155 0
156 };
157 extern DECODE *m32rx_decode_vars[];
158 int i;
159
160 for (i = 0; m32rx_decode_vars[i] != 0; ++i)
161 m32rx_decode_vars[i]->read = labels[i];
162
163#endif /* DEFINE_LABELS */
164
165#ifdef DEFINE_SWITCH
166#undef DEFINE_SWITCH
167
168{
169 SWITCH (read, decode->read)
170 {
171
172 CASE (read, READ_ILLEGAL) :
173 {
174 sim_engine_illegal_insn (current_cpu, NULL_CIA /*FIXME*/);
175 }
176 BREAK (read);
177
178 CASE (read, READ_FMT_0_ADD) : /* e.g. add $dr,$sr */
179 {
dc4e95ad 180#define OPRND(f) par_exec->operands.fmt_0_add.f
8e420152 181 EXTRACT_FMT_0_ADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
8e420152
DE
182 EXTRACT_FMT_0_ADD_CODE
183
184 /* Fetch the input operands for the semantic handler. */
185 OPRND (dr) = CPU (h_gr[f_r1]);
186 OPRND (sr) = CPU (h_gr[f_r2]);
187#undef OPRND
188 }
189 BREAK (read);
190
191 CASE (read, READ_FMT_1_ADD3) : /* e.g. add3 $dr,$sr,#$slo16 */
192 {
dc4e95ad 193#define OPRND(f) par_exec->operands.fmt_1_add3.f
8e420152 194 EXTRACT_FMT_1_ADD3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
8e420152
DE
195 EXTRACT_FMT_1_ADD3_CODE
196
197 /* Fetch the input operands for the semantic handler. */
198 OPRND (slo16) = f_simm16;
199 OPRND (sr) = CPU (h_gr[f_r2]);
200#undef OPRND
201 }
202 BREAK (read);
203
204 CASE (read, READ_FMT_2_AND3) : /* e.g. and3 $dr,$sr,#$uimm16 */
205 {
dc4e95ad 206#define OPRND(f) par_exec->operands.fmt_2_and3.f
8e420152 207 EXTRACT_FMT_2_AND3_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
8e420152
DE
208 EXTRACT_FMT_2_AND3_CODE
209
210 /* Fetch the input operands for the semantic handler. */
211 OPRND (sr) = CPU (h_gr[f_r2]);
212 OPRND (uimm16) = f_uimm16;
213#undef OPRND
214 }
215 BREAK (read);
216
217 CASE (read, READ_FMT_3_OR3) : /* e.g. or3 $dr,$sr,#$ulo16 */
218 {
dc4e95ad 219#define OPRND(f) par_exec->operands.fmt_3_or3.f
8e420152 220 EXTRACT_FMT_3_OR3_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
8e420152
DE
221 EXTRACT_FMT_3_OR3_CODE
222
223 /* Fetch the input operands for the semantic handler. */
224 OPRND (sr) = CPU (h_gr[f_r2]);
225 OPRND (ulo16) = f_uimm16;
226#undef OPRND
227 }
228 BREAK (read);
229
230 CASE (read, READ_FMT_4_ADDI) : /* e.g. addi $dr,#$simm8 */
231 {
dc4e95ad 232#define OPRND(f) par_exec->operands.fmt_4_addi.f
8e420152 233 EXTRACT_FMT_4_ADDI_VARS /* f-op1 f-r1 f-simm8 */
8e420152
DE
234 EXTRACT_FMT_4_ADDI_CODE
235
236 /* Fetch the input operands for the semantic handler. */
237 OPRND (dr) = CPU (h_gr[f_r1]);
238 OPRND (simm8) = f_simm8;
239#undef OPRND
240 }
241 BREAK (read);
242
b8641a4d 243 CASE (read, READ_FMT_5_ADDV) : /* e.g. addv $dr,$sr */
8e420152 244 {
b8641a4d
DE
245#define OPRND(f) par_exec->operands.fmt_5_addv.f
246 EXTRACT_FMT_5_ADDV_VARS /* f-op1 f-r1 f-op2 f-r2 */
247 EXTRACT_FMT_5_ADDV_CODE
248
249 /* Fetch the input operands for the semantic handler. */
250 OPRND (dr) = CPU (h_gr[f_r1]);
251 OPRND (sr) = CPU (h_gr[f_r2]);
252#undef OPRND
253 }
254 BREAK (read);
255
256 CASE (read, READ_FMT_6_ADDV3) : /* e.g. addv3 $dr,$sr,#$simm16 */
257 {
258#define OPRND(f) par_exec->operands.fmt_6_addv3.f
259 EXTRACT_FMT_6_ADDV3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
260 EXTRACT_FMT_6_ADDV3_CODE
8e420152
DE
261
262 /* Fetch the input operands for the semantic handler. */
263 OPRND (simm16) = f_simm16;
264 OPRND (sr) = CPU (h_gr[f_r2]);
265#undef OPRND
266 }
267 BREAK (read);
268
b8641a4d 269 CASE (read, READ_FMT_7_ADDX) : /* e.g. addx $dr,$sr */
8e420152 270 {
b8641a4d
DE
271#define OPRND(f) par_exec->operands.fmt_7_addx.f
272 EXTRACT_FMT_7_ADDX_VARS /* f-op1 f-r1 f-op2 f-r2 */
273 EXTRACT_FMT_7_ADDX_CODE
8e420152
DE
274
275 /* Fetch the input operands for the semantic handler. */
276 OPRND (condbit) = CPU (h_cond);
277 OPRND (dr) = CPU (h_gr[f_r1]);
278 OPRND (sr) = CPU (h_gr[f_r2]);
279#undef OPRND
280 }
281 BREAK (read);
282
b8641a4d 283 CASE (read, READ_FMT_8_BC8) : /* e.g. bc $disp8 */
8e420152 284 {
b8641a4d
DE
285#define OPRND(f) par_exec->operands.fmt_8_bc8.f
286 EXTRACT_FMT_8_BC8_VARS /* f-op1 f-r1 f-disp8 */
287 EXTRACT_FMT_8_BC8_CODE
8e420152
DE
288
289 /* Fetch the input operands for the semantic handler. */
290 OPRND (condbit) = CPU (h_cond);
b8641a4d 291 RECORD_IADDR (OPRND (disp8), (pc & -4L) + f_disp8);
8e420152
DE
292#undef OPRND
293 }
294 BREAK (read);
295
b8641a4d 296 CASE (read, READ_FMT_9_BC24) : /* e.g. bc $disp24 */
8e420152 297 {
b8641a4d
DE
298#define OPRND(f) par_exec->operands.fmt_9_bc24.f
299 EXTRACT_FMT_9_BC24_VARS /* f-op1 f-r1 f-disp24 */
300 EXTRACT_FMT_9_BC24_CODE
8e420152
DE
301
302 /* Fetch the input operands for the semantic handler. */
303 OPRND (condbit) = CPU (h_cond);
b8641a4d 304 OPRND (disp24) = pc + f_disp24;
8e420152
DE
305#undef OPRND
306 }
307 BREAK (read);
308
b8641a4d 309 CASE (read, READ_FMT_10_BEQ) : /* e.g. beq $src1,$src2,$disp16 */
8e420152 310 {
b8641a4d
DE
311#define OPRND(f) par_exec->operands.fmt_10_beq.f
312 EXTRACT_FMT_10_BEQ_VARS /* f-op1 f-r1 f-op2 f-r2 f-disp16 */
313 EXTRACT_FMT_10_BEQ_CODE
8e420152
DE
314
315 /* Fetch the input operands for the semantic handler. */
b8641a4d 316 OPRND (disp16) = pc + f_disp16;
8e420152
DE
317 OPRND (src1) = CPU (h_gr[f_r1]);
318 OPRND (src2) = CPU (h_gr[f_r2]);
319#undef OPRND
320 }
321 BREAK (read);
322
b8641a4d 323 CASE (read, READ_FMT_11_BEQZ) : /* e.g. beqz $src2,$disp16 */
8e420152 324 {
b8641a4d
DE
325#define OPRND(f) par_exec->operands.fmt_11_beqz.f
326 EXTRACT_FMT_11_BEQZ_VARS /* f-op1 f-r1 f-op2 f-r2 f-disp16 */
327 EXTRACT_FMT_11_BEQZ_CODE
8e420152
DE
328
329 /* Fetch the input operands for the semantic handler. */
b8641a4d 330 OPRND (disp16) = pc + f_disp16;
8e420152
DE
331 OPRND (src2) = CPU (h_gr[f_r2]);
332#undef OPRND
333 }
334 BREAK (read);
335
b8641a4d 336 CASE (read, READ_FMT_12_BL8) : /* e.g. bl $disp8 */
8e420152 337 {
b8641a4d
DE
338#define OPRND(f) par_exec->operands.fmt_12_bl8.f
339 EXTRACT_FMT_12_BL8_VARS /* f-op1 f-r1 f-disp8 */
340 EXTRACT_FMT_12_BL8_CODE
8e420152
DE
341
342 /* Fetch the input operands for the semantic handler. */
b8641a4d 343 RECORD_IADDR (OPRND (disp8), (pc & -4L) + f_disp8);
8e420152
DE
344 OPRND (pc) = CPU (h_pc);
345#undef OPRND
346 }
347 BREAK (read);
348
b8641a4d 349 CASE (read, READ_FMT_13_BL24) : /* e.g. bl $disp24 */
8e420152 350 {
b8641a4d
DE
351#define OPRND(f) par_exec->operands.fmt_13_bl24.f
352 EXTRACT_FMT_13_BL24_VARS /* f-op1 f-r1 f-disp24 */
353 EXTRACT_FMT_13_BL24_CODE
8e420152
DE
354
355 /* Fetch the input operands for the semantic handler. */
b8641a4d 356 OPRND (disp24) = pc + f_disp24;
8e420152
DE
357 OPRND (pc) = CPU (h_pc);
358#undef OPRND
359 }
360 BREAK (read);
361
b8641a4d 362 CASE (read, READ_FMT_14_BCL8) : /* e.g. bcl $disp8 */
8e420152 363 {
b8641a4d
DE
364#define OPRND(f) par_exec->operands.fmt_14_bcl8.f
365 EXTRACT_FMT_14_BCL8_VARS /* f-op1 f-r1 f-disp8 */
366 EXTRACT_FMT_14_BCL8_CODE
8e420152
DE
367
368 /* Fetch the input operands for the semantic handler. */
369 OPRND (condbit) = CPU (h_cond);
b8641a4d 370 RECORD_IADDR (OPRND (disp8), (pc & -4L) + f_disp8);
8e420152
DE
371 OPRND (pc) = CPU (h_pc);
372#undef OPRND
373 }
374 BREAK (read);
375
b8641a4d 376 CASE (read, READ_FMT_15_BCL24) : /* e.g. bcl $disp24 */
8e420152 377 {
b8641a4d
DE
378#define OPRND(f) par_exec->operands.fmt_15_bcl24.f
379 EXTRACT_FMT_15_BCL24_VARS /* f-op1 f-r1 f-disp24 */
380 EXTRACT_FMT_15_BCL24_CODE
8e420152
DE
381
382 /* Fetch the input operands for the semantic handler. */
383 OPRND (condbit) = CPU (h_cond);
b8641a4d 384 OPRND (disp24) = pc + f_disp24;
8e420152
DE
385 OPRND (pc) = CPU (h_pc);
386#undef OPRND
387 }
388 BREAK (read);
389
b8641a4d 390 CASE (read, READ_FMT_16_BRA8) : /* e.g. bra $disp8 */
8e420152 391 {
b8641a4d
DE
392#define OPRND(f) par_exec->operands.fmt_16_bra8.f
393 EXTRACT_FMT_16_BRA8_VARS /* f-op1 f-r1 f-disp8 */
394 EXTRACT_FMT_16_BRA8_CODE
8e420152
DE
395
396 /* Fetch the input operands for the semantic handler. */
b8641a4d 397 RECORD_IADDR (OPRND (disp8), (pc & -4L) + f_disp8);
8e420152
DE
398#undef OPRND
399 }
400 BREAK (read);
401
b8641a4d 402 CASE (read, READ_FMT_17_BRA24) : /* e.g. bra $disp24 */
8e420152 403 {
b8641a4d
DE
404#define OPRND(f) par_exec->operands.fmt_17_bra24.f
405 EXTRACT_FMT_17_BRA24_VARS /* f-op1 f-r1 f-disp24 */
406 EXTRACT_FMT_17_BRA24_CODE
8e420152
DE
407
408 /* Fetch the input operands for the semantic handler. */
b8641a4d 409 OPRND (disp24) = pc + f_disp24;
8e420152
DE
410#undef OPRND
411 }
412 BREAK (read);
413
b8641a4d 414 CASE (read, READ_FMT_18_CMP) : /* e.g. cmp $src1,$src2 */
8e420152 415 {
b8641a4d
DE
416#define OPRND(f) par_exec->operands.fmt_18_cmp.f
417 EXTRACT_FMT_18_CMP_VARS /* f-op1 f-r1 f-op2 f-r2 */
418 EXTRACT_FMT_18_CMP_CODE
8e420152
DE
419
420 /* Fetch the input operands for the semantic handler. */
421 OPRND (src1) = CPU (h_gr[f_r1]);
422 OPRND (src2) = CPU (h_gr[f_r2]);
423#undef OPRND
424 }
425 BREAK (read);
426
b8641a4d 427 CASE (read, READ_FMT_19_CMPI) : /* e.g. cmpi $src2,#$simm16 */
8e420152 428 {
b8641a4d
DE
429#define OPRND(f) par_exec->operands.fmt_19_cmpi.f
430 EXTRACT_FMT_19_CMPI_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
431 EXTRACT_FMT_19_CMPI_CODE
8e420152
DE
432
433 /* Fetch the input operands for the semantic handler. */
434 OPRND (simm16) = f_simm16;
435 OPRND (src2) = CPU (h_gr[f_r2]);
436#undef OPRND
437 }
438 BREAK (read);
439
b8641a4d 440 CASE (read, READ_FMT_20_CMPUI) : /* e.g. cmpui $src2,#$uimm16 */
8e420152 441 {
b8641a4d
DE
442#define OPRND(f) par_exec->operands.fmt_20_cmpui.f
443 EXTRACT_FMT_20_CMPUI_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
444 EXTRACT_FMT_20_CMPUI_CODE
8e420152
DE
445
446 /* Fetch the input operands for the semantic handler. */
447 OPRND (src2) = CPU (h_gr[f_r2]);
448 OPRND (uimm16) = f_uimm16;
449#undef OPRND
450 }
451 BREAK (read);
452
b8641a4d 453 CASE (read, READ_FMT_21_CMPZ) : /* e.g. cmpz $src2 */
8e420152 454 {
b8641a4d
DE
455#define OPRND(f) par_exec->operands.fmt_21_cmpz.f
456 EXTRACT_FMT_21_CMPZ_VARS /* f-op1 f-r1 f-op2 f-r2 */
457 EXTRACT_FMT_21_CMPZ_CODE
8e420152
DE
458
459 /* Fetch the input operands for the semantic handler. */
460 OPRND (src2) = CPU (h_gr[f_r2]);
461#undef OPRND
462 }
463 BREAK (read);
464
b8641a4d 465 CASE (read, READ_FMT_22_DIV) : /* e.g. div $dr,$sr */
8e420152 466 {
b8641a4d
DE
467#define OPRND(f) par_exec->operands.fmt_22_div.f
468 EXTRACT_FMT_22_DIV_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
469 EXTRACT_FMT_22_DIV_CODE
8e420152
DE
470
471 /* Fetch the input operands for the semantic handler. */
472 OPRND (dr) = CPU (h_gr[f_r1]);
473 OPRND (sr) = CPU (h_gr[f_r2]);
474#undef OPRND
475 }
476 BREAK (read);
477
b8641a4d 478 CASE (read, READ_FMT_23_JC) : /* e.g. jc $sr */
8e420152 479 {
b8641a4d
DE
480#define OPRND(f) par_exec->operands.fmt_23_jc.f
481 EXTRACT_FMT_23_JC_VARS /* f-op1 f-r1 f-op2 f-r2 */
482 EXTRACT_FMT_23_JC_CODE
8e420152
DE
483
484 /* Fetch the input operands for the semantic handler. */
485 OPRND (condbit) = CPU (h_cond);
486 OPRND (sr) = CPU (h_gr[f_r2]);
487#undef OPRND
488 }
489 BREAK (read);
490
b8641a4d 491 CASE (read, READ_FMT_24_JL) : /* e.g. jl $sr */
8e420152 492 {
b8641a4d
DE
493#define OPRND(f) par_exec->operands.fmt_24_jl.f
494 EXTRACT_FMT_24_JL_VARS /* f-op1 f-r1 f-op2 f-r2 */
495 EXTRACT_FMT_24_JL_CODE
8e420152
DE
496
497 /* Fetch the input operands for the semantic handler. */
498 OPRND (pc) = CPU (h_pc);
499 OPRND (sr) = CPU (h_gr[f_r2]);
500#undef OPRND
501 }
502 BREAK (read);
503
b8641a4d 504 CASE (read, READ_FMT_25_JMP) : /* e.g. jmp $sr */
8e420152 505 {
b8641a4d
DE
506#define OPRND(f) par_exec->operands.fmt_25_jmp.f
507 EXTRACT_FMT_25_JMP_VARS /* f-op1 f-r1 f-op2 f-r2 */
508 EXTRACT_FMT_25_JMP_CODE
8e420152
DE
509
510 /* Fetch the input operands for the semantic handler. */
511 OPRND (sr) = CPU (h_gr[f_r2]);
512#undef OPRND
513 }
514 BREAK (read);
515
b8641a4d 516 CASE (read, READ_FMT_26_LD) : /* e.g. ld $dr,@$sr */
8e420152 517 {
b8641a4d
DE
518#define OPRND(f) par_exec->operands.fmt_26_ld.f
519 EXTRACT_FMT_26_LD_VARS /* f-op1 f-r1 f-op2 f-r2 */
520 EXTRACT_FMT_26_LD_CODE
8e420152
DE
521
522 /* Fetch the input operands for the semantic handler. */
b8a9943d 523 OPRND (h_memory_sr) = GETMEMSI (current_cpu, CPU (h_gr[f_r2]));
8e420152
DE
524 OPRND (sr) = CPU (h_gr[f_r2]);
525#undef OPRND
526 }
527 BREAK (read);
528
b8641a4d 529 CASE (read, READ_FMT_27_LD_D) : /* e.g. ld $dr,@($slo16,$sr) */
8e420152 530 {
b8641a4d
DE
531#define OPRND(f) par_exec->operands.fmt_27_ld_d.f
532 EXTRACT_FMT_27_LD_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
533 EXTRACT_FMT_27_LD_D_CODE
8e420152
DE
534
535 /* Fetch the input operands for the semantic handler. */
b8a9943d 536 OPRND (h_memory_add_WI_sr_slo16) = GETMEMSI (current_cpu, ADDSI (CPU (h_gr[f_r2]), f_simm16));
8e420152
DE
537 OPRND (slo16) = f_simm16;
538 OPRND (sr) = CPU (h_gr[f_r2]);
539#undef OPRND
540 }
541 BREAK (read);
542
b8641a4d 543 CASE (read, READ_FMT_28_LDB) : /* e.g. ldb $dr,@$sr */
8e420152 544 {
b8641a4d
DE
545#define OPRND(f) par_exec->operands.fmt_28_ldb.f
546 EXTRACT_FMT_28_LDB_VARS /* f-op1 f-r1 f-op2 f-r2 */
547 EXTRACT_FMT_28_LDB_CODE
8e420152
DE
548
549 /* Fetch the input operands for the semantic handler. */
b8a9943d 550 OPRND (h_memory_sr) = GETMEMQI (current_cpu, CPU (h_gr[f_r2]));
8e420152
DE
551 OPRND (sr) = CPU (h_gr[f_r2]);
552#undef OPRND
553 }
554 BREAK (read);
555
b8641a4d 556 CASE (read, READ_FMT_29_LDB_D) : /* e.g. ldb $dr,@($slo16,$sr) */
8e420152 557 {
b8641a4d
DE
558#define OPRND(f) par_exec->operands.fmt_29_ldb_d.f
559 EXTRACT_FMT_29_LDB_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
560 EXTRACT_FMT_29_LDB_D_CODE
8e420152
DE
561
562 /* Fetch the input operands for the semantic handler. */
b8a9943d 563 OPRND (h_memory_add_WI_sr_slo16) = GETMEMQI (current_cpu, ADDSI (CPU (h_gr[f_r2]), f_simm16));
8e420152
DE
564 OPRND (slo16) = f_simm16;
565 OPRND (sr) = CPU (h_gr[f_r2]);
566#undef OPRND
567 }
568 BREAK (read);
569
b8641a4d 570 CASE (read, READ_FMT_30_LDH) : /* e.g. ldh $dr,@$sr */
8e420152 571 {
b8641a4d
DE
572#define OPRND(f) par_exec->operands.fmt_30_ldh.f
573 EXTRACT_FMT_30_LDH_VARS /* f-op1 f-r1 f-op2 f-r2 */
574 EXTRACT_FMT_30_LDH_CODE
8e420152
DE
575
576 /* Fetch the input operands for the semantic handler. */
b8a9943d 577 OPRND (h_memory_sr) = GETMEMHI (current_cpu, CPU (h_gr[f_r2]));
8e420152
DE
578 OPRND (sr) = CPU (h_gr[f_r2]);
579#undef OPRND
580 }
581 BREAK (read);
582
b8641a4d 583 CASE (read, READ_FMT_31_LDH_D) : /* e.g. ldh $dr,@($slo16,$sr) */
8e420152 584 {
b8641a4d
DE
585#define OPRND(f) par_exec->operands.fmt_31_ldh_d.f
586 EXTRACT_FMT_31_LDH_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
587 EXTRACT_FMT_31_LDH_D_CODE
8e420152
DE
588
589 /* Fetch the input operands for the semantic handler. */
b8a9943d 590 OPRND (h_memory_add_WI_sr_slo16) = GETMEMHI (current_cpu, ADDSI (CPU (h_gr[f_r2]), f_simm16));
8e420152
DE
591 OPRND (slo16) = f_simm16;
592 OPRND (sr) = CPU (h_gr[f_r2]);
593#undef OPRND
594 }
595 BREAK (read);
596
b8641a4d 597 CASE (read, READ_FMT_32_LD_PLUS) : /* e.g. ld $dr,@$sr+ */
8e420152 598 {
b8641a4d
DE
599#define OPRND(f) par_exec->operands.fmt_32_ld_plus.f
600 EXTRACT_FMT_32_LD_PLUS_VARS /* f-op1 f-r1 f-op2 f-r2 */
601 EXTRACT_FMT_32_LD_PLUS_CODE
602
603 /* Fetch the input operands for the semantic handler. */
604 OPRND (h_memory_sr) = GETMEMSI (current_cpu, CPU (h_gr[f_r2]));
605 OPRND (sr) = CPU (h_gr[f_r2]);
606#undef OPRND
607 }
608 BREAK (read);
609
610 CASE (read, READ_FMT_33_LD24) : /* e.g. ld24 $dr,#$uimm24 */
611 {
612#define OPRND(f) par_exec->operands.fmt_33_ld24.f
613 EXTRACT_FMT_33_LD24_VARS /* f-op1 f-r1 f-uimm24 */
614 EXTRACT_FMT_33_LD24_CODE
8e420152
DE
615
616 /* Fetch the input operands for the semantic handler. */
617 OPRND (uimm24) = f_uimm24;
618#undef OPRND
619 }
620 BREAK (read);
621
b8641a4d 622 CASE (read, READ_FMT_34_LDI8) : /* e.g. ldi $dr,#$simm8 */
8e420152 623 {
b8641a4d
DE
624#define OPRND(f) par_exec->operands.fmt_34_ldi8.f
625 EXTRACT_FMT_34_LDI8_VARS /* f-op1 f-r1 f-simm8 */
626 EXTRACT_FMT_34_LDI8_CODE
8e420152
DE
627
628 /* Fetch the input operands for the semantic handler. */
629 OPRND (simm8) = f_simm8;
630#undef OPRND
631 }
632 BREAK (read);
633
b8641a4d 634 CASE (read, READ_FMT_35_LDI16) : /* e.g. ldi $dr,$slo16 */
8e420152 635 {
b8641a4d
DE
636#define OPRND(f) par_exec->operands.fmt_35_ldi16.f
637 EXTRACT_FMT_35_LDI16_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
638 EXTRACT_FMT_35_LDI16_CODE
8e420152
DE
639
640 /* Fetch the input operands for the semantic handler. */
641 OPRND (slo16) = f_simm16;
642#undef OPRND
643 }
644 BREAK (read);
645
b8641a4d
DE
646 CASE (read, READ_FMT_36_LOCK) : /* e.g. lock $dr,@$sr */
647 {
648#define OPRND(f) par_exec->operands.fmt_36_lock.f
649 EXTRACT_FMT_36_LOCK_VARS /* f-op1 f-r1 f-op2 f-r2 */
650 EXTRACT_FMT_36_LOCK_CODE
651
652 /* Fetch the input operands for the semantic handler. */
653 OPRND (dr) = CPU (h_gr[f_r1]);
654 OPRND (sr) = CPU (h_gr[f_r2]);
655#undef OPRND
656 }
657 BREAK (read);
658
659 CASE (read, READ_FMT_37_MACHI_A) : /* e.g. machi $src1,$src2,$acc */
8e420152 660 {
b8641a4d
DE
661#define OPRND(f) par_exec->operands.fmt_37_machi_a.f
662 EXTRACT_FMT_37_MACHI_A_VARS /* f-op1 f-r1 f-acc f-op23 f-r2 */
663 EXTRACT_FMT_37_MACHI_A_CODE
8e420152
DE
664
665 /* Fetch the input operands for the semantic handler. */
666 OPRND (acc) = m32rx_h_accums_get (current_cpu, f_acc);
667 OPRND (src1) = CPU (h_gr[f_r1]);
668 OPRND (src2) = CPU (h_gr[f_r2]);
669#undef OPRND
670 }
671 BREAK (read);
672
b8641a4d 673 CASE (read, READ_FMT_38_MULHI_A) : /* e.g. mulhi $src1,$src2,$acc */
8e420152 674 {
b8641a4d
DE
675#define OPRND(f) par_exec->operands.fmt_38_mulhi_a.f
676 EXTRACT_FMT_38_MULHI_A_VARS /* f-op1 f-r1 f-acc f-op23 f-r2 */
677 EXTRACT_FMT_38_MULHI_A_CODE
8e420152
DE
678
679 /* Fetch the input operands for the semantic handler. */
680 OPRND (src1) = CPU (h_gr[f_r1]);
681 OPRND (src2) = CPU (h_gr[f_r2]);
682#undef OPRND
683 }
684 BREAK (read);
685
b8641a4d 686 CASE (read, READ_FMT_39_MV) : /* e.g. mv $dr,$sr */
8e420152 687 {
b8641a4d
DE
688#define OPRND(f) par_exec->operands.fmt_39_mv.f
689 EXTRACT_FMT_39_MV_VARS /* f-op1 f-r1 f-op2 f-r2 */
690 EXTRACT_FMT_39_MV_CODE
8e420152
DE
691
692 /* Fetch the input operands for the semantic handler. */
693 OPRND (sr) = CPU (h_gr[f_r2]);
694#undef OPRND
695 }
696 BREAK (read);
697
b8641a4d 698 CASE (read, READ_FMT_40_MVFACHI_A) : /* e.g. mvfachi $dr,$accs */
8e420152 699 {
b8641a4d
DE
700#define OPRND(f) par_exec->operands.fmt_40_mvfachi_a.f
701 EXTRACT_FMT_40_MVFACHI_A_VARS /* f-op1 f-r1 f-op2 f-accs f-op3 */
702 EXTRACT_FMT_40_MVFACHI_A_CODE
8e420152
DE
703
704 /* Fetch the input operands for the semantic handler. */
705 OPRND (accs) = m32rx_h_accums_get (current_cpu, f_accs);
706#undef OPRND
707 }
708 BREAK (read);
709
b8641a4d 710 CASE (read, READ_FMT_41_MVFC) : /* e.g. mvfc $dr,$scr */
8e420152 711 {
b8641a4d
DE
712#define OPRND(f) par_exec->operands.fmt_41_mvfc.f
713 EXTRACT_FMT_41_MVFC_VARS /* f-op1 f-r1 f-op2 f-r2 */
714 EXTRACT_FMT_41_MVFC_CODE
8e420152
DE
715
716 /* Fetch the input operands for the semantic handler. */
717 OPRND (scr) = m32rx_h_cr_get (current_cpu, f_r2);
718#undef OPRND
719 }
720 BREAK (read);
721
b8641a4d 722 CASE (read, READ_FMT_42_MVTACHI_A) : /* e.g. mvtachi $src1,$accs */
8e420152 723 {
b8641a4d
DE
724#define OPRND(f) par_exec->operands.fmt_42_mvtachi_a.f
725 EXTRACT_FMT_42_MVTACHI_A_VARS /* f-op1 f-r1 f-op2 f-accs f-op3 */
726 EXTRACT_FMT_42_MVTACHI_A_CODE
8e420152
DE
727
728 /* Fetch the input operands for the semantic handler. */
729 OPRND (accs) = m32rx_h_accums_get (current_cpu, f_accs);
730 OPRND (src1) = CPU (h_gr[f_r1]);
731#undef OPRND
732 }
733 BREAK (read);
734
b8641a4d 735 CASE (read, READ_FMT_43_MVTC) : /* e.g. mvtc $sr,$dcr */
8e420152 736 {
b8641a4d
DE
737#define OPRND(f) par_exec->operands.fmt_43_mvtc.f
738 EXTRACT_FMT_43_MVTC_VARS /* f-op1 f-r1 f-op2 f-r2 */
739 EXTRACT_FMT_43_MVTC_CODE
8e420152
DE
740
741 /* Fetch the input operands for the semantic handler. */
742 OPRND (sr) = CPU (h_gr[f_r2]);
743#undef OPRND
744 }
745 BREAK (read);
746
b8641a4d 747 CASE (read, READ_FMT_44_NOP) : /* e.g. nop */
8e420152 748 {
b8641a4d
DE
749#define OPRND(f) par_exec->operands.fmt_44_nop.f
750 EXTRACT_FMT_44_NOP_VARS /* f-op1 f-r1 f-op2 f-r2 */
751 EXTRACT_FMT_44_NOP_CODE
8e420152
DE
752
753 /* Fetch the input operands for the semantic handler. */
754#undef OPRND
755 }
756 BREAK (read);
757
b8641a4d 758 CASE (read, READ_FMT_45_RAC_D) : /* e.g. rac $accd */
e0bd6e18 759 {
b8641a4d
DE
760#define OPRND(f) par_exec->operands.fmt_45_rac_d.f
761 EXTRACT_FMT_45_RAC_D_VARS /* f-op1 f-accd f-bits67 f-op2 f-accs f-bit14 f-imm1 */
762 EXTRACT_FMT_45_RAC_D_CODE
e0bd6e18
DE
763
764 /* Fetch the input operands for the semantic handler. */
765 OPRND (accum) = CPU (h_accum);
766#undef OPRND
767 }
768 BREAK (read);
769
b8641a4d 770 CASE (read, READ_FMT_46_RAC_DS) : /* e.g. rac $accd,$accs */
e0bd6e18 771 {
b8641a4d
DE
772#define OPRND(f) par_exec->operands.fmt_46_rac_ds.f
773 EXTRACT_FMT_46_RAC_DS_VARS /* f-op1 f-accd f-bits67 f-op2 f-accs f-bit14 f-imm1 */
774 EXTRACT_FMT_46_RAC_DS_CODE
e0bd6e18
DE
775
776 /* Fetch the input operands for the semantic handler. */
777 OPRND (accs) = m32rx_h_accums_get (current_cpu, f_accs);
778#undef OPRND
779 }
780 BREAK (read);
781
b8641a4d 782 CASE (read, READ_FMT_47_RAC_DSI) : /* e.g. rac $accd,$accs,#$imm1 */
8e420152 783 {
b8641a4d
DE
784#define OPRND(f) par_exec->operands.fmt_47_rac_dsi.f
785 EXTRACT_FMT_47_RAC_DSI_VARS /* f-op1 f-accd f-bits67 f-op2 f-accs f-bit14 f-imm1 */
786 EXTRACT_FMT_47_RAC_DSI_CODE
8e420152
DE
787
788 /* Fetch the input operands for the semantic handler. */
b8a9943d 789 OPRND (accs) = m32rx_h_accums_get (current_cpu, f_accs);
e0bd6e18 790 OPRND (imm1) = f_imm1;
8e420152
DE
791#undef OPRND
792 }
793 BREAK (read);
794
b8641a4d 795 CASE (read, READ_FMT_48_RTE) : /* e.g. rte */
8e420152 796 {
b8641a4d
DE
797#define OPRND(f) par_exec->operands.fmt_48_rte.f
798 EXTRACT_FMT_48_RTE_VARS /* f-op1 f-r1 f-op2 f-r2 */
799 EXTRACT_FMT_48_RTE_CODE
8e420152
DE
800
801 /* Fetch the input operands for the semantic handler. */
b8a9943d
DE
802 OPRND (h_bcond_0) = CPU (h_bcond);
803 OPRND (h_bie_0) = CPU (h_bie);
804 OPRND (h_bpc_0) = CPU (h_bpc);
805 OPRND (h_bsm_0) = CPU (h_bsm);
8e420152
DE
806#undef OPRND
807 }
808 BREAK (read);
809
b8641a4d 810 CASE (read, READ_FMT_49_SETH) : /* e.g. seth $dr,#$hi16 */
8e420152 811 {
b8641a4d
DE
812#define OPRND(f) par_exec->operands.fmt_49_seth.f
813 EXTRACT_FMT_49_SETH_VARS /* f-op1 f-r1 f-op2 f-r2 f-hi16 */
814 EXTRACT_FMT_49_SETH_CODE
8e420152
DE
815
816 /* Fetch the input operands for the semantic handler. */
817 OPRND (hi16) = f_hi16;
818#undef OPRND
819 }
820 BREAK (read);
821
b8641a4d 822 CASE (read, READ_FMT_50_SLL3) : /* e.g. sll3 $dr,$sr,#$simm16 */
8e420152 823 {
b8641a4d
DE
824#define OPRND(f) par_exec->operands.fmt_50_sll3.f
825 EXTRACT_FMT_50_SLL3_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
826 EXTRACT_FMT_50_SLL3_CODE
827
828 /* Fetch the input operands for the semantic handler. */
829 OPRND (simm16) = f_simm16;
830 OPRND (sr) = CPU (h_gr[f_r2]);
831#undef OPRND
832 }
833 BREAK (read);
834
835 CASE (read, READ_FMT_51_SLLI) : /* e.g. slli $dr,#$uimm5 */
836 {
837#define OPRND(f) par_exec->operands.fmt_51_slli.f
838 EXTRACT_FMT_51_SLLI_VARS /* f-op1 f-r1 f-shift-op2 f-uimm5 */
839 EXTRACT_FMT_51_SLLI_CODE
8e420152
DE
840
841 /* Fetch the input operands for the semantic handler. */
842 OPRND (dr) = CPU (h_gr[f_r1]);
843 OPRND (uimm5) = f_uimm5;
844#undef OPRND
845 }
846 BREAK (read);
847
b8641a4d 848 CASE (read, READ_FMT_52_ST) : /* e.g. st $src1,@$src2 */
8e420152 849 {
b8641a4d
DE
850#define OPRND(f) par_exec->operands.fmt_52_st.f
851 EXTRACT_FMT_52_ST_VARS /* f-op1 f-r1 f-op2 f-r2 */
852 EXTRACT_FMT_52_ST_CODE
853
854 /* Fetch the input operands for the semantic handler. */
855 OPRND (src1) = CPU (h_gr[f_r1]);
856 OPRND (src2) = CPU (h_gr[f_r2]);
857#undef OPRND
858 }
859 BREAK (read);
860
861 CASE (read, READ_FMT_53_ST_D) : /* e.g. st $src1,@($slo16,$src2) */
862 {
863#define OPRND(f) par_exec->operands.fmt_53_st_d.f
864 EXTRACT_FMT_53_ST_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
865 EXTRACT_FMT_53_ST_D_CODE
8e420152
DE
866
867 /* Fetch the input operands for the semantic handler. */
868 OPRND (slo16) = f_simm16;
869 OPRND (src1) = CPU (h_gr[f_r1]);
870 OPRND (src2) = CPU (h_gr[f_r2]);
871#undef OPRND
872 }
873 BREAK (read);
874
b8641a4d
DE
875 CASE (read, READ_FMT_54_STB) : /* e.g. stb $src1,@$src2 */
876 {
877#define OPRND(f) par_exec->operands.fmt_54_stb.f
878 EXTRACT_FMT_54_STB_VARS /* f-op1 f-r1 f-op2 f-r2 */
879 EXTRACT_FMT_54_STB_CODE
880
881 /* Fetch the input operands for the semantic handler. */
882 OPRND (src1) = CPU (h_gr[f_r1]);
883 OPRND (src2) = CPU (h_gr[f_r2]);
884#undef OPRND
885 }
886 BREAK (read);
887
888 CASE (read, READ_FMT_55_STB_D) : /* e.g. stb $src1,@($slo16,$src2) */
8e420152 889 {
b8641a4d
DE
890#define OPRND(f) par_exec->operands.fmt_55_stb_d.f
891 EXTRACT_FMT_55_STB_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
892 EXTRACT_FMT_55_STB_D_CODE
893
894 /* Fetch the input operands for the semantic handler. */
895 OPRND (slo16) = f_simm16;
896 OPRND (src1) = CPU (h_gr[f_r1]);
897 OPRND (src2) = CPU (h_gr[f_r2]);
898#undef OPRND
899 }
900 BREAK (read);
901
902 CASE (read, READ_FMT_56_STH) : /* e.g. sth $src1,@$src2 */
903 {
904#define OPRND(f) par_exec->operands.fmt_56_sth.f
905 EXTRACT_FMT_56_STH_VARS /* f-op1 f-r1 f-op2 f-r2 */
906 EXTRACT_FMT_56_STH_CODE
907
908 /* Fetch the input operands for the semantic handler. */
909 OPRND (src1) = CPU (h_gr[f_r1]);
910 OPRND (src2) = CPU (h_gr[f_r2]);
911#undef OPRND
912 }
913 BREAK (read);
914
915 CASE (read, READ_FMT_57_STH_D) : /* e.g. sth $src1,@($slo16,$src2) */
916 {
917#define OPRND(f) par_exec->operands.fmt_57_sth_d.f
918 EXTRACT_FMT_57_STH_D_VARS /* f-op1 f-r1 f-op2 f-r2 f-simm16 */
919 EXTRACT_FMT_57_STH_D_CODE
920
921 /* Fetch the input operands for the semantic handler. */
922 OPRND (slo16) = f_simm16;
923 OPRND (src1) = CPU (h_gr[f_r1]);
924 OPRND (src2) = CPU (h_gr[f_r2]);
925#undef OPRND
926 }
927 BREAK (read);
928
929 CASE (read, READ_FMT_58_ST_PLUS) : /* e.g. st $src1,@+$src2 */
930 {
931#define OPRND(f) par_exec->operands.fmt_58_st_plus.f
932 EXTRACT_FMT_58_ST_PLUS_VARS /* f-op1 f-r1 f-op2 f-r2 */
933 EXTRACT_FMT_58_ST_PLUS_CODE
934
935 /* Fetch the input operands for the semantic handler. */
936 OPRND (src1) = CPU (h_gr[f_r1]);
937 OPRND (src2) = CPU (h_gr[f_r2]);
938#undef OPRND
939 }
940 BREAK (read);
941
942 CASE (read, READ_FMT_59_TRAP) : /* e.g. trap #$uimm4 */
943 {
944#define OPRND(f) par_exec->operands.fmt_59_trap.f
945 EXTRACT_FMT_59_TRAP_VARS /* f-op1 f-r1 f-op2 f-uimm4 */
946 EXTRACT_FMT_59_TRAP_CODE
8e420152
DE
947
948 /* Fetch the input operands for the semantic handler. */
949 OPRND (uimm4) = f_uimm4;
950#undef OPRND
951 }
952 BREAK (read);
953
b8641a4d 954 CASE (read, READ_FMT_60_UNLOCK) : /* e.g. unlock $src1,@$src2 */
8e420152 955 {
b8641a4d
DE
956#define OPRND(f) par_exec->operands.fmt_60_unlock.f
957 EXTRACT_FMT_60_UNLOCK_VARS /* f-op1 f-r1 f-op2 f-r2 */
958 EXTRACT_FMT_60_UNLOCK_CODE
8e420152
DE
959
960 /* Fetch the input operands for the semantic handler. */
b8641a4d 961 OPRND (src1) = CPU (h_gr[f_r1]);
b8a9943d 962 OPRND (src2) = CPU (h_gr[f_r2]);
8e420152
DE
963#undef OPRND
964 }
965 BREAK (read);
966
b8641a4d
DE
967 CASE (read, READ_FMT_61_SATB) : /* e.g. satb $dr,$sr */
968 {
969#define OPRND(f) par_exec->operands.fmt_61_satb.f
970 EXTRACT_FMT_61_SATB_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
971 EXTRACT_FMT_61_SATB_CODE
972
973 /* Fetch the input operands for the semantic handler. */
974 OPRND (sr) = CPU (h_gr[f_r2]);
975#undef OPRND
976 }
977 BREAK (read);
978
979 CASE (read, READ_FMT_62_SAT) : /* e.g. sat $dr,$sr */
8e420152 980 {
b8641a4d
DE
981#define OPRND(f) par_exec->operands.fmt_62_sat.f
982 EXTRACT_FMT_62_SAT_VARS /* f-op1 f-r1 f-op2 f-r2 f-uimm16 */
983 EXTRACT_FMT_62_SAT_CODE
8e420152
DE
984
985 /* Fetch the input operands for the semantic handler. */
b8a9943d 986 OPRND (condbit) = CPU (h_cond);
b8641a4d 987 OPRND (sr) = CPU (h_gr[f_r2]);
8e420152
DE
988#undef OPRND
989 }
990 BREAK (read);
991
b8641a4d 992 CASE (read, READ_FMT_63_SADD) : /* e.g. sadd */
8e420152 993 {
b8641a4d
DE
994#define OPRND(f) par_exec->operands.fmt_63_sadd.f
995 EXTRACT_FMT_63_SADD_VARS /* f-op1 f-r1 f-op2 f-r2 */
996 EXTRACT_FMT_63_SADD_CODE
8e420152
DE
997
998 /* Fetch the input operands for the semantic handler. */
b8a9943d
DE
999 OPRND (h_accums_0) = m32rx_h_accums_get (current_cpu, 0);
1000 OPRND (h_accums_1) = m32rx_h_accums_get (current_cpu, 1);
8e420152
DE
1001#undef OPRND
1002 }
1003 BREAK (read);
1004
b8641a4d 1005 CASE (read, READ_FMT_64_MACWU1) : /* e.g. macwu1 $src1,$src2 */
8e420152 1006 {
b8641a4d
DE
1007#define OPRND(f) par_exec->operands.fmt_64_macwu1.f
1008 EXTRACT_FMT_64_MACWU1_VARS /* f-op1 f-r1 f-op2 f-r2 */
1009 EXTRACT_FMT_64_MACWU1_CODE
8e420152
DE
1010
1011 /* Fetch the input operands for the semantic handler. */
b8a9943d 1012 OPRND (h_accums_1) = m32rx_h_accums_get (current_cpu, 1);
8e420152
DE
1013 OPRND (src1) = CPU (h_gr[f_r1]);
1014 OPRND (src2) = CPU (h_gr[f_r2]);
1015#undef OPRND
1016 }
1017 BREAK (read);
1018
b8641a4d 1019 CASE (read, READ_FMT_65_MSBLO) : /* e.g. msblo $src1,$src2 */
8e420152 1020 {
b8641a4d
DE
1021#define OPRND(f) par_exec->operands.fmt_65_msblo.f
1022 EXTRACT_FMT_65_MSBLO_VARS /* f-op1 f-r1 f-op2 f-r2 */
1023 EXTRACT_FMT_65_MSBLO_CODE
b8a9943d
DE
1024
1025 /* Fetch the input operands for the semantic handler. */
1026 OPRND (accum) = CPU (h_accum);
1027 OPRND (src1) = CPU (h_gr[f_r1]);
1028 OPRND (src2) = CPU (h_gr[f_r2]);
1029#undef OPRND
1030 }
1031 BREAK (read);
8e420152 1032
b8641a4d
DE
1033 CASE (read, READ_FMT_66_MULWU1) : /* e.g. mulwu1 $src1,$src2 */
1034 {
1035#define OPRND(f) par_exec->operands.fmt_66_mulwu1.f
1036 EXTRACT_FMT_66_MULWU1_VARS /* f-op1 f-r1 f-op2 f-r2 */
1037 EXTRACT_FMT_66_MULWU1_CODE
1038
1039 /* Fetch the input operands for the semantic handler. */
1040 OPRND (src1) = CPU (h_gr[f_r1]);
1041 OPRND (src2) = CPU (h_gr[f_r2]);
1042#undef OPRND
1043 }
1044 BREAK (read);
1045
1046 CASE (read, READ_FMT_67_SC) : /* e.g. sc */
b8a9943d 1047 {
b8641a4d
DE
1048#define OPRND(f) par_exec->operands.fmt_67_sc.f
1049 EXTRACT_FMT_67_SC_VARS /* f-op1 f-r1 f-op2 f-r2 */
1050 EXTRACT_FMT_67_SC_CODE
8e420152
DE
1051
1052 /* Fetch the input operands for the semantic handler. */
1053 OPRND (condbit) = CPU (h_cond);
1054#undef OPRND
1055 }
1056 BREAK (read);
1057
1058 }
1059 ENDSWITCH (read) /* End of read switch. */
1060}
1061
1062#endif /* DEFINE_SWITCH */
This page took 0.104573 seconds and 4 git commands to generate.