1 /* ISA definitions header for media.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 This file is part of the GNU Simulators.
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)
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.
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.
25 #ifndef DEFS_SH64_MEDIA_H
26 #define DEFS_SH64_MEDIA_H
28 /* Instruction argument buffer. */
31 struct { /* no operands */
110 /* Writeback handler. */
112 /* Pointer to argbuf entry for insn whose results need writing back. */
113 const struct argbuf *abuf;
115 /* x-before handler */
117 /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
120 /* x-after handler */
124 /* This entry is used to terminate each pbb. */
126 /* Number of insns in pbb. */
128 /* Next pbb to execute. */
130 SCACHE *branch_target;
135 /* The ARGBUF struct. */
137 /* These are the baseclass definitions. */
142 /* ??? Temporary hack for skip insns. */
145 /* cpu specific data follows */
148 union sem_fields fields;
153 ??? SCACHE used to contain more than just argbuf. We could delete the
154 type entirely and always just use ARGBUF, but for future concerns and as
155 a level of abstraction it is left in. */
158 struct argbuf argbuf;
161 /* Macros to simplify extraction, reading and semantic code.
162 These define and assign the local vars that contain the insn's fields. */
164 #define EXTRACT_IFMT_EMPTY_VARS \
166 #define EXTRACT_IFMT_EMPTY_CODE \
169 #define EXTRACT_IFMT_ADD_VARS \
177 #define EXTRACT_IFMT_ADD_CODE \
179 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
180 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
181 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
182 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
183 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
184 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
186 #define EXTRACT_IFMT_ADDI_VARS \
193 #define EXTRACT_IFMT_ADDI_CODE \
195 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
196 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
197 f_disp10 = EXTRACT_LSB0_INT (insn, 32, 19, 10); \
198 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
199 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
201 #define EXTRACT_IFMT_ALLOCO_VARS \
209 #define EXTRACT_IFMT_ALLOCO_CODE \
211 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
212 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
213 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
214 f_disp6x32 = ((EXTRACT_LSB0_INT (insn, 32, 15, 6)) << (5)); \
215 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
216 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
218 #define EXTRACT_IFMT_BEQ_VARS \
228 #define EXTRACT_IFMT_BEQ_CODE \
230 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
231 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
232 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
233 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
234 f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
235 f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
236 f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
237 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
239 #define EXTRACT_IFMT_BEQI_VARS \
249 #define EXTRACT_IFMT_BEQI_CODE \
251 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
252 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
253 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
254 f_imm6 = EXTRACT_LSB0_INT (insn, 32, 15, 6); \
255 f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
256 f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
257 f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
258 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
260 #define EXTRACT_IFMT_BLINK_VARS \
269 #define EXTRACT_IFMT_BLINK_CODE \
271 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
272 f_25 = EXTRACT_LSB0_UINT (insn, 32, 25, 3); \
273 f_trb = EXTRACT_LSB0_UINT (insn, 32, 22, 3); \
274 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
275 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
276 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
277 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
279 #define EXTRACT_IFMT_BRK_VARS \
287 #define EXTRACT_IFMT_BRK_CODE \
289 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
290 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
291 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
292 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
293 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
294 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
296 #define EXTRACT_IFMT_BYTEREV_VARS \
304 #define EXTRACT_IFMT_BYTEREV_CODE \
306 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
307 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
308 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
309 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
310 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
311 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
313 #define EXTRACT_IFMT_FABSD_VARS \
322 #define EXTRACT_IFMT_FABSD_CODE \
324 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
325 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
326 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
327 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
328 f_left_right = f_left;\
329 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
330 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
332 #define EXTRACT_IFMT_FABSS_VARS \
341 #define EXTRACT_IFMT_FABSS_CODE \
343 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
344 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
345 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
346 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
347 f_left_right = f_left;\
348 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
349 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
351 #define EXTRACT_IFMT_FADDD_VARS \
359 #define EXTRACT_IFMT_FADDD_CODE \
361 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
362 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
363 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
364 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
365 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
366 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
368 #define EXTRACT_IFMT_FADDS_VARS \
376 #define EXTRACT_IFMT_FADDS_CODE \
378 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
379 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
380 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
381 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
382 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
383 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
385 #define EXTRACT_IFMT_FCMPEQD_VARS \
393 #define EXTRACT_IFMT_FCMPEQD_CODE \
395 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
396 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
397 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
398 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
399 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
400 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
402 #define EXTRACT_IFMT_FCMPEQS_VARS \
410 #define EXTRACT_IFMT_FCMPEQS_CODE \
412 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
413 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
414 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
415 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
416 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
417 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
419 #define EXTRACT_IFMT_FCNVDS_VARS \
428 #define EXTRACT_IFMT_FCNVDS_CODE \
430 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
431 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
432 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
433 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
434 f_left_right = f_left;\
435 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
436 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
438 #define EXTRACT_IFMT_FCNVSD_VARS \
447 #define EXTRACT_IFMT_FCNVSD_CODE \
449 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
450 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
451 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
452 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
453 f_left_right = f_left;\
454 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
455 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
457 #define EXTRACT_IFMT_FGETSCR_VARS \
465 #define EXTRACT_IFMT_FGETSCR_CODE \
467 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
468 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
469 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
470 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
471 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
472 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
474 #define EXTRACT_IFMT_FIPRS_VARS \
482 #define EXTRACT_IFMT_FIPRS_CODE \
484 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
485 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
486 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
487 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
488 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
489 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
491 #define EXTRACT_IFMT_FLDD_VARS \
498 #define EXTRACT_IFMT_FLDD_CODE \
500 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
501 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
502 f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
503 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
504 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
506 #define EXTRACT_IFMT_FLDP_VARS \
513 #define EXTRACT_IFMT_FLDP_CODE \
515 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
516 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
517 f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
518 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
519 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
521 #define EXTRACT_IFMT_FLDS_VARS \
528 #define EXTRACT_IFMT_FLDS_CODE \
530 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
531 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
532 f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2)); \
533 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
534 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
536 #define EXTRACT_IFMT_FLDXD_VARS \
544 #define EXTRACT_IFMT_FLDXD_CODE \
546 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
547 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
548 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
549 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
550 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
551 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
553 #define EXTRACT_IFMT_FLDXP_VARS \
561 #define EXTRACT_IFMT_FLDXP_CODE \
563 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
564 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
565 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
566 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
567 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
568 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
570 #define EXTRACT_IFMT_FMOVDQ_VARS \
579 #define EXTRACT_IFMT_FMOVDQ_CODE \
581 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
582 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
583 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
584 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
585 f_left_right = f_left;\
586 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
587 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
589 #define EXTRACT_IFMT_FMOVLS_VARS \
597 #define EXTRACT_IFMT_FMOVLS_CODE \
599 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
600 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
601 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
602 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
603 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
604 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
606 #define EXTRACT_IFMT_FMOVSL_VARS \
615 #define EXTRACT_IFMT_FMOVSL_CODE \
617 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
618 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
619 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
620 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
621 f_left_right = f_left;\
622 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
623 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
625 #define EXTRACT_IFMT_FPUTSCR_VARS \
634 #define EXTRACT_IFMT_FPUTSCR_CODE \
636 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
637 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
638 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
639 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
640 f_left_right = f_left;\
641 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
642 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
644 #define EXTRACT_IFMT_FSTXD_VARS \
652 #define EXTRACT_IFMT_FSTXD_CODE \
654 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
655 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
656 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
657 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
658 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
659 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
661 #define EXTRACT_IFMT_FTRVS_VARS \
669 #define EXTRACT_IFMT_FTRVS_CODE \
671 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
672 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
673 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
674 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
675 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
676 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
678 #define EXTRACT_IFMT_GETCFG_VARS \
686 #define EXTRACT_IFMT_GETCFG_CODE \
688 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
689 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
690 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
691 f_disp6 = EXTRACT_LSB0_INT (insn, 32, 15, 6); \
692 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
693 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
695 #define EXTRACT_IFMT_GETCON_VARS \
703 #define EXTRACT_IFMT_GETCON_CODE \
705 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
706 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
707 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
708 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
709 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
710 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
712 #define EXTRACT_IFMT_LDL_VARS \
719 #define EXTRACT_IFMT_LDL_CODE \
721 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
722 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
723 f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2)); \
724 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
725 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
727 #define EXTRACT_IFMT_LDQ_VARS \
734 #define EXTRACT_IFMT_LDQ_CODE \
736 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
737 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
738 f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
739 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
740 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
742 #define EXTRACT_IFMT_MMACNFX_WL_VARS \
750 #define EXTRACT_IFMT_MMACNFX_WL_CODE \
752 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
753 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
754 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
755 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
756 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
757 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
759 #define EXTRACT_IFMT_MOVI_VARS \
765 #define EXTRACT_IFMT_MOVI_CODE \
767 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
768 f_imm16 = EXTRACT_LSB0_INT (insn, 32, 25, 16); \
769 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
770 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
772 #define EXTRACT_IFMT_ORI_VARS \
779 #define EXTRACT_IFMT_ORI_CODE \
781 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
782 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
783 f_imm10 = EXTRACT_LSB0_INT (insn, 32, 19, 10); \
784 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
785 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
787 #define EXTRACT_IFMT_PREFI_VARS \
795 #define EXTRACT_IFMT_PREFI_CODE \
797 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
798 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
799 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
800 f_disp6x32 = ((EXTRACT_LSB0_INT (insn, 32, 15, 6)) << (5)); \
801 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
802 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
804 #define EXTRACT_IFMT_PTA_VARS \
812 #define EXTRACT_IFMT_PTA_CODE \
814 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
815 f_disp16 = ((((EXTRACT_LSB0_INT (insn, 32, 25, 16)) << (2))) + (pc)); \
816 f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
817 f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
818 f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
819 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
821 #define EXTRACT_IFMT_PTABS_VARS \
831 #define EXTRACT_IFMT_PTABS_CODE \
833 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
834 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
835 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
836 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
837 f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
838 f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
839 f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
840 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
842 #define EXTRACT_IFMT_PUTCON_VARS \
850 #define EXTRACT_IFMT_PUTCON_CODE \
852 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
853 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
854 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
855 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
856 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
857 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
859 #define EXTRACT_IFMT_SHARI_VARS \
867 #define EXTRACT_IFMT_SHARI_CODE \
869 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
870 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
871 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
872 f_uimm6 = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
873 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
874 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
876 #define EXTRACT_IFMT_SHORI_VARS \
882 #define EXTRACT_IFMT_SHORI_CODE \
884 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
885 f_uimm16 = EXTRACT_LSB0_UINT (insn, 32, 25, 16); \
886 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
887 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
889 #define EXTRACT_IFMT_STW_VARS \
896 #define EXTRACT_IFMT_STW_CODE \
898 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
899 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
900 f_disp10x2 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (1)); \
901 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
902 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
904 #define EXTRACT_IFMT_TRAPA_VARS \
912 #define EXTRACT_IFMT_TRAPA_CODE \
914 f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
915 f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
916 f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
917 f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
918 f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
919 f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
921 #endif /* DEFS_SH64_MEDIA_H */