1 /* ISA definitions header for media.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2014 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, see <http://www.gnu.org/licenses/>.
24 #ifndef DEFS_SH64_MEDIA_H
25 #define DEFS_SH64_MEDIA_H
27 /* Instruction argument buffer. */
30 struct { /* no operands */
109 /* Writeback handler. */
111 /* Pointer to argbuf entry for insn whose results need writing back. */
112 const struct argbuf
*abuf
;
114 /* x-before handler */
116 /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
119 /* x-after handler */
123 /* This entry is used to terminate each pbb. */
125 /* Number of insns in pbb. */
127 /* Next pbb to execute. */
129 SCACHE
*branch_target
;
134 /* The ARGBUF struct. */
136 /* These are the baseclass definitions. */
141 /* ??? Temporary hack for skip insns. */
144 /* cpu specific data follows */
147 union sem_fields fields
;
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. */
157 struct argbuf argbuf
;
160 /* Macros to simplify extraction, reading and semantic code.
161 These define and assign the local vars that contain the insn's fields. */
163 #define EXTRACT_IFMT_EMPTY_VARS \
165 #define EXTRACT_IFMT_EMPTY_CODE \
168 #define EXTRACT_IFMT_ADD_VARS \
176 #define EXTRACT_IFMT_ADD_CODE \
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); \
185 #define EXTRACT_IFMT_ADDI_VARS \
192 #define EXTRACT_IFMT_ADDI_CODE \
194 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
195 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
196 f_disp10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10); \
197 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
198 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
200 #define EXTRACT_IFMT_ALLOCO_VARS \
208 #define EXTRACT_IFMT_ALLOCO_CODE \
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); \
213 f_disp6x32 = ((EXTRACT_MSB0_SINT (insn, 32, 16, 6)) << (5)); \
214 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
215 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
217 #define EXTRACT_IFMT_BEQ_VARS \
227 #define EXTRACT_IFMT_BEQ_CODE \
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); \
238 #define EXTRACT_IFMT_BEQI_VARS \
248 #define EXTRACT_IFMT_BEQI_CODE \
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); \
253 f_imm6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6); \
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); \
259 #define EXTRACT_IFMT_BLINK_VARS \
268 #define EXTRACT_IFMT_BLINK_CODE \
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); \
278 #define EXTRACT_IFMT_BRK_VARS \
286 #define EXTRACT_IFMT_BRK_CODE \
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); \
295 #define EXTRACT_IFMT_BYTEREV_VARS \
303 #define EXTRACT_IFMT_BYTEREV_CODE \
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); \
312 #define EXTRACT_IFMT_FABSD_VARS \
321 #define EXTRACT_IFMT_FABSD_CODE \
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); \
326 f_left_right = f_left;\
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); \
331 #define EXTRACT_IFMT_FABSS_VARS \
340 #define EXTRACT_IFMT_FABSS_CODE \
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); \
345 f_left_right = f_left;\
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); \
350 #define EXTRACT_IFMT_FADDD_VARS \
358 #define EXTRACT_IFMT_FADDD_CODE \
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); \
367 #define EXTRACT_IFMT_FADDS_VARS \
375 #define EXTRACT_IFMT_FADDS_CODE \
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); \
384 #define EXTRACT_IFMT_FCMPEQD_VARS \
392 #define EXTRACT_IFMT_FCMPEQD_CODE \
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); \
401 #define EXTRACT_IFMT_FCMPEQS_VARS \
409 #define EXTRACT_IFMT_FCMPEQS_CODE \
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); \
418 #define EXTRACT_IFMT_FCNVDS_VARS \
427 #define EXTRACT_IFMT_FCNVDS_CODE \
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); \
432 f_left_right = f_left;\
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); \
437 #define EXTRACT_IFMT_FCNVSD_VARS \
446 #define EXTRACT_IFMT_FCNVSD_CODE \
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); \
451 f_left_right = f_left;\
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); \
456 #define EXTRACT_IFMT_FGETSCR_VARS \
464 #define EXTRACT_IFMT_FGETSCR_CODE \
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); \
473 #define EXTRACT_IFMT_FIPRS_VARS \
481 #define EXTRACT_IFMT_FIPRS_CODE \
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); \
490 #define EXTRACT_IFMT_FLDD_VARS \
497 #define EXTRACT_IFMT_FLDD_CODE \
499 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
500 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
501 f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
502 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
503 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
505 #define EXTRACT_IFMT_FLDP_VARS \
512 #define EXTRACT_IFMT_FLDP_CODE \
514 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
515 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
516 f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
517 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
518 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
520 #define EXTRACT_IFMT_FLDS_VARS \
527 #define EXTRACT_IFMT_FLDS_CODE \
529 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
530 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
531 f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2)); \
532 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
533 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
535 #define EXTRACT_IFMT_FLDXD_VARS \
543 #define EXTRACT_IFMT_FLDXD_CODE \
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); \
552 #define EXTRACT_IFMT_FLDXP_VARS \
560 #define EXTRACT_IFMT_FLDXP_CODE \
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); \
569 #define EXTRACT_IFMT_FMOVDQ_VARS \
578 #define EXTRACT_IFMT_FMOVDQ_CODE \
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); \
583 f_left_right = f_left;\
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); \
588 #define EXTRACT_IFMT_FMOVLS_VARS \
596 #define EXTRACT_IFMT_FMOVLS_CODE \
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); \
605 #define EXTRACT_IFMT_FMOVSL_VARS \
614 #define EXTRACT_IFMT_FMOVSL_CODE \
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); \
619 f_left_right = f_left;\
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); \
624 #define EXTRACT_IFMT_FPUTSCR_VARS \
633 #define EXTRACT_IFMT_FPUTSCR_CODE \
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); \
638 f_left_right = f_left;\
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); \
643 #define EXTRACT_IFMT_FSTXD_VARS \
651 #define EXTRACT_IFMT_FSTXD_CODE \
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); \
660 #define EXTRACT_IFMT_FTRVS_VARS \
668 #define EXTRACT_IFMT_FTRVS_CODE \
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); \
677 #define EXTRACT_IFMT_GETCFG_VARS \
685 #define EXTRACT_IFMT_GETCFG_CODE \
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); \
690 f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6); \
691 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
692 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
694 #define EXTRACT_IFMT_GETCON_VARS \
702 #define EXTRACT_IFMT_GETCON_CODE \
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); \
711 #define EXTRACT_IFMT_LDL_VARS \
718 #define EXTRACT_IFMT_LDL_CODE \
720 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
721 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
722 f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2)); \
723 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
724 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
726 #define EXTRACT_IFMT_LDQ_VARS \
733 #define EXTRACT_IFMT_LDQ_CODE \
735 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
736 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
737 f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
738 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
739 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
741 #define EXTRACT_IFMT_MMACNFX_WL_VARS \
749 #define EXTRACT_IFMT_MMACNFX_WL_CODE \
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); \
758 #define EXTRACT_IFMT_MOVI_VARS \
764 #define EXTRACT_IFMT_MOVI_CODE \
766 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
767 f_imm16 = EXTRACT_MSB0_SINT (insn, 32, 6, 16); \
768 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
769 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
771 #define EXTRACT_IFMT_ORI_VARS \
778 #define EXTRACT_IFMT_ORI_CODE \
780 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
781 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
782 f_imm10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10); \
783 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
784 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
786 #define EXTRACT_IFMT_PREFI_VARS \
794 #define EXTRACT_IFMT_PREFI_CODE \
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); \
799 f_disp6x32 = ((EXTRACT_MSB0_SINT (insn, 32, 16, 6)) << (5)); \
800 f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
801 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
803 #define EXTRACT_IFMT_PTA_VARS \
811 #define EXTRACT_IFMT_PTA_CODE \
813 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
814 f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 6, 16)) << (2))) + (pc)); \
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); \
820 #define EXTRACT_IFMT_PTABS_VARS \
830 #define EXTRACT_IFMT_PTABS_CODE \
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); \
841 #define EXTRACT_IFMT_PUTCON_VARS \
849 #define EXTRACT_IFMT_PUTCON_CODE \
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); \
858 #define EXTRACT_IFMT_SHARI_VARS \
866 #define EXTRACT_IFMT_SHARI_CODE \
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); \
875 #define EXTRACT_IFMT_SHORI_VARS \
881 #define EXTRACT_IFMT_SHORI_CODE \
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); \
888 #define EXTRACT_IFMT_STW_VARS \
895 #define EXTRACT_IFMT_STW_CODE \
897 f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
898 f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
899 f_disp10x2 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (1)); \
900 f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
901 f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
903 #define EXTRACT_IFMT_TRAPA_VARS \
911 #define EXTRACT_IFMT_TRAPA_CODE \
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); \
920 #endif /* DEFS_SH64_MEDIA_H */
This page took 0.047885 seconds and 4 git commands to generate.