Commit | Line | Data |
---|---|---|
cbb38b47 BE |
1 | /* ISA definitions header for media. |
2 | ||
3 | THIS FILE IS MACHINE GENERATED WITH CGEN. | |
4 | ||
61baf725 | 5 | Copyright 1996-2017 Free Software Foundation, Inc. |
cbb38b47 | 6 | |
c7e628df | 7 | This file is part of the GNU simulators. |
cbb38b47 | 8 | |
fda1c30b DE |
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. | |
cbb38b47 | 13 | |
fda1c30b DE |
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. | |
cbb38b47 | 18 | |
fda1c30b | 19 | You should have received a copy of the GNU General Public License along |
51b318de | 20 | with this program; if not, see <http://www.gnu.org/licenses/>. |
cbb38b47 BE |
21 | |
22 | */ | |
23 | ||
24 | #ifndef DEFS_SH64_MEDIA_H | |
25 | #define DEFS_SH64_MEDIA_H | |
26 | ||
27 | /* Instruction argument buffer. */ | |
28 | ||
29 | union sem_fields { | |
30 | struct { /* no operands */ | |
31 | int empty; | |
2310652a | 32 | } sfmt_empty; |
cbb38b47 BE |
33 | struct { /* */ |
34 | UINT f_dest; | |
35 | UINT f_uimm16; | |
36 | } sfmt_shori; | |
37 | struct { /* */ | |
38 | DI f_disp16; | |
39 | UINT f_tra; | |
40 | } sfmt_pta; | |
41 | struct { /* */ | |
42 | INT f_imm16; | |
43 | UINT f_dest; | |
44 | } sfmt_movi; | |
45 | struct { /* */ | |
46 | UINT f_dest; | |
47 | UINT f_left_right; | |
48 | } sfmt_fabsd; | |
49 | struct { /* */ | |
50 | UINT f_dest; | |
51 | UINT f_trb; | |
52 | } sfmt_blink; | |
53 | struct { /* */ | |
54 | INT f_imm6; | |
55 | UINT f_dest; | |
56 | UINT f_left; | |
57 | } sfmt_xori; | |
cbb38b47 BE |
58 | struct { /* */ |
59 | UINT f_dest; | |
60 | UINT f_left; | |
61 | UINT f_uimm6; | |
62 | } sfmt_shari; | |
63 | struct { /* */ | |
64 | INT f_imm10; | |
65 | UINT f_dest; | |
66 | UINT f_left; | |
67 | } sfmt_ori; | |
68 | struct { /* */ | |
69 | SI f_disp10x2; | |
70 | UINT f_dest; | |
71 | UINT f_left; | |
72 | } sfmt_lduw; | |
c7e628df DB |
73 | struct { /* */ |
74 | INT f_disp6; | |
75 | UINT f_dest; | |
76 | UINT f_left; | |
77 | } sfmt_getcfg; | |
cbb38b47 BE |
78 | struct { /* */ |
79 | SI f_disp10x4; | |
80 | UINT f_dest; | |
81 | UINT f_left; | |
82 | } sfmt_flds; | |
83 | struct { /* */ | |
84 | SI f_disp10x8; | |
85 | UINT f_dest; | |
86 | UINT f_left; | |
87 | } sfmt_fldd; | |
88 | struct { /* */ | |
89 | INT f_imm6; | |
90 | UINT f_left; | |
91 | UINT f_tra; | |
92 | } sfmt_beqi; | |
93 | struct { /* */ | |
94 | UINT f_left; | |
95 | UINT f_right; | |
96 | UINT f_tra; | |
97 | } sfmt_beq; | |
98 | struct { /* */ | |
99 | INT f_disp10; | |
100 | UINT f_dest; | |
101 | UINT f_left; | |
102 | } sfmt_addi; | |
103 | struct { /* */ | |
104 | UINT f_dest; | |
105 | UINT f_left; | |
106 | UINT f_right; | |
107 | } sfmt_add; | |
108 | #if WITH_SCACHE_PBB | |
109 | /* Writeback handler. */ | |
110 | struct { | |
111 | /* Pointer to argbuf entry for insn whose results need writing back. */ | |
112 | const struct argbuf *abuf; | |
113 | } write; | |
114 | /* x-before handler */ | |
115 | struct { | |
116 | /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/ | |
117 | int first_p; | |
118 | } before; | |
119 | /* x-after handler */ | |
120 | struct { | |
121 | int empty; | |
122 | } after; | |
123 | /* This entry is used to terminate each pbb. */ | |
124 | struct { | |
125 | /* Number of insns in pbb. */ | |
126 | int insn_count; | |
127 | /* Next pbb to execute. */ | |
128 | SCACHE *next; | |
129 | SCACHE *branch_target; | |
130 | } chain; | |
131 | #endif | |
132 | }; | |
133 | ||
134 | /* The ARGBUF struct. */ | |
135 | struct argbuf { | |
136 | /* These are the baseclass definitions. */ | |
137 | IADDR addr; | |
138 | const IDESC *idesc; | |
139 | char trace_p; | |
140 | char profile_p; | |
141 | /* ??? Temporary hack for skip insns. */ | |
142 | char skip_count; | |
143 | char unused; | |
144 | /* cpu specific data follows */ | |
145 | union sem semantic; | |
146 | int written; | |
147 | union sem_fields fields; | |
148 | }; | |
149 | ||
150 | /* A cached insn. | |
151 | ||
152 | ??? SCACHE used to contain more than just argbuf. We could delete the | |
153 | type entirely and always just use ARGBUF, but for future concerns and as | |
154 | a level of abstraction it is left in. */ | |
155 | ||
156 | struct scache { | |
157 | struct argbuf argbuf; | |
158 | }; | |
159 | ||
160 | /* Macros to simplify extraction, reading and semantic code. | |
161 | These define and assign the local vars that contain the insn's fields. */ | |
162 | ||
163 | #define EXTRACT_IFMT_EMPTY_VARS \ | |
164 | unsigned int length; | |
165 | #define EXTRACT_IFMT_EMPTY_CODE \ | |
166 | length = 0; \ | |
167 | ||
168 | #define EXTRACT_IFMT_ADD_VARS \ | |
169 | UINT f_op; \ | |
170 | UINT f_left; \ | |
171 | UINT f_ext; \ | |
172 | UINT f_right; \ | |
173 | UINT f_dest; \ | |
174 | UINT f_rsvd; \ | |
175 | unsigned int length; | |
176 | #define EXTRACT_IFMT_ADD_CODE \ | |
177 | length = 4; \ | |
c7e628df DB |
178 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
179 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
180 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
181 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
182 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
183 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
184 | |
185 | #define EXTRACT_IFMT_ADDI_VARS \ | |
186 | UINT f_op; \ | |
187 | UINT f_left; \ | |
188 | INT f_disp10; \ | |
189 | UINT f_dest; \ | |
190 | UINT f_rsvd; \ | |
191 | unsigned int length; | |
192 | #define EXTRACT_IFMT_ADDI_CODE \ | |
193 | length = 4; \ | |
c7e628df DB |
194 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
195 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
62836bf4 | 196 | f_disp10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10); \ |
c7e628df DB |
197 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
198 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
199 | |
200 | #define EXTRACT_IFMT_ALLOCO_VARS \ | |
201 | UINT f_op; \ | |
202 | UINT f_left; \ | |
203 | UINT f_ext; \ | |
204 | SI f_disp6x32; \ | |
205 | UINT f_dest; \ | |
206 | UINT f_rsvd; \ | |
207 | unsigned int length; | |
208 | #define EXTRACT_IFMT_ALLOCO_CODE \ | |
209 | length = 4; \ | |
c7e628df DB |
210 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
211 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
212 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
62836bf4 | 213 | f_disp6x32 = ((EXTRACT_MSB0_SINT (insn, 32, 16, 6)) << (5)); \ |
c7e628df DB |
214 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
215 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
216 | |
217 | #define EXTRACT_IFMT_BEQ_VARS \ | |
218 | UINT f_op; \ | |
219 | UINT f_left; \ | |
220 | UINT f_ext; \ | |
221 | UINT f_right; \ | |
222 | UINT f_likely; \ | |
c7e628df | 223 | UINT f_23_2; \ |
cbb38b47 BE |
224 | UINT f_tra; \ |
225 | UINT f_rsvd; \ | |
226 | unsigned int length; | |
227 | #define EXTRACT_IFMT_BEQ_CODE \ | |
228 | length = 4; \ | |
c7e628df DB |
229 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
230 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
231 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
232 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
233 | f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \ | |
234 | f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \ | |
235 | f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \ | |
236 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
237 | |
238 | #define EXTRACT_IFMT_BEQI_VARS \ | |
239 | UINT f_op; \ | |
240 | UINT f_left; \ | |
241 | UINT f_ext; \ | |
242 | INT f_imm6; \ | |
243 | UINT f_likely; \ | |
c7e628df | 244 | UINT f_23_2; \ |
cbb38b47 BE |
245 | UINT f_tra; \ |
246 | UINT f_rsvd; \ | |
247 | unsigned int length; | |
248 | #define EXTRACT_IFMT_BEQI_CODE \ | |
249 | length = 4; \ | |
c7e628df DB |
250 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
251 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
252 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
62836bf4 | 253 | f_imm6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6); \ |
c7e628df DB |
254 | f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \ |
255 | f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \ | |
256 | f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \ | |
257 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
258 | |
259 | #define EXTRACT_IFMT_BLINK_VARS \ | |
260 | UINT f_op; \ | |
c7e628df | 261 | UINT f_6_3; \ |
cbb38b47 BE |
262 | UINT f_trb; \ |
263 | UINT f_ext; \ | |
264 | UINT f_right; \ | |
265 | UINT f_dest; \ | |
266 | UINT f_rsvd; \ | |
267 | unsigned int length; | |
268 | #define EXTRACT_IFMT_BLINK_CODE \ | |
269 | length = 4; \ | |
c7e628df DB |
270 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
271 | f_6_3 = EXTRACT_MSB0_UINT (insn, 32, 6, 3); \ | |
272 | f_trb = EXTRACT_MSB0_UINT (insn, 32, 9, 3); \ | |
273 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
274 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
275 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
276 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
277 | |
278 | #define EXTRACT_IFMT_BRK_VARS \ | |
279 | UINT f_op; \ | |
280 | UINT f_left; \ | |
281 | UINT f_ext; \ | |
282 | UINT f_right; \ | |
283 | UINT f_dest; \ | |
284 | UINT f_rsvd; \ | |
285 | unsigned int length; | |
286 | #define EXTRACT_IFMT_BRK_CODE \ | |
287 | length = 4; \ | |
c7e628df DB |
288 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
289 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
290 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
291 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
292 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
293 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
294 | |
295 | #define EXTRACT_IFMT_BYTEREV_VARS \ | |
296 | UINT f_op; \ | |
297 | UINT f_left; \ | |
298 | UINT f_ext; \ | |
299 | UINT f_right; \ | |
300 | UINT f_dest; \ | |
301 | UINT f_rsvd; \ | |
302 | unsigned int length; | |
303 | #define EXTRACT_IFMT_BYTEREV_CODE \ | |
304 | length = 4; \ | |
c7e628df DB |
305 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
306 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
307 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
308 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
309 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
310 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
311 | |
312 | #define EXTRACT_IFMT_FABSD_VARS \ | |
313 | UINT f_op; \ | |
cbb38b47 BE |
314 | UINT f_left; \ |
315 | UINT f_right; \ | |
316 | UINT f_left_right; \ | |
c7e628df | 317 | UINT f_ext; \ |
cbb38b47 BE |
318 | UINT f_dest; \ |
319 | UINT f_rsvd; \ | |
320 | unsigned int length; | |
321 | #define EXTRACT_IFMT_FABSD_CODE \ | |
322 | length = 4; \ | |
c7e628df DB |
323 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
324 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
325 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
cbb38b47 | 326 | f_left_right = f_left;\ |
c7e628df DB |
327 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ |
328 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
329 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
330 | |
331 | #define EXTRACT_IFMT_FABSS_VARS \ | |
332 | UINT f_op; \ | |
cbb38b47 BE |
333 | UINT f_left; \ |
334 | UINT f_right; \ | |
335 | UINT f_left_right; \ | |
c7e628df | 336 | UINT f_ext; \ |
cbb38b47 BE |
337 | UINT f_dest; \ |
338 | UINT f_rsvd; \ | |
339 | unsigned int length; | |
340 | #define EXTRACT_IFMT_FABSS_CODE \ | |
341 | length = 4; \ | |
c7e628df DB |
342 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
343 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
344 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
cbb38b47 | 345 | f_left_right = f_left;\ |
c7e628df DB |
346 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ |
347 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
348 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
349 | |
350 | #define EXTRACT_IFMT_FADDD_VARS \ | |
351 | UINT f_op; \ | |
352 | UINT f_left; \ | |
353 | UINT f_ext; \ | |
354 | UINT f_right; \ | |
355 | UINT f_dest; \ | |
356 | UINT f_rsvd; \ | |
357 | unsigned int length; | |
358 | #define EXTRACT_IFMT_FADDD_CODE \ | |
359 | length = 4; \ | |
c7e628df DB |
360 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
361 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
362 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
363 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
364 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
365 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
366 | |
367 | #define EXTRACT_IFMT_FADDS_VARS \ | |
368 | UINT f_op; \ | |
369 | UINT f_left; \ | |
370 | UINT f_ext; \ | |
371 | UINT f_right; \ | |
372 | UINT f_dest; \ | |
373 | UINT f_rsvd; \ | |
374 | unsigned int length; | |
375 | #define EXTRACT_IFMT_FADDS_CODE \ | |
376 | length = 4; \ | |
c7e628df DB |
377 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
378 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
379 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
380 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
381 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
382 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
383 | |
384 | #define EXTRACT_IFMT_FCMPEQD_VARS \ | |
385 | UINT f_op; \ | |
386 | UINT f_left; \ | |
387 | UINT f_ext; \ | |
388 | UINT f_right; \ | |
389 | UINT f_dest; \ | |
390 | UINT f_rsvd; \ | |
391 | unsigned int length; | |
392 | #define EXTRACT_IFMT_FCMPEQD_CODE \ | |
393 | length = 4; \ | |
c7e628df DB |
394 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
395 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
396 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
397 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
398 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
399 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
400 | |
401 | #define EXTRACT_IFMT_FCMPEQS_VARS \ | |
402 | UINT f_op; \ | |
403 | UINT f_left; \ | |
404 | UINT f_ext; \ | |
405 | UINT f_right; \ | |
406 | UINT f_dest; \ | |
407 | UINT f_rsvd; \ | |
408 | unsigned int length; | |
409 | #define EXTRACT_IFMT_FCMPEQS_CODE \ | |
410 | length = 4; \ | |
c7e628df DB |
411 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
412 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
413 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
414 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
415 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
416 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
417 | |
418 | #define EXTRACT_IFMT_FCNVDS_VARS \ | |
419 | UINT f_op; \ | |
cbb38b47 BE |
420 | UINT f_left; \ |
421 | UINT f_right; \ | |
422 | UINT f_left_right; \ | |
c7e628df | 423 | UINT f_ext; \ |
cbb38b47 BE |
424 | UINT f_dest; \ |
425 | UINT f_rsvd; \ | |
426 | unsigned int length; | |
427 | #define EXTRACT_IFMT_FCNVDS_CODE \ | |
428 | length = 4; \ | |
c7e628df DB |
429 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
430 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
431 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
cbb38b47 | 432 | f_left_right = f_left;\ |
c7e628df DB |
433 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ |
434 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
435 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
436 | |
437 | #define EXTRACT_IFMT_FCNVSD_VARS \ | |
438 | UINT f_op; \ | |
cbb38b47 BE |
439 | UINT f_left; \ |
440 | UINT f_right; \ | |
441 | UINT f_left_right; \ | |
c7e628df | 442 | UINT f_ext; \ |
cbb38b47 BE |
443 | UINT f_dest; \ |
444 | UINT f_rsvd; \ | |
445 | unsigned int length; | |
446 | #define EXTRACT_IFMT_FCNVSD_CODE \ | |
447 | length = 4; \ | |
c7e628df DB |
448 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
449 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
450 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
cbb38b47 | 451 | f_left_right = f_left;\ |
c7e628df DB |
452 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ |
453 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
454 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
455 | |
456 | #define EXTRACT_IFMT_FGETSCR_VARS \ | |
457 | UINT f_op; \ | |
458 | UINT f_left; \ | |
459 | UINT f_ext; \ | |
460 | UINT f_right; \ | |
461 | UINT f_dest; \ | |
462 | UINT f_rsvd; \ | |
463 | unsigned int length; | |
464 | #define EXTRACT_IFMT_FGETSCR_CODE \ | |
465 | length = 4; \ | |
c7e628df DB |
466 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
467 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
468 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
469 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
470 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
471 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
472 | |
473 | #define EXTRACT_IFMT_FIPRS_VARS \ | |
474 | UINT f_op; \ | |
475 | UINT f_left; \ | |
476 | UINT f_ext; \ | |
477 | UINT f_right; \ | |
478 | UINT f_dest; \ | |
479 | UINT f_rsvd; \ | |
480 | unsigned int length; | |
481 | #define EXTRACT_IFMT_FIPRS_CODE \ | |
482 | length = 4; \ | |
c7e628df DB |
483 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
484 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
485 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
486 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
487 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
488 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
489 | |
490 | #define EXTRACT_IFMT_FLDD_VARS \ | |
491 | UINT f_op; \ | |
492 | UINT f_left; \ | |
493 | SI f_disp10x8; \ | |
494 | UINT f_dest; \ | |
495 | UINT f_rsvd; \ | |
496 | unsigned int length; | |
497 | #define EXTRACT_IFMT_FLDD_CODE \ | |
498 | length = 4; \ | |
c7e628df DB |
499 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
500 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
62836bf4 | 501 | f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \ |
c7e628df DB |
502 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
503 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
504 | |
505 | #define EXTRACT_IFMT_FLDP_VARS \ | |
506 | UINT f_op; \ | |
507 | UINT f_left; \ | |
508 | SI f_disp10x8; \ | |
509 | UINT f_dest; \ | |
510 | UINT f_rsvd; \ | |
511 | unsigned int length; | |
512 | #define EXTRACT_IFMT_FLDP_CODE \ | |
513 | length = 4; \ | |
c7e628df DB |
514 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
515 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
62836bf4 | 516 | f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \ |
c7e628df DB |
517 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
518 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
519 | |
520 | #define EXTRACT_IFMT_FLDS_VARS \ | |
521 | UINT f_op; \ | |
522 | UINT f_left; \ | |
523 | SI f_disp10x4; \ | |
524 | UINT f_dest; \ | |
525 | UINT f_rsvd; \ | |
526 | unsigned int length; | |
527 | #define EXTRACT_IFMT_FLDS_CODE \ | |
528 | length = 4; \ | |
c7e628df DB |
529 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
530 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
62836bf4 | 531 | f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2)); \ |
c7e628df DB |
532 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
533 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
534 | |
535 | #define EXTRACT_IFMT_FLDXD_VARS \ | |
536 | UINT f_op; \ | |
537 | UINT f_left; \ | |
538 | UINT f_ext; \ | |
539 | UINT f_right; \ | |
540 | UINT f_dest; \ | |
541 | UINT f_rsvd; \ | |
542 | unsigned int length; | |
543 | #define EXTRACT_IFMT_FLDXD_CODE \ | |
544 | length = 4; \ | |
c7e628df DB |
545 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
546 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
547 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
548 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
549 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
550 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
551 | |
552 | #define EXTRACT_IFMT_FLDXP_VARS \ | |
553 | UINT f_op; \ | |
554 | UINT f_left; \ | |
555 | UINT f_ext; \ | |
556 | UINT f_right; \ | |
557 | UINT f_dest; \ | |
558 | UINT f_rsvd; \ | |
559 | unsigned int length; | |
560 | #define EXTRACT_IFMT_FLDXP_CODE \ | |
561 | length = 4; \ | |
c7e628df DB |
562 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
563 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
564 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
565 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
566 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
567 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
568 | |
569 | #define EXTRACT_IFMT_FMOVDQ_VARS \ | |
570 | UINT f_op; \ | |
cbb38b47 BE |
571 | UINT f_left; \ |
572 | UINT f_right; \ | |
573 | UINT f_left_right; \ | |
c7e628df | 574 | UINT f_ext; \ |
cbb38b47 BE |
575 | UINT f_dest; \ |
576 | UINT f_rsvd; \ | |
577 | unsigned int length; | |
578 | #define EXTRACT_IFMT_FMOVDQ_CODE \ | |
579 | length = 4; \ | |
c7e628df DB |
580 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
581 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
582 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
cbb38b47 | 583 | f_left_right = f_left;\ |
c7e628df DB |
584 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ |
585 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
586 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
587 | |
588 | #define EXTRACT_IFMT_FMOVLS_VARS \ | |
589 | UINT f_op; \ | |
590 | UINT f_left; \ | |
591 | UINT f_ext; \ | |
592 | UINT f_right; \ | |
593 | UINT f_dest; \ | |
594 | UINT f_rsvd; \ | |
595 | unsigned int length; | |
596 | #define EXTRACT_IFMT_FMOVLS_CODE \ | |
597 | length = 4; \ | |
c7e628df DB |
598 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
599 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
600 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
601 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
602 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
603 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
604 | |
605 | #define EXTRACT_IFMT_FMOVSL_VARS \ | |
606 | UINT f_op; \ | |
cbb38b47 BE |
607 | UINT f_left; \ |
608 | UINT f_right; \ | |
609 | UINT f_left_right; \ | |
c7e628df | 610 | UINT f_ext; \ |
cbb38b47 BE |
611 | UINT f_dest; \ |
612 | UINT f_rsvd; \ | |
613 | unsigned int length; | |
614 | #define EXTRACT_IFMT_FMOVSL_CODE \ | |
615 | length = 4; \ | |
c7e628df DB |
616 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
617 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
618 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
cbb38b47 | 619 | f_left_right = f_left;\ |
c7e628df DB |
620 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ |
621 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
622 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
623 | |
624 | #define EXTRACT_IFMT_FPUTSCR_VARS \ | |
625 | UINT f_op; \ | |
cbb38b47 BE |
626 | UINT f_left; \ |
627 | UINT f_right; \ | |
628 | UINT f_left_right; \ | |
c7e628df | 629 | UINT f_ext; \ |
cbb38b47 BE |
630 | UINT f_dest; \ |
631 | UINT f_rsvd; \ | |
632 | unsigned int length; | |
633 | #define EXTRACT_IFMT_FPUTSCR_CODE \ | |
634 | length = 4; \ | |
c7e628df DB |
635 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
636 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
637 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
cbb38b47 | 638 | f_left_right = f_left;\ |
c7e628df DB |
639 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ |
640 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
641 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
642 | |
643 | #define EXTRACT_IFMT_FSTXD_VARS \ | |
644 | UINT f_op; \ | |
645 | UINT f_left; \ | |
646 | UINT f_ext; \ | |
647 | UINT f_right; \ | |
648 | UINT f_dest; \ | |
649 | UINT f_rsvd; \ | |
650 | unsigned int length; | |
651 | #define EXTRACT_IFMT_FSTXD_CODE \ | |
652 | length = 4; \ | |
c7e628df DB |
653 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
654 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
655 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
656 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
657 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
658 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
659 | |
660 | #define EXTRACT_IFMT_FTRVS_VARS \ | |
661 | UINT f_op; \ | |
662 | UINT f_left; \ | |
663 | UINT f_ext; \ | |
664 | UINT f_right; \ | |
665 | UINT f_dest; \ | |
666 | UINT f_rsvd; \ | |
667 | unsigned int length; | |
668 | #define EXTRACT_IFMT_FTRVS_CODE \ | |
669 | length = 4; \ | |
c7e628df DB |
670 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
671 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
672 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
673 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
674 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
675 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
676 | |
677 | #define EXTRACT_IFMT_GETCFG_VARS \ | |
678 | UINT f_op; \ | |
679 | UINT f_left; \ | |
680 | UINT f_ext; \ | |
681 | INT f_disp6; \ | |
682 | UINT f_dest; \ | |
683 | UINT f_rsvd; \ | |
684 | unsigned int length; | |
685 | #define EXTRACT_IFMT_GETCFG_CODE \ | |
686 | length = 4; \ | |
c7e628df DB |
687 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
688 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
689 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
62836bf4 | 690 | f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6); \ |
c7e628df DB |
691 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
692 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
693 | |
694 | #define EXTRACT_IFMT_GETCON_VARS \ | |
695 | UINT f_op; \ | |
696 | UINT f_left; \ | |
697 | UINT f_ext; \ | |
698 | UINT f_right; \ | |
699 | UINT f_dest; \ | |
700 | UINT f_rsvd; \ | |
701 | unsigned int length; | |
702 | #define EXTRACT_IFMT_GETCON_CODE \ | |
703 | length = 4; \ | |
c7e628df DB |
704 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
705 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
706 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
707 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
708 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
709 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
710 | |
711 | #define EXTRACT_IFMT_LDL_VARS \ | |
712 | UINT f_op; \ | |
713 | UINT f_left; \ | |
714 | SI f_disp10x4; \ | |
715 | UINT f_dest; \ | |
716 | UINT f_rsvd; \ | |
717 | unsigned int length; | |
718 | #define EXTRACT_IFMT_LDL_CODE \ | |
719 | length = 4; \ | |
c7e628df DB |
720 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
721 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
62836bf4 | 722 | f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2)); \ |
c7e628df DB |
723 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
724 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
725 | |
726 | #define EXTRACT_IFMT_LDQ_VARS \ | |
727 | UINT f_op; \ | |
728 | UINT f_left; \ | |
729 | SI f_disp10x8; \ | |
730 | UINT f_dest; \ | |
731 | UINT f_rsvd; \ | |
732 | unsigned int length; | |
733 | #define EXTRACT_IFMT_LDQ_CODE \ | |
734 | length = 4; \ | |
c7e628df DB |
735 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
736 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
62836bf4 | 737 | f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \ |
c7e628df DB |
738 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
739 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
740 | |
741 | #define EXTRACT_IFMT_MMACNFX_WL_VARS \ | |
742 | UINT f_op; \ | |
743 | UINT f_ext; \ | |
744 | UINT f_right; \ | |
745 | UINT f_right; \ | |
746 | UINT f_dest; \ | |
747 | UINT f_rsvd; \ | |
748 | unsigned int length; | |
749 | #define EXTRACT_IFMT_MMACNFX_WL_CODE \ | |
750 | length = 4; \ | |
c7e628df DB |
751 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
752 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
753 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
754 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
755 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
756 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
757 | |
758 | #define EXTRACT_IFMT_MOVI_VARS \ | |
759 | UINT f_op; \ | |
760 | INT f_imm16; \ | |
761 | UINT f_dest; \ | |
762 | UINT f_rsvd; \ | |
763 | unsigned int length; | |
764 | #define EXTRACT_IFMT_MOVI_CODE \ | |
765 | length = 4; \ | |
c7e628df | 766 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
62836bf4 | 767 | f_imm16 = EXTRACT_MSB0_SINT (insn, 32, 6, 16); \ |
c7e628df DB |
768 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
769 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
770 | |
771 | #define EXTRACT_IFMT_ORI_VARS \ | |
772 | UINT f_op; \ | |
773 | UINT f_left; \ | |
774 | INT f_imm10; \ | |
775 | UINT f_dest; \ | |
776 | UINT f_rsvd; \ | |
777 | unsigned int length; | |
778 | #define EXTRACT_IFMT_ORI_CODE \ | |
779 | length = 4; \ | |
c7e628df DB |
780 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
781 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
62836bf4 | 782 | f_imm10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10); \ |
c7e628df DB |
783 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
784 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
785 | |
786 | #define EXTRACT_IFMT_PREFI_VARS \ | |
787 | UINT f_op; \ | |
788 | UINT f_left; \ | |
789 | UINT f_ext; \ | |
790 | SI f_disp6x32; \ | |
791 | UINT f_right; \ | |
792 | UINT f_rsvd; \ | |
793 | unsigned int length; | |
794 | #define EXTRACT_IFMT_PREFI_CODE \ | |
795 | length = 4; \ | |
c7e628df DB |
796 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
797 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
798 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
62836bf4 | 799 | f_disp6x32 = ((EXTRACT_MSB0_SINT (insn, 32, 16, 6)) << (5)); \ |
c7e628df DB |
800 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ |
801 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
802 | |
803 | #define EXTRACT_IFMT_PTA_VARS \ | |
804 | UINT f_op; \ | |
805 | DI f_disp16; \ | |
806 | UINT f_likely; \ | |
c7e628df | 807 | UINT f_23_2; \ |
cbb38b47 BE |
808 | UINT f_tra; \ |
809 | UINT f_rsvd; \ | |
810 | unsigned int length; | |
811 | #define EXTRACT_IFMT_PTA_CODE \ | |
812 | length = 4; \ | |
c7e628df | 813 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
62836bf4 | 814 | f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 6, 16)) << (2))) + (pc)); \ |
c7e628df DB |
815 | f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \ |
816 | f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \ | |
817 | f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \ | |
818 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
819 | |
820 | #define EXTRACT_IFMT_PTABS_VARS \ | |
821 | UINT f_op; \ | |
822 | UINT f_left; \ | |
823 | UINT f_ext; \ | |
824 | UINT f_right; \ | |
825 | UINT f_likely; \ | |
c7e628df | 826 | UINT f_23_2; \ |
cbb38b47 BE |
827 | UINT f_tra; \ |
828 | UINT f_rsvd; \ | |
829 | unsigned int length; | |
830 | #define EXTRACT_IFMT_PTABS_CODE \ | |
831 | length = 4; \ | |
c7e628df DB |
832 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
833 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
834 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
835 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
836 | f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \ | |
837 | f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \ | |
838 | f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \ | |
839 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
840 | |
841 | #define EXTRACT_IFMT_PUTCON_VARS \ | |
842 | UINT f_op; \ | |
843 | UINT f_left; \ | |
844 | UINT f_ext; \ | |
845 | UINT f_right; \ | |
846 | UINT f_dest; \ | |
847 | UINT f_rsvd; \ | |
848 | unsigned int length; | |
849 | #define EXTRACT_IFMT_PUTCON_CODE \ | |
850 | length = 4; \ | |
c7e628df DB |
851 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
852 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
853 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
854 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
855 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
856 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
857 | |
858 | #define EXTRACT_IFMT_SHARI_VARS \ | |
859 | UINT f_op; \ | |
860 | UINT f_left; \ | |
861 | UINT f_ext; \ | |
862 | UINT f_uimm6; \ | |
863 | UINT f_dest; \ | |
864 | UINT f_rsvd; \ | |
865 | unsigned int length; | |
866 | #define EXTRACT_IFMT_SHARI_CODE \ | |
867 | length = 4; \ | |
c7e628df DB |
868 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
869 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
870 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
871 | f_uimm6 = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
872 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
873 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
874 | |
875 | #define EXTRACT_IFMT_SHORI_VARS \ | |
876 | UINT f_op; \ | |
877 | UINT f_uimm16; \ | |
878 | UINT f_dest; \ | |
879 | UINT f_rsvd; \ | |
880 | unsigned int length; | |
881 | #define EXTRACT_IFMT_SHORI_CODE \ | |
882 | length = 4; \ | |
c7e628df DB |
883 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
884 | f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 6, 16); \ | |
885 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
886 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
887 | |
888 | #define EXTRACT_IFMT_STW_VARS \ | |
889 | UINT f_op; \ | |
890 | UINT f_left; \ | |
891 | SI f_disp10x2; \ | |
892 | UINT f_dest; \ | |
893 | UINT f_rsvd; \ | |
894 | unsigned int length; | |
895 | #define EXTRACT_IFMT_STW_CODE \ | |
896 | length = 4; \ | |
c7e628df DB |
897 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
898 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
62836bf4 | 899 | f_disp10x2 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (1)); \ |
c7e628df DB |
900 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ |
901 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
902 | |
903 | #define EXTRACT_IFMT_TRAPA_VARS \ | |
904 | UINT f_op; \ | |
905 | UINT f_left; \ | |
906 | UINT f_ext; \ | |
907 | UINT f_right; \ | |
908 | UINT f_dest; \ | |
909 | UINT f_rsvd; \ | |
910 | unsigned int length; | |
911 | #define EXTRACT_IFMT_TRAPA_CODE \ | |
912 | length = 4; \ | |
c7e628df DB |
913 | f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \ |
914 | f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \ | |
915 | f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \ | |
916 | f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \ | |
917 | f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \ | |
918 | f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \ | |
cbb38b47 BE |
919 | |
920 | #endif /* DEFS_SH64_MEDIA_H */ |