Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* CPU family header for fr30bf. |
2 | ||
3 | THIS FILE IS MACHINE GENERATED WITH CGEN. | |
4 | ||
52fa932e | 5 | Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
c906108c SS |
6 | |
7 | This file is part of the GNU Simulators. | |
8 | ||
9 | This program 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 2, or (at your option) | |
12 | any later version. | |
13 | ||
14 | This program is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public 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 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
22 | ||
23 | */ | |
24 | ||
25 | #ifndef CPU_FR30BF_H | |
26 | #define CPU_FR30BF_H | |
27 | ||
28 | /* Maximum number of instructions that are fetched at a time. | |
29 | This is for LIW type instructions sets (e.g. m32r). */ | |
30 | #define MAX_LIW_INSNS 1 | |
31 | ||
32 | /* Maximum number of instructions that can be executed in parallel. */ | |
33 | #define MAX_PARALLEL_INSNS 1 | |
34 | ||
35 | /* CPU state information. */ | |
36 | typedef struct { | |
37 | /* Hardware elements. */ | |
38 | struct { | |
39 | /* program counter */ | |
40 | USI h_pc; | |
41 | #define GET_H_PC() CPU (h_pc) | |
42 | #define SET_H_PC(x) (CPU (h_pc) = (x)) | |
43 | /* general registers */ | |
44 | SI h_gr[16]; | |
45 | #define GET_H_GR(a1) CPU (h_gr)[a1] | |
46 | #define SET_H_GR(a1, x) (CPU (h_gr)[a1] = (x)) | |
47 | /* coprocessor registers */ | |
48 | SI h_cr[16]; | |
49 | #define GET_H_CR(a1) CPU (h_cr)[a1] | |
50 | #define SET_H_CR(a1, x) (CPU (h_cr)[a1] = (x)) | |
51 | /* dedicated registers */ | |
52 | SI h_dr[6]; | |
7a292a7a SS |
53 | #define GET_H_DR(index) fr30bf_h_dr_get_handler (current_cpu, index) |
54 | #define SET_H_DR(index, x) \ | |
55 | do { \ | |
56 | fr30bf_h_dr_set_handler (current_cpu, (index), (x));\ | |
e5c59029 | 57 | ;} while (0) |
7a292a7a | 58 | /* processor status */ |
c906108c | 59 | USI h_ps; |
7a292a7a SS |
60 | #define GET_H_PS() fr30bf_h_ps_get_handler (current_cpu) |
61 | #define SET_H_PS(x) \ | |
62 | do { \ | |
63 | fr30bf_h_ps_set_handler (current_cpu, (x));\ | |
e5c59029 | 64 | ;} while (0) |
7a292a7a | 65 | /* General Register 13 explicitly required */ |
c906108c SS |
66 | SI h_r13; |
67 | #define GET_H_R13() CPU (h_r13) | |
68 | #define SET_H_R13(x) (CPU (h_r13) = (x)) | |
7a292a7a | 69 | /* General Register 14 explicitly required */ |
c906108c SS |
70 | SI h_r14; |
71 | #define GET_H_R14() CPU (h_r14) | |
72 | #define SET_H_R14(x) (CPU (h_r14) = (x)) | |
7a292a7a | 73 | /* General Register 15 explicitly required */ |
c906108c SS |
74 | SI h_r15; |
75 | #define GET_H_R15() CPU (h_r15) | |
76 | #define SET_H_R15(x) (CPU (h_r15) = (x)) | |
77 | /* negative bit */ | |
78 | BI h_nbit; | |
79 | #define GET_H_NBIT() CPU (h_nbit) | |
80 | #define SET_H_NBIT(x) (CPU (h_nbit) = (x)) | |
81 | /* zero bit */ | |
82 | BI h_zbit; | |
83 | #define GET_H_ZBIT() CPU (h_zbit) | |
84 | #define SET_H_ZBIT(x) (CPU (h_zbit) = (x)) | |
85 | /* overflow bit */ | |
86 | BI h_vbit; | |
87 | #define GET_H_VBIT() CPU (h_vbit) | |
88 | #define SET_H_VBIT(x) (CPU (h_vbit) = (x)) | |
89 | /* carry bit */ | |
90 | BI h_cbit; | |
91 | #define GET_H_CBIT() CPU (h_cbit) | |
92 | #define SET_H_CBIT(x) (CPU (h_cbit) = (x)) | |
93 | /* interrupt enable bit */ | |
94 | BI h_ibit; | |
95 | #define GET_H_IBIT() CPU (h_ibit) | |
96 | #define SET_H_IBIT(x) (CPU (h_ibit) = (x)) | |
7a292a7a | 97 | /* stack bit */ |
c906108c | 98 | BI h_sbit; |
7a292a7a SS |
99 | #define GET_H_SBIT() fr30bf_h_sbit_get_handler (current_cpu) |
100 | #define SET_H_SBIT(x) \ | |
101 | do { \ | |
102 | fr30bf_h_sbit_set_handler (current_cpu, (x));\ | |
e5c59029 | 103 | ;} while (0) |
c906108c SS |
104 | /* trace trap bit */ |
105 | BI h_tbit; | |
106 | #define GET_H_TBIT() CPU (h_tbit) | |
107 | #define SET_H_TBIT(x) (CPU (h_tbit) = (x)) | |
108 | /* division 0 bit */ | |
109 | BI h_d0bit; | |
110 | #define GET_H_D0BIT() CPU (h_d0bit) | |
111 | #define SET_H_D0BIT(x) (CPU (h_d0bit) = (x)) | |
112 | /* division 1 bit */ | |
113 | BI h_d1bit; | |
114 | #define GET_H_D1BIT() CPU (h_d1bit) | |
115 | #define SET_H_D1BIT(x) (CPU (h_d1bit) = (x)) | |
7a292a7a | 116 | /* condition code bits */ |
c906108c | 117 | UQI h_ccr; |
7a292a7a SS |
118 | #define GET_H_CCR() fr30bf_h_ccr_get_handler (current_cpu) |
119 | #define SET_H_CCR(x) \ | |
120 | do { \ | |
121 | fr30bf_h_ccr_set_handler (current_cpu, (x));\ | |
e5c59029 | 122 | ;} while (0) |
c906108c SS |
123 | /* system condition bits */ |
124 | UQI h_scr; | |
7a292a7a SS |
125 | #define GET_H_SCR() fr30bf_h_scr_get_handler (current_cpu) |
126 | #define SET_H_SCR(x) \ | |
127 | do { \ | |
128 | fr30bf_h_scr_set_handler (current_cpu, (x));\ | |
e5c59029 | 129 | ;} while (0) |
7a292a7a | 130 | /* interrupt level mask */ |
c906108c | 131 | UQI h_ilm; |
7a292a7a SS |
132 | #define GET_H_ILM() fr30bf_h_ilm_get_handler (current_cpu) |
133 | #define SET_H_ILM(x) \ | |
134 | do { \ | |
135 | fr30bf_h_ilm_set_handler (current_cpu, (x));\ | |
e5c59029 | 136 | ;} while (0) |
c906108c SS |
137 | } hardware; |
138 | #define CPU_CGEN_HW(cpu) (& (cpu)->cpu_data.hardware) | |
139 | } FR30BF_CPU_DATA; | |
140 | ||
141 | /* Cover fns for register access. */ | |
142 | USI fr30bf_h_pc_get (SIM_CPU *); | |
143 | void fr30bf_h_pc_set (SIM_CPU *, USI); | |
144 | SI fr30bf_h_gr_get (SIM_CPU *, UINT); | |
145 | void fr30bf_h_gr_set (SIM_CPU *, UINT, SI); | |
146 | SI fr30bf_h_cr_get (SIM_CPU *, UINT); | |
147 | void fr30bf_h_cr_set (SIM_CPU *, UINT, SI); | |
148 | SI fr30bf_h_dr_get (SIM_CPU *, UINT); | |
149 | void fr30bf_h_dr_set (SIM_CPU *, UINT, SI); | |
150 | USI fr30bf_h_ps_get (SIM_CPU *); | |
151 | void fr30bf_h_ps_set (SIM_CPU *, USI); | |
152 | SI fr30bf_h_r13_get (SIM_CPU *); | |
153 | void fr30bf_h_r13_set (SIM_CPU *, SI); | |
154 | SI fr30bf_h_r14_get (SIM_CPU *); | |
155 | void fr30bf_h_r14_set (SIM_CPU *, SI); | |
156 | SI fr30bf_h_r15_get (SIM_CPU *); | |
157 | void fr30bf_h_r15_set (SIM_CPU *, SI); | |
158 | BI fr30bf_h_nbit_get (SIM_CPU *); | |
159 | void fr30bf_h_nbit_set (SIM_CPU *, BI); | |
160 | BI fr30bf_h_zbit_get (SIM_CPU *); | |
161 | void fr30bf_h_zbit_set (SIM_CPU *, BI); | |
162 | BI fr30bf_h_vbit_get (SIM_CPU *); | |
163 | void fr30bf_h_vbit_set (SIM_CPU *, BI); | |
164 | BI fr30bf_h_cbit_get (SIM_CPU *); | |
165 | void fr30bf_h_cbit_set (SIM_CPU *, BI); | |
166 | BI fr30bf_h_ibit_get (SIM_CPU *); | |
167 | void fr30bf_h_ibit_set (SIM_CPU *, BI); | |
168 | BI fr30bf_h_sbit_get (SIM_CPU *); | |
169 | void fr30bf_h_sbit_set (SIM_CPU *, BI); | |
170 | BI fr30bf_h_tbit_get (SIM_CPU *); | |
171 | void fr30bf_h_tbit_set (SIM_CPU *, BI); | |
172 | BI fr30bf_h_d0bit_get (SIM_CPU *); | |
173 | void fr30bf_h_d0bit_set (SIM_CPU *, BI); | |
174 | BI fr30bf_h_d1bit_get (SIM_CPU *); | |
175 | void fr30bf_h_d1bit_set (SIM_CPU *, BI); | |
176 | UQI fr30bf_h_ccr_get (SIM_CPU *); | |
177 | void fr30bf_h_ccr_set (SIM_CPU *, UQI); | |
178 | UQI fr30bf_h_scr_get (SIM_CPU *); | |
179 | void fr30bf_h_scr_set (SIM_CPU *, UQI); | |
180 | UQI fr30bf_h_ilm_get (SIM_CPU *); | |
181 | void fr30bf_h_ilm_set (SIM_CPU *, UQI); | |
182 | ||
183 | /* These must be hand-written. */ | |
184 | extern CPUREG_FETCH_FN fr30bf_fetch_register; | |
185 | extern CPUREG_STORE_FN fr30bf_store_register; | |
186 | ||
187 | typedef struct { | |
188 | UINT load_regs; | |
189 | UINT load_regs_pending; | |
190 | } MODEL_FR30_1_DATA; | |
191 | ||
96baa820 JM |
192 | /* Instruction argument buffer. */ |
193 | ||
c906108c | 194 | union sem_fields { |
96baa820 JM |
195 | struct { /* no operands */ |
196 | int empty; | |
197 | } fmt_empty; | |
198 | struct { /* */ | |
199 | IADDR i_label9; | |
200 | } sfmt_brad; | |
201 | struct { /* */ | |
202 | UINT f_u8; | |
203 | } sfmt_int; | |
204 | struct { /* */ | |
205 | IADDR i_label12; | |
206 | } sfmt_call; | |
207 | struct { /* */ | |
208 | SI f_s10; | |
209 | unsigned char in_h_gr_15; | |
210 | unsigned char out_h_gr_15; | |
211 | } sfmt_addsp; | |
212 | struct { /* */ | |
213 | USI f_dir10; | |
214 | unsigned char in_h_gr_15; | |
215 | unsigned char out_h_gr_15; | |
216 | } sfmt_dmovr15pi; | |
217 | struct { /* */ | |
218 | UINT f_dir8; | |
219 | unsigned char in_h_gr_13; | |
220 | unsigned char out_h_gr_13; | |
221 | } sfmt_dmovr13pib; | |
222 | struct { /* */ | |
223 | USI f_dir9; | |
224 | unsigned char in_h_gr_13; | |
225 | unsigned char out_h_gr_13; | |
226 | } sfmt_dmovr13pih; | |
227 | struct { /* */ | |
228 | USI f_dir10; | |
229 | unsigned char in_h_gr_13; | |
230 | unsigned char out_h_gr_13; | |
231 | } sfmt_dmovr13pi; | |
e5c59029 DB |
232 | struct { /* */ |
233 | UINT f_Rs2; | |
234 | unsigned char in_h_gr_15; | |
235 | unsigned char out_h_gr_15; | |
236 | } sfmt_ldr15dr; | |
96baa820 JM |
237 | struct { /* */ |
238 | SI* i_Ri; | |
e5c59029 | 239 | UINT f_Ri; |
96baa820 JM |
240 | UINT f_Rs1; |
241 | unsigned char in_Ri; | |
242 | } sfmt_mov2dr; | |
243 | struct { /* */ | |
244 | SI* i_Ri; | |
e5c59029 | 245 | UINT f_Ri; |
96baa820 JM |
246 | UINT f_Rs1; |
247 | unsigned char out_Ri; | |
248 | } sfmt_movdr; | |
96baa820 JM |
249 | struct { /* */ |
250 | SI* i_Ri; | |
e5c59029 | 251 | UINT f_Ri; |
96baa820 JM |
252 | UINT f_i32; |
253 | unsigned char out_Ri; | |
254 | } sfmt_ldi32; | |
255 | struct { /* */ | |
256 | SI* i_Ri; | |
e5c59029 | 257 | UINT f_Ri; |
96baa820 JM |
258 | UINT f_i20; |
259 | unsigned char out_Ri; | |
260 | } sfmt_ldi20; | |
261 | struct { /* */ | |
262 | SI* i_Ri; | |
e5c59029 | 263 | UINT f_Ri; |
96baa820 JM |
264 | UINT f_i8; |
265 | unsigned char out_Ri; | |
266 | } sfmt_ldi8; | |
e5c59029 DB |
267 | struct { /* */ |
268 | USI f_u10; | |
269 | unsigned char in_h_gr_14; | |
270 | unsigned char in_h_gr_15; | |
271 | unsigned char out_h_gr_14; | |
272 | unsigned char out_h_gr_15; | |
273 | } sfmt_enter; | |
96baa820 JM |
274 | struct { /* */ |
275 | SI* i_Ri; | |
e5c59029 | 276 | UINT f_Ri; |
96baa820 JM |
277 | unsigned char in_Ri; |
278 | unsigned char in_h_gr_15; | |
279 | unsigned char out_h_gr_15; | |
280 | } sfmt_str15gr; | |
281 | struct { /* */ | |
282 | SI* i_Ri; | |
e5c59029 | 283 | UINT f_Ri; |
96baa820 JM |
284 | USI f_udisp6; |
285 | unsigned char in_Ri; | |
286 | unsigned char in_h_gr_15; | |
287 | } sfmt_str15; | |
288 | struct { /* */ | |
289 | SI* i_Ri; | |
290 | INT f_disp8; | |
e5c59029 | 291 | UINT f_Ri; |
96baa820 JM |
292 | unsigned char in_Ri; |
293 | unsigned char in_h_gr_14; | |
294 | } sfmt_str14b; | |
295 | struct { /* */ | |
296 | SI* i_Ri; | |
297 | SI f_disp9; | |
e5c59029 | 298 | UINT f_Ri; |
96baa820 JM |
299 | unsigned char in_Ri; |
300 | unsigned char in_h_gr_14; | |
301 | } sfmt_str14h; | |
302 | struct { /* */ | |
303 | SI* i_Ri; | |
304 | SI f_disp10; | |
e5c59029 | 305 | UINT f_Ri; |
96baa820 JM |
306 | unsigned char in_Ri; |
307 | unsigned char in_h_gr_14; | |
308 | } sfmt_str14; | |
309 | struct { /* */ | |
310 | SI* i_Ri; | |
e5c59029 DB |
311 | UINT f_Ri; |
312 | unsigned char in_h_gr_15; | |
313 | unsigned char out_Ri; | |
314 | unsigned char out_h_gr_15; | |
315 | } sfmt_ldr15gr; | |
316 | struct { /* */ | |
317 | SI* i_Ri; | |
318 | UINT f_Ri; | |
96baa820 JM |
319 | USI f_udisp6; |
320 | unsigned char in_h_gr_15; | |
321 | unsigned char out_Ri; | |
322 | } sfmt_ldr15; | |
323 | struct { /* */ | |
324 | SI* i_Ri; | |
325 | INT f_disp8; | |
e5c59029 | 326 | UINT f_Ri; |
96baa820 JM |
327 | unsigned char in_h_gr_14; |
328 | unsigned char out_Ri; | |
329 | } sfmt_ldr14ub; | |
330 | struct { /* */ | |
331 | SI* i_Ri; | |
332 | SI f_disp9; | |
e5c59029 | 333 | UINT f_Ri; |
96baa820 JM |
334 | unsigned char in_h_gr_14; |
335 | unsigned char out_Ri; | |
336 | } sfmt_ldr14uh; | |
337 | struct { /* */ | |
338 | SI* i_Ri; | |
339 | SI f_disp10; | |
e5c59029 | 340 | UINT f_Ri; |
96baa820 JM |
341 | unsigned char in_h_gr_14; |
342 | unsigned char out_Ri; | |
343 | } sfmt_ldr14; | |
344 | struct { /* */ | |
345 | SI* i_Ri; | |
346 | SI f_m4; | |
e5c59029 | 347 | UINT f_Ri; |
96baa820 JM |
348 | unsigned char in_Ri; |
349 | unsigned char out_Ri; | |
350 | } sfmt_add2; | |
351 | struct { /* */ | |
352 | SI* i_Ri; | |
e5c59029 | 353 | UINT f_Ri; |
96baa820 JM |
354 | UINT f_u4; |
355 | unsigned char in_Ri; | |
356 | unsigned char out_Ri; | |
357 | } sfmt_addi; | |
96baa820 JM |
358 | struct { /* */ |
359 | SI* i_Ri; | |
360 | SI* i_Rj; | |
e5c59029 DB |
361 | UINT f_Ri; |
362 | UINT f_Rj; | |
96baa820 JM |
363 | unsigned char in_Ri; |
364 | unsigned char in_Rj; | |
365 | unsigned char in_h_gr_13; | |
366 | } sfmt_str13; | |
96baa820 JM |
367 | struct { /* */ |
368 | SI* i_Ri; | |
369 | SI* i_Rj; | |
e5c59029 DB |
370 | UINT f_Ri; |
371 | UINT f_Rj; | |
96baa820 JM |
372 | unsigned char in_Rj; |
373 | unsigned char in_h_gr_13; | |
374 | unsigned char out_Ri; | |
375 | } sfmt_ldr13; | |
376 | struct { /* */ | |
377 | SI* i_Ri; | |
378 | SI* i_Rj; | |
e5c59029 DB |
379 | UINT f_Ri; |
380 | UINT f_Rj; | |
96baa820 JM |
381 | unsigned char in_Ri; |
382 | unsigned char in_Rj; | |
383 | unsigned char out_Ri; | |
384 | } sfmt_add; | |
385 | struct { /* */ | |
386 | UINT f_reglist_hi_st; | |
387 | unsigned char in_h_gr_10; | |
388 | unsigned char in_h_gr_11; | |
389 | unsigned char in_h_gr_12; | |
390 | unsigned char in_h_gr_13; | |
391 | unsigned char in_h_gr_14; | |
392 | unsigned char in_h_gr_15; | |
393 | unsigned char in_h_gr_8; | |
394 | unsigned char in_h_gr_9; | |
395 | unsigned char out_h_gr_15; | |
396 | } sfmt_stm1; | |
397 | struct { /* */ | |
398 | UINT f_reglist_hi_ld; | |
399 | unsigned char in_h_gr_15; | |
400 | unsigned char out_h_gr_10; | |
401 | unsigned char out_h_gr_11; | |
402 | unsigned char out_h_gr_12; | |
403 | unsigned char out_h_gr_13; | |
404 | unsigned char out_h_gr_14; | |
405 | unsigned char out_h_gr_15; | |
406 | unsigned char out_h_gr_8; | |
407 | unsigned char out_h_gr_9; | |
408 | } sfmt_ldm1; | |
409 | struct { /* */ | |
410 | UINT f_reglist_low_st; | |
411 | unsigned char in_h_gr_0; | |
412 | unsigned char in_h_gr_1; | |
413 | unsigned char in_h_gr_15; | |
414 | unsigned char in_h_gr_2; | |
415 | unsigned char in_h_gr_3; | |
416 | unsigned char in_h_gr_4; | |
417 | unsigned char in_h_gr_5; | |
418 | unsigned char in_h_gr_6; | |
419 | unsigned char in_h_gr_7; | |
420 | unsigned char out_h_gr_15; | |
421 | } sfmt_stm0; | |
422 | struct { /* */ | |
423 | UINT f_reglist_low_ld; | |
424 | unsigned char in_h_gr_15; | |
425 | unsigned char out_h_gr_0; | |
426 | unsigned char out_h_gr_1; | |
427 | unsigned char out_h_gr_15; | |
428 | unsigned char out_h_gr_2; | |
429 | unsigned char out_h_gr_3; | |
430 | unsigned char out_h_gr_4; | |
431 | unsigned char out_h_gr_5; | |
432 | unsigned char out_h_gr_6; | |
433 | unsigned char out_h_gr_7; | |
434 | } sfmt_ldm0; | |
c906108c SS |
435 | #if WITH_SCACHE_PBB |
436 | /* Writeback handler. */ | |
437 | struct { | |
438 | /* Pointer to argbuf entry for insn whose results need writing back. */ | |
439 | const struct argbuf *abuf; | |
440 | } write; | |
441 | /* x-before handler */ | |
442 | struct { | |
443 | /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/ | |
444 | int first_p; | |
445 | } before; | |
446 | /* x-after handler */ | |
447 | struct { | |
448 | int empty; | |
449 | } after; | |
450 | /* This entry is used to terminate each pbb. */ | |
451 | struct { | |
452 | /* Number of insns in pbb. */ | |
453 | int insn_count; | |
454 | /* Next pbb to execute. */ | |
455 | SCACHE *next; | |
96baa820 | 456 | SCACHE *branch_target; |
c906108c SS |
457 | } chain; |
458 | #endif | |
459 | }; | |
460 | ||
461 | /* The ARGBUF struct. */ | |
462 | struct argbuf { | |
463 | /* These are the baseclass definitions. */ | |
464 | IADDR addr; | |
465 | const IDESC *idesc; | |
466 | char trace_p; | |
467 | char profile_p; | |
96baa820 JM |
468 | /* ??? Temporary hack for skip insns. */ |
469 | char skip_count; | |
470 | char unused; | |
c906108c SS |
471 | /* cpu specific data follows */ |
472 | union sem semantic; | |
473 | int written; | |
474 | union sem_fields fields; | |
475 | }; | |
476 | ||
477 | /* A cached insn. | |
478 | ||
479 | ??? SCACHE used to contain more than just argbuf. We could delete the | |
480 | type entirely and always just use ARGBUF, but for future concerns and as | |
481 | a level of abstraction it is left in. */ | |
482 | ||
483 | struct scache { | |
484 | struct argbuf argbuf; | |
485 | }; | |
486 | ||
487 | /* Macros to simplify extraction, reading and semantic code. | |
488 | These define and assign the local vars that contain the insn's fields. */ | |
489 | ||
490 | #define EXTRACT_IFMT_EMPTY_VARS \ | |
c906108c SS |
491 | unsigned int length; |
492 | #define EXTRACT_IFMT_EMPTY_CODE \ | |
493 | length = 0; \ | |
494 | ||
495 | #define EXTRACT_IFMT_ADD_VARS \ | |
c906108c SS |
496 | UINT f_op1; \ |
497 | UINT f_op2; \ | |
498 | UINT f_Rj; \ | |
499 | UINT f_Ri; \ | |
500 | unsigned int length; | |
501 | #define EXTRACT_IFMT_ADD_CODE \ | |
502 | length = 2; \ | |
9846de1b JM |
503 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
504 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
505 | f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
506 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
507 | |
508 | #define EXTRACT_IFMT_ADDI_VARS \ | |
c906108c SS |
509 | UINT f_op1; \ |
510 | UINT f_op2; \ | |
511 | UINT f_u4; \ | |
512 | UINT f_Ri; \ | |
513 | unsigned int length; | |
514 | #define EXTRACT_IFMT_ADDI_CODE \ | |
515 | length = 2; \ | |
9846de1b JM |
516 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
517 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
518 | f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
519 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
520 | |
521 | #define EXTRACT_IFMT_ADD2_VARS \ | |
c906108c SS |
522 | UINT f_op1; \ |
523 | UINT f_op2; \ | |
524 | SI f_m4; \ | |
525 | UINT f_Ri; \ | |
526 | unsigned int length; | |
527 | #define EXTRACT_IFMT_ADD2_CODE \ | |
528 | length = 2; \ | |
9846de1b JM |
529 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
530 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
531 | f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); \ | |
532 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
533 | |
534 | #define EXTRACT_IFMT_DIV0S_VARS \ | |
c906108c SS |
535 | UINT f_op1; \ |
536 | UINT f_op2; \ | |
537 | UINT f_op3; \ | |
538 | UINT f_Ri; \ | |
539 | unsigned int length; | |
540 | #define EXTRACT_IFMT_DIV0S_CODE \ | |
541 | length = 2; \ | |
9846de1b JM |
542 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
543 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
544 | f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
545 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
546 | |
547 | #define EXTRACT_IFMT_DIV3_VARS \ | |
c906108c SS |
548 | UINT f_op1; \ |
549 | UINT f_op2; \ | |
550 | UINT f_op3; \ | |
551 | UINT f_op4; \ | |
552 | unsigned int length; | |
553 | #define EXTRACT_IFMT_DIV3_CODE \ | |
554 | length = 2; \ | |
9846de1b JM |
555 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
556 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
557 | f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
558 | f_op4 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
559 | |
560 | #define EXTRACT_IFMT_LDI8_VARS \ | |
c906108c SS |
561 | UINT f_op1; \ |
562 | UINT f_i8; \ | |
563 | UINT f_Ri; \ | |
564 | unsigned int length; | |
565 | #define EXTRACT_IFMT_LDI8_CODE \ | |
566 | length = 2; \ | |
9846de1b JM |
567 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
568 | f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8); \ | |
569 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
570 | |
571 | #define EXTRACT_IFMT_LDI20_VARS \ | |
c906108c | 572 | UINT f_op1; \ |
c906108c SS |
573 | UINT f_i20_4; \ |
574 | UINT f_i20_16; \ | |
9846de1b | 575 | UINT f_i20; \ |
c906108c SS |
576 | UINT f_op2; \ |
577 | UINT f_Ri; \ | |
578 | /* Contents of trailing part of insn. */ \ | |
579 | UINT word_1; \ | |
580 | unsigned int length; | |
581 | #define EXTRACT_IFMT_LDI20_CODE \ | |
582 | length = 4; \ | |
583 | word_1 = GETIMEMUHI (current_cpu, pc + 2); \ | |
9846de1b JM |
584 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
585 | f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
586 | f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0)); \ | |
7a292a7a | 587 | {\ |
c906108c | 588 | f_i20 = ((((f_i20_4) << (16))) | (f_i20_16));\ |
7a292a7a | 589 | }\ |
9846de1b JM |
590 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ |
591 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
592 | |
593 | #define EXTRACT_IFMT_LDI32_VARS \ | |
c906108c SS |
594 | UINT f_op1; \ |
595 | UINT f_i32; \ | |
596 | UINT f_op2; \ | |
597 | UINT f_op3; \ | |
598 | UINT f_Ri; \ | |
599 | /* Contents of trailing part of insn. */ \ | |
600 | UINT word_1; \ | |
7a292a7a | 601 | UINT word_2; \ |
c906108c SS |
602 | unsigned int length; |
603 | #define EXTRACT_IFMT_LDI32_CODE \ | |
604 | length = 6; \ | |
7a292a7a SS |
605 | word_1 = GETIMEMUHI (current_cpu, pc + 2); \ |
606 | word_2 = GETIMEMUHI (current_cpu, pc + 4); \ | |
9846de1b JM |
607 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
608 | f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16)); \ | |
609 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
610 | f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
611 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
612 | |
613 | #define EXTRACT_IFMT_LDR14_VARS \ | |
c906108c SS |
614 | UINT f_op1; \ |
615 | SI f_disp10; \ | |
616 | UINT f_Ri; \ | |
617 | unsigned int length; | |
618 | #define EXTRACT_IFMT_LDR14_CODE \ | |
619 | length = 2; \ | |
9846de1b JM |
620 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
621 | f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2)); \ | |
622 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
623 | |
624 | #define EXTRACT_IFMT_LDR14UH_VARS \ | |
c906108c SS |
625 | UINT f_op1; \ |
626 | SI f_disp9; \ | |
627 | UINT f_Ri; \ | |
628 | unsigned int length; | |
629 | #define EXTRACT_IFMT_LDR14UH_CODE \ | |
630 | length = 2; \ | |
9846de1b JM |
631 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
632 | f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1)); \ | |
633 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
634 | |
635 | #define EXTRACT_IFMT_LDR14UB_VARS \ | |
c906108c SS |
636 | UINT f_op1; \ |
637 | INT f_disp8; \ | |
638 | UINT f_Ri; \ | |
639 | unsigned int length; | |
640 | #define EXTRACT_IFMT_LDR14UB_CODE \ | |
641 | length = 2; \ | |
9846de1b JM |
642 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
643 | f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8); \ | |
644 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
645 | |
646 | #define EXTRACT_IFMT_LDR15_VARS \ | |
c906108c SS |
647 | UINT f_op1; \ |
648 | UINT f_op2; \ | |
649 | USI f_udisp6; \ | |
650 | UINT f_Ri; \ | |
651 | unsigned int length; | |
652 | #define EXTRACT_IFMT_LDR15_CODE \ | |
653 | length = 2; \ | |
9846de1b JM |
654 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
655 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
656 | f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2)); \ | |
657 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
658 | |
659 | #define EXTRACT_IFMT_LDR15DR_VARS \ | |
c906108c SS |
660 | UINT f_op1; \ |
661 | UINT f_op2; \ | |
662 | UINT f_op3; \ | |
663 | UINT f_Rs2; \ | |
664 | unsigned int length; | |
665 | #define EXTRACT_IFMT_LDR15DR_CODE \ | |
666 | length = 2; \ | |
9846de1b JM |
667 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
668 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
669 | f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
670 | f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
671 | |
672 | #define EXTRACT_IFMT_MOVDR_VARS \ | |
c906108c SS |
673 | UINT f_op1; \ |
674 | UINT f_op2; \ | |
675 | UINT f_Rs1; \ | |
676 | UINT f_Ri; \ | |
677 | unsigned int length; | |
678 | #define EXTRACT_IFMT_MOVDR_CODE \ | |
679 | length = 2; \ | |
9846de1b JM |
680 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
681 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
682 | f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
683 | f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
c906108c SS |
684 | |
685 | #define EXTRACT_IFMT_CALL_VARS \ | |
c906108c SS |
686 | UINT f_op1; \ |
687 | UINT f_op5; \ | |
688 | SI f_rel12; \ | |
689 | unsigned int length; | |
690 | #define EXTRACT_IFMT_CALL_CODE \ | |
691 | length = 2; \ | |
9846de1b JM |
692 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
693 | f_op5 = EXTRACT_MSB0_UINT (insn, 16, 4, 1); \ | |
694 | f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2)))); \ | |
c906108c SS |
695 | |
696 | #define EXTRACT_IFMT_INT_VARS \ | |
c906108c SS |
697 | UINT f_op1; \ |
698 | UINT f_op2; \ | |
699 | UINT f_u8; \ | |
700 | unsigned int length; | |
701 | #define EXTRACT_IFMT_INT_CODE \ | |
702 | length = 2; \ | |
9846de1b JM |
703 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
704 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
705 | f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \ | |
c906108c SS |
706 | |
707 | #define EXTRACT_IFMT_BRAD_VARS \ | |
c906108c SS |
708 | UINT f_op1; \ |
709 | UINT f_cc; \ | |
710 | SI f_rel9; \ | |
711 | unsigned int length; | |
712 | #define EXTRACT_IFMT_BRAD_CODE \ | |
713 | length = 2; \ | |
9846de1b JM |
714 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
715 | f_cc = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
716 | f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); \ | |
c906108c SS |
717 | |
718 | #define EXTRACT_IFMT_DMOVR13_VARS \ | |
c906108c SS |
719 | UINT f_op1; \ |
720 | UINT f_op2; \ | |
721 | USI f_dir10; \ | |
722 | unsigned int length; | |
723 | #define EXTRACT_IFMT_DMOVR13_CODE \ | |
724 | length = 2; \ | |
9846de1b JM |
725 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
726 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
727 | f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); \ | |
c906108c SS |
728 | |
729 | #define EXTRACT_IFMT_DMOVR13H_VARS \ | |
c906108c SS |
730 | UINT f_op1; \ |
731 | UINT f_op2; \ | |
732 | USI f_dir9; \ | |
733 | unsigned int length; | |
734 | #define EXTRACT_IFMT_DMOVR13H_CODE \ | |
735 | length = 2; \ | |
9846de1b JM |
736 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
737 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
738 | f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); \ | |
c906108c SS |
739 | |
740 | #define EXTRACT_IFMT_DMOVR13B_VARS \ | |
c906108c SS |
741 | UINT f_op1; \ |
742 | UINT f_op2; \ | |
743 | UINT f_dir8; \ | |
744 | unsigned int length; | |
745 | #define EXTRACT_IFMT_DMOVR13B_CODE \ | |
746 | length = 2; \ | |
9846de1b JM |
747 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
748 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
749 | f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \ | |
c906108c SS |
750 | |
751 | #define EXTRACT_IFMT_COPOP_VARS \ | |
c906108c SS |
752 | UINT f_op1; \ |
753 | UINT f_ccc; \ | |
754 | UINT f_op2; \ | |
755 | UINT f_op3; \ | |
756 | UINT f_CRj; \ | |
757 | UINT f_u4c; \ | |
758 | UINT f_CRi; \ | |
759 | /* Contents of trailing part of insn. */ \ | |
760 | UINT word_1; \ | |
761 | unsigned int length; | |
762 | #define EXTRACT_IFMT_COPOP_CODE \ | |
763 | length = 4; \ | |
764 | word_1 = GETIMEMUHI (current_cpu, pc + 2); \ | |
9846de1b JM |
765 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
766 | f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \ | |
767 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
768 | f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
769 | f_CRj = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \ | |
770 | f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
771 | f_CRi = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 16) << 0)); \ | |
c906108c SS |
772 | |
773 | #define EXTRACT_IFMT_COPLD_VARS \ | |
c906108c SS |
774 | UINT f_op1; \ |
775 | UINT f_ccc; \ | |
776 | UINT f_op2; \ | |
777 | UINT f_op3; \ | |
778 | UINT f_Rjc; \ | |
779 | UINT f_u4c; \ | |
780 | UINT f_CRi; \ | |
781 | /* Contents of trailing part of insn. */ \ | |
782 | UINT word_1; \ | |
783 | unsigned int length; | |
784 | #define EXTRACT_IFMT_COPLD_CODE \ | |
785 | length = 4; \ | |
786 | word_1 = GETIMEMUHI (current_cpu, pc + 2); \ | |
9846de1b JM |
787 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
788 | f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \ | |
789 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
790 | f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
791 | f_Rjc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \ | |
792 | f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
793 | f_CRi = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 16) << 0)); \ | |
c906108c SS |
794 | |
795 | #define EXTRACT_IFMT_COPST_VARS \ | |
c906108c SS |
796 | UINT f_op1; \ |
797 | UINT f_ccc; \ | |
798 | UINT f_op2; \ | |
799 | UINT f_op3; \ | |
800 | UINT f_CRj; \ | |
801 | UINT f_u4c; \ | |
802 | UINT f_Ric; \ | |
803 | /* Contents of trailing part of insn. */ \ | |
804 | UINT word_1; \ | |
805 | unsigned int length; | |
806 | #define EXTRACT_IFMT_COPST_CODE \ | |
807 | length = 4; \ | |
808 | word_1 = GETIMEMUHI (current_cpu, pc + 2); \ | |
9846de1b JM |
809 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
810 | f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \ | |
811 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
812 | f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \ | |
813 | f_CRj = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \ | |
814 | f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \ | |
815 | f_Ric = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 16) << 0)); \ | |
c906108c SS |
816 | |
817 | #define EXTRACT_IFMT_ADDSP_VARS \ | |
c906108c SS |
818 | UINT f_op1; \ |
819 | UINT f_op2; \ | |
820 | SI f_s10; \ | |
821 | unsigned int length; | |
822 | #define EXTRACT_IFMT_ADDSP_CODE \ | |
823 | length = 2; \ | |
9846de1b JM |
824 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
825 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
826 | f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2)); \ | |
c906108c SS |
827 | |
828 | #define EXTRACT_IFMT_LDM0_VARS \ | |
c906108c SS |
829 | UINT f_op1; \ |
830 | UINT f_op2; \ | |
831 | UINT f_reglist_low_ld; \ | |
832 | unsigned int length; | |
833 | #define EXTRACT_IFMT_LDM0_CODE \ | |
834 | length = 2; \ | |
9846de1b JM |
835 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
836 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
837 | f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \ | |
c906108c SS |
838 | |
839 | #define EXTRACT_IFMT_LDM1_VARS \ | |
c906108c SS |
840 | UINT f_op1; \ |
841 | UINT f_op2; \ | |
842 | UINT f_reglist_hi_ld; \ | |
843 | unsigned int length; | |
844 | #define EXTRACT_IFMT_LDM1_CODE \ | |
845 | length = 2; \ | |
9846de1b JM |
846 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
847 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
848 | f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \ | |
c906108c SS |
849 | |
850 | #define EXTRACT_IFMT_STM0_VARS \ | |
c906108c SS |
851 | UINT f_op1; \ |
852 | UINT f_op2; \ | |
853 | UINT f_reglist_low_st; \ | |
854 | unsigned int length; | |
855 | #define EXTRACT_IFMT_STM0_CODE \ | |
856 | length = 2; \ | |
9846de1b JM |
857 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
858 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
859 | f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \ | |
c906108c SS |
860 | |
861 | #define EXTRACT_IFMT_STM1_VARS \ | |
c906108c SS |
862 | UINT f_op1; \ |
863 | UINT f_op2; \ | |
864 | UINT f_reglist_hi_st; \ | |
865 | unsigned int length; | |
866 | #define EXTRACT_IFMT_STM1_CODE \ | |
867 | length = 2; \ | |
9846de1b JM |
868 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
869 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
870 | f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \ | |
c906108c SS |
871 | |
872 | #define EXTRACT_IFMT_ENTER_VARS \ | |
c906108c SS |
873 | UINT f_op1; \ |
874 | UINT f_op2; \ | |
875 | USI f_u10; \ | |
876 | unsigned int length; | |
877 | #define EXTRACT_IFMT_ENTER_CODE \ | |
878 | length = 2; \ | |
9846de1b JM |
879 | f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \ |
880 | f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \ | |
881 | f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); \ | |
c906108c SS |
882 | |
883 | /* Collection of various things for the trace handler to use. */ | |
884 | ||
885 | typedef struct trace_record { | |
886 | IADDR pc; | |
887 | /* FIXME:wip */ | |
888 | } TRACE_RECORD; | |
889 | ||
890 | #endif /* CPU_FR30BF_H */ |