1 /* ISA definitions header for media.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2010 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
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)
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.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
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_MSB0_UINT (insn, 32, 0, 6); \
180 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
181 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
182 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
183 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
184 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
186 #define EXTRACT_IFMT_ADDI_VARS \
193 #define EXTRACT_IFMT_ADDI_CODE \
195 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
196 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
197 f_disp10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10); \
198 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
199 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
201 #define EXTRACT_IFMT_ALLOCO_VARS \
209 #define EXTRACT_IFMT_ALLOCO_CODE \
211 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
212 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
213 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
214 f_disp6x32 = ((EXTRACT_MSB0_SINT (insn, 32, 16, 6)) << (5)); \
215 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
216 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
218 #define EXTRACT_IFMT_BEQ_VARS \
228 #define EXTRACT_IFMT_BEQ_CODE \
230 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
231 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
232 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
233 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
234 f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
235 f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
236 f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
237 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
239 #define EXTRACT_IFMT_BEQI_VARS \
249 #define EXTRACT_IFMT_BEQI_CODE \
251 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
252 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
253 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
254 f_imm6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6); \
255 f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
256 f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
257 f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
258 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
260 #define EXTRACT_IFMT_BLINK_VARS \
269 #define EXTRACT_IFMT_BLINK_CODE \
271 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
272 f_6_3 = EXTRACT_MSB0_UINT (insn, 32, 6, 3); \
273 f_trb = EXTRACT_MSB0_UINT (insn, 32, 9, 3); \
274 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
275 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
276 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
277 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
279 #define EXTRACT_IFMT_BRK_VARS \
287 #define EXTRACT_IFMT_BRK_CODE \
289 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
290 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
291 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
292 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
293 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
294 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
296 #define EXTRACT_IFMT_BYTEREV_VARS \
304 #define EXTRACT_IFMT_BYTEREV_CODE \
306 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
307 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
308 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
309 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
310 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
311 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
313 #define EXTRACT_IFMT_FABSD_VARS \
322 #define EXTRACT_IFMT_FABSD_CODE \
324 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
325 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
326 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
327 f_left_right = f_left;\
328 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
329 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
330 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
332 #define EXTRACT_IFMT_FABSS_VARS \
341 #define EXTRACT_IFMT_FABSS_CODE \
343 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
344 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
345 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
346 f_left_right = f_left;\
347 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
348 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
349 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
351 #define EXTRACT_IFMT_FADDD_VARS \
359 #define EXTRACT_IFMT_FADDD_CODE \
361 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
362 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
363 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
364 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
365 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
366 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
368 #define EXTRACT_IFMT_FADDS_VARS \
376 #define EXTRACT_IFMT_FADDS_CODE \
378 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
379 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
380 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
381 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
382 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
383 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
385 #define EXTRACT_IFMT_FCMPEQD_VARS \
393 #define EXTRACT_IFMT_FCMPEQD_CODE \
395 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
396 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
397 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
398 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
399 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
400 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
402 #define EXTRACT_IFMT_FCMPEQS_VARS \
410 #define EXTRACT_IFMT_FCMPEQS_CODE \
412 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
413 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
414 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
415 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
416 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
417 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
419 #define EXTRACT_IFMT_FCNVDS_VARS \
428 #define EXTRACT_IFMT_FCNVDS_CODE \
430 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
431 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
432 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
433 f_left_right = f_left;\
434 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
435 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
436 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
438 #define EXTRACT_IFMT_FCNVSD_VARS \
447 #define EXTRACT_IFMT_FCNVSD_CODE \
449 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
450 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
451 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
452 f_left_right = f_left;\
453 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
454 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
455 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
457 #define EXTRACT_IFMT_FGETSCR_VARS \
465 #define EXTRACT_IFMT_FGETSCR_CODE \
467 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
468 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
469 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
470 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
471 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
472 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
474 #define EXTRACT_IFMT_FIPRS_VARS \
482 #define EXTRACT_IFMT_FIPRS_CODE \
484 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
485 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
486 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
487 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
488 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
489 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
491 #define EXTRACT_IFMT_FLDD_VARS \
498 #define EXTRACT_IFMT_FLDD_CODE \
500 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
501 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
502 f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
503 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
504 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
506 #define EXTRACT_IFMT_FLDP_VARS \
513 #define EXTRACT_IFMT_FLDP_CODE \
515 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
516 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
517 f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
518 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
519 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
521 #define EXTRACT_IFMT_FLDS_VARS \
528 #define EXTRACT_IFMT_FLDS_CODE \
530 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
531 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
532 f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2)); \
533 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
534 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
536 #define EXTRACT_IFMT_FLDXD_VARS \
544 #define EXTRACT_IFMT_FLDXD_CODE \
546 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
547 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
548 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
549 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
550 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
551 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
553 #define EXTRACT_IFMT_FLDXP_VARS \
561 #define EXTRACT_IFMT_FLDXP_CODE \
563 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
564 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
565 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
566 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
567 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
568 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
570 #define EXTRACT_IFMT_FMOVDQ_VARS \
579 #define EXTRACT_IFMT_FMOVDQ_CODE \
581 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
582 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
583 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
584 f_left_right = f_left;\
585 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
586 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
587 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
589 #define EXTRACT_IFMT_FMOVLS_VARS \
597 #define EXTRACT_IFMT_FMOVLS_CODE \
599 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
600 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
601 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
602 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
603 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
604 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
606 #define EXTRACT_IFMT_FMOVSL_VARS \
615 #define EXTRACT_IFMT_FMOVSL_CODE \
617 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
618 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
619 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
620 f_left_right = f_left;\
621 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
622 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
623 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
625 #define EXTRACT_IFMT_FPUTSCR_VARS \
634 #define EXTRACT_IFMT_FPUTSCR_CODE \
636 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
637 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
638 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
639 f_left_right = f_left;\
640 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
641 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
642 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
644 #define EXTRACT_IFMT_FSTXD_VARS \
652 #define EXTRACT_IFMT_FSTXD_CODE \
654 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
655 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
656 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
657 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
658 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
659 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
661 #define EXTRACT_IFMT_FTRVS_VARS \
669 #define EXTRACT_IFMT_FTRVS_CODE \
671 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
672 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
673 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
674 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
675 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
676 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
678 #define EXTRACT_IFMT_GETCFG_VARS \
686 #define EXTRACT_IFMT_GETCFG_CODE \
688 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
689 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
690 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
691 f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6); \
692 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
693 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
695 #define EXTRACT_IFMT_GETCON_VARS \
703 #define EXTRACT_IFMT_GETCON_CODE \
705 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
706 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
707 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
708 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
709 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
710 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
712 #define EXTRACT_IFMT_LDL_VARS \
719 #define EXTRACT_IFMT_LDL_CODE \
721 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
722 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
723 f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2)); \
724 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
725 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
727 #define EXTRACT_IFMT_LDQ_VARS \
734 #define EXTRACT_IFMT_LDQ_CODE \
736 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
737 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
738 f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
739 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
740 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
742 #define EXTRACT_IFMT_MMACNFX_WL_VARS \
750 #define EXTRACT_IFMT_MMACNFX_WL_CODE \
752 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
753 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
754 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
755 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
756 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
757 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
759 #define EXTRACT_IFMT_MOVI_VARS \
765 #define EXTRACT_IFMT_MOVI_CODE \
767 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
768 f_imm16 = EXTRACT_MSB0_SINT (insn, 32, 6, 16); \
769 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
770 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
772 #define EXTRACT_IFMT_ORI_VARS \
779 #define EXTRACT_IFMT_ORI_CODE \
781 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
782 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
783 f_imm10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10); \
784 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
785 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
787 #define EXTRACT_IFMT_PREFI_VARS \
795 #define EXTRACT_IFMT_PREFI_CODE \
797 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
798 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
799 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
800 f_disp6x32 = ((EXTRACT_MSB0_SINT (insn, 32, 16, 6)) << (5)); \
801 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
802 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
804 #define EXTRACT_IFMT_PTA_VARS \
812 #define EXTRACT_IFMT_PTA_CODE \
814 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
815 f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 6, 16)) << (2))) + (pc)); \
816 f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
817 f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
818 f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
819 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
821 #define EXTRACT_IFMT_PTABS_VARS \
831 #define EXTRACT_IFMT_PTABS_CODE \
833 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
834 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
835 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
836 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
837 f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
838 f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
839 f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
840 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
842 #define EXTRACT_IFMT_PUTCON_VARS \
850 #define EXTRACT_IFMT_PUTCON_CODE \
852 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
853 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
854 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
855 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
856 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
857 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
859 #define EXTRACT_IFMT_SHARI_VARS \
867 #define EXTRACT_IFMT_SHARI_CODE \
869 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
870 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
871 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
872 f_uimm6 = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
873 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
874 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
876 #define EXTRACT_IFMT_SHORI_VARS \
882 #define EXTRACT_IFMT_SHORI_CODE \
884 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
885 f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 6, 16); \
886 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
887 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
889 #define EXTRACT_IFMT_STW_VARS \
896 #define EXTRACT_IFMT_STW_CODE \
898 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
899 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
900 f_disp10x2 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (1)); \
901 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
902 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
904 #define EXTRACT_IFMT_TRAPA_VARS \
912 #define EXTRACT_IFMT_TRAPA_CODE \
914 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
915 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
916 f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
917 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
918 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
919 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
921 #endif /* DEFS_SH64_MEDIA_H */
This page took 0.048458 seconds and 4 git commands to generate.