1 // Copyright (c) 2008 The Regents of The University of Michigan
2 // All rights reserved.
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are
6 // met: redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer;
8 // redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution;
11 // neither the name of the copyright holders nor the names of its
12 // contributors may be used to endorse or promote products derived from
13 // this software without specific prior written permission.
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 // Authors: Gabe Black
29 // Copyright (c) 2007-2008 The Hewlett-Packard Development Company
30 // All rights reserved.
32 // Redistribution and use of this software in source and binary forms,
33 // with or without modification, are permitted provided that the
34 // following conditions are met:
36 // The software must be used only for Non-Commercial Use which means any
37 // use which is NOT directed to receiving any direct monetary
38 // compensation for, or commercial advantage from such use. Illustrative
39 // examples of non-commercial use are academic research, personal study,
40 // teaching, education and corporate research & development.
41 // Illustrative examples of commercial use are distributing products for
42 // commercial advantage and providing services using the software for
43 // commercial advantage.
45 // If you wish to use this software or functionality therein that may be
46 // covered by patents for commercial use, please contact:
47 // Director of Intellectual Property Licensing
48 // Office of Strategy and Technology
49 // Hewlett-Packard Company
50 // 1501 Page Mill Road
51 // Palo Alto, California 94304
53 // Redistributions of source code must retain the above copyright notice,
54 // this list of conditions and the following disclaimer. Redistributions
55 // in binary form must reproduce the above copyright notice, this list of
56 // conditions and the following disclaimer in the documentation and/or
57 // other materials provided with the distribution. Neither the name of
58 // the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
59 // contributors may be used to endorse or promote products derived from
60 // this software without specific prior written permission. No right of
61 // sublicense is granted herewith. Derivatives of the software and
62 // output created using the software may be prepared, but only for
63 // Non-Commercial Uses. Derivatives of the software may be shared with
64 // others provided: (i) the others agree to abide by the list of
65 // conditions herein which includes the Non-Commercial Use restrictions;
66 // and (ii) such Derivatives of the software include the above copyright
67 // notice to acknowledge the contribution from this software where
68 // applicable, this list of conditions and the disclaimer below.
70 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
71 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
72 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
73 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
74 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
75 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
76 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
77 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
78 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
79 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
80 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
82 // Authors: Gabe Black
84 ////////////////////////////////////////////////////////////////////
86 // Decode the two byte opcodes
88 0x2: decode OPCODE_PREFIXA {
89 0x0F: decode OPCODE_OP_TOP5 {
91 0x00: decode OPCODE_OP_BOTTOM3 {
93 0x00: decode MODRM_REG {
100 //0x6: jmpe_Ev(); // IA-64
101 default: Inst::UD2();
103 //0x01: group7(); // Ugly, ugly, ugly...
104 0x01: decode MODRM_MOD {
105 0x3: decode MODRM_REG {
106 0x0: decode MODRM_RM {
111 default: Inst::UD2();
113 0x1: decode MODRM_RM {
116 default: Inst::UD2();
118 0x3: decode MODRM_RM {
130 0x7: decode MODRM_RM {
133 default: Inst::UD2();
135 default: Inst::UD2();
137 default: decode MODRM_REG {
140 0x2: decode MODE_SUBMODE {
142 default: decode OPSIZE {
143 // 16 bit operand sizes are special, but only
144 // in legacy and compatability modes.
145 0x2: Inst::LGDT_16(M);
146 default: Inst::LGDT(M);
149 0x3: decode MODE_SUBMODE {
151 default: decode OPSIZE {
152 // 16 bit operand sizes are special, but only
153 // in legacy and compatability modes.
154 0x2: Inst::LIDT_16(M);
155 default: Inst::LIDT(M);
160 0x7: Inst::INVLPG(M);
161 default: Inst::UD2();
166 //sandpile.org doesn't seem to know what this is... ?
167 0x04: loadall_or_reset_or_hang();
171 0x05: SyscallInst::syscall('xc->syscall(rax)', IsSyscall);
174 //sandpile.org says (AMD) after sysret, so I might want to check
175 //if that means amd64 or AMD machines
176 0x07: loadall_or_sysret();
178 0x01: decode OPCODE_OP_BOTTOM3 {
188 0x02: decode LEGACY_DECODEVAL {
190 0x0: decode OPCODE_OP_BOTTOM3 {
193 0x2: decode MODRM_MOD {
194 0x3: movhlps_Vq_VRq();
195 default: movlps_Vq_Mq();
200 0x6: decode MODRM_MOD {
201 0x3: movlhps_Vq_VRq();
202 default: movhps_Vq_Mq();
207 0x4: decode OPCODE_OP_BOTTOM3 {
210 0x2: movsldup_Vo_Wo();
211 0x6: movshdup_Vo_Wo();
212 default: Inst::UD2();
214 // operand size (0x66)
215 0x1: decode OPCODE_OP_BOTTOM3 {
218 0x2: Inst::MOVLPD(Vq,Mq);
219 0x3: Inst::MOVLPD(Mq,Vq);
220 0x4: unpcklpd_Vo_Wq();
221 0x5: unpckhpd_Vo_Wo();
226 0x8: decode OPCODE_OP_BOTTOM3 {
227 0x0: Inst::MOVSD(Vq,Wq);
228 0x1: Inst::MOVSD(Wq,Vq);
229 0x2: movddup_Vo_Wq();
230 default: Inst::UD2();
232 default: Inst::UD2();
234 0x03: decode OPCODE_OP_BOTTOM3 {
236 0x0: decode MODRM_REG {
241 default: Inst::HINT_NOP();
243 0x1: Inst::HINT_NOP();
244 0x2: Inst::HINT_NOP();
245 0x3: Inst::HINT_NOP();
246 0x4: Inst::HINT_NOP();
247 0x5: Inst::HINT_NOP();
248 0x6: Inst::HINT_NOP();
249 0x7: Inst::HINT_NOP();
251 0x04: decode LEGACY_DECODEVAL {
253 0x0: decode OPCODE_OP_BOTTOM3 {
254 0x0: Inst::MOV(Rd,Cd);
256 0x2: Inst::MOV(Cd,Rd);
260 default: Inst::UD2();
262 // lock prefix (0xF0)
263 0x2: decode OPCODE_OP_BOTTOM3 {
267 default: Inst::UD2();
269 0x05: decode LEGACY_DECODEVAL {
271 0x0: decode OPCODE_OP_BOTTOM3 {
272 //These moves should really use size o (octword), but
273 //because they are split in two, they use q (quadword).
274 0x0: Inst::MOVAPS(Vq,Wq);
275 0x1: Inst::MOVAPS(Wq,Vq);
276 0x2: decode MODRM_MOD {
277 0x3: cvtpi2pS_Vq_Pq();
278 default: cvtpi2ps_Vq_Mq();
280 0x3: movntps_Mo_Vo();
281 0x4: cvttps2pi_Pq_Wq();
282 0x5: cvtpS2pi_Pq_Wq();
283 0x6: ucomiss_Vd_Wd();
287 0x4: decode OPCODE_OP_BOTTOM3 {
288 0x2: cvtsi2ss_Vd_Ed();
289 0x4: cvttss2si_Gd_Wd();
290 0x5: cvtss2si_Gd_Wd();
291 default: Inst::UD2();
293 // operand size (0x66)
294 0x1: decode OPCODE_OP_BOTTOM3 {
297 0x2: decode MODRM_MOD {
298 0x3: cvtpi2pd_Vo_Pq();
299 default: cvtpi2pd_Vo_Mq();
301 0x3: movntpd_Mo_Vo();
302 0x4: cvttpd2pi_Pq_Wo();
303 0x5: cvtpd2pi_Pq_Wo();
304 0x6: Inst::UCOMISD(Vq,Wq);
308 0x8: decode OPCODE_OP_BOTTOM3 {
309 // The size of the V operand should be q, not dp
310 0x2: Inst::CVTSI2SD(Vdp,Edp);
311 // The size of the W operand should be q, not dp
312 0x4: Inst::CVTTSD2SI(Gdp,Wdp);
313 0x5: cvtsd2si_Gd_Wq();
314 default: Inst::UD2();
316 default: Inst::UD2();
318 0x06: decode OPCODE_OP_BOTTOM3 {
328 0x07: decode OPCODE_OP_BOTTOM3 {
329 0x0: three_byte_opcode();
330 0x1: three_byte_opcode();
331 0x2: three_byte_opcode();
332 0x3: three_byte_opcode();
333 0x4: three_byte_opcode();
334 0x5: three_byte_opcode();
335 0x6: three_byte_opcode();
336 0x7: three_byte_opcode();
339 0x08: decode OPCODE_OP_BOTTOM3 {
349 0x09: decode OPCODE_OP_BOTTOM3 {
360 0x0A: decode LEGACY_DECODEVAL {
362 0x0: decode OPCODE_OP_BOTTOM3 {
363 0x0: movmskps_Gd_VRo();
365 0x2: rqsrtps_Vo_Wo();
373 0x4: decode OPCODE_OP_BOTTOM3 {
375 0x2: rsqrtss_Vd_Wd();
377 default: Inst::UD2();
379 // operand size (0x66)
380 0x1: decode OPCODE_OP_BOTTOM3 {
381 0x0: movmskpd_Gd_VRo();
386 //This really should be type o, but it works on q sized
388 0x7: Inst::XORPD(Vq,Wq);
389 default: Inst::UD2();
393 0x8: decode OPCODE_OP_BOTTOM3 {
400 0x0B: decode LEGACY_DECODEVAL {
402 0x0: decode OPCODE_OP_BOTTOM3 {
405 0x2: cvtps2pd_Vo_Wq();
406 0x3: cvtdq2ps_Vo_Wo();
413 0x4: decode OPCODE_OP_BOTTOM3 {
416 0x2: cvtss2sd_Vq_Wd();
417 0x3: cvttps2dq_Vo_Wo();
423 // operand size (0x66)
424 0x1: decode OPCODE_OP_BOTTOM3 {
427 0x2: cvtpd2ps_Vo_Wo();
428 0x3: cvtps2dq_Vo_Wo();
435 0x8: decode OPCODE_OP_BOTTOM3 {
436 0x0: Inst::ADDSD(Vq,Wq);
437 0x1: Inst::MULSD(Vq,Wq);
438 0x2: cvtsd2ss_Vd_Wq();
439 0x4: Inst::SUBSD(Vq,Wq);
441 0x6: Inst::DIVSD(Vq,Wq);
443 default: Inst::UD2();
445 default: Inst::UD2();
447 0x0C: decode LEGACY_DECODEVAL {
449 0x0: decode OPCODE_OP_BOTTOM3 {
450 0x0: punpcklbw_Pq_Qd();
451 0x1: punpcklwd_Pq_Qd();
452 0x2: punpckldq_Pq_Qd();
453 0x3: packsswb_Pq_Qq();
454 0x4: pcmpgtb_Pq_Qq();
455 0x5: pcmpgtw_Pq_Qq();
456 0x6: pcmpgtd_Pq_Qq();
457 0x7: packuswb_Pq_Qq();
459 // operand size (0x66)
460 0x1: decode OPCODE_OP_BOTTOM3 {
461 0x0: punpcklbw_Vo_Wq();
462 0x1: punpcklwd_Vo_Wq();
463 0x2: punpckldq_Vo_Wq();
464 0x3: packsswb_Vo_Wo();
465 0x4: pcmpgtb_Vo_Wo();
466 0x5: pcmpgtw_Vo_Wo();
467 0x6: pcmpgtd_Vo_Wo();
468 0x7: packuswb_Vo_Wo();
470 default: Inst::UD2();
472 0x0D: decode LEGACY_DECODEVAL {
474 0x0: decode OPCODE_OP_BOTTOM3 {
475 0x0: punpckhbw_Pq_Qq();
476 0x1: punpckhwd_Pq_Qq();
477 0x2: punpckhdq_Pq_Qq();
478 0x3: packssdw_Pq_Qq();
481 default: Inst::UD2();
484 0x4: decode OPCODE_OP_BOTTOM3 {
486 default: Inst::UD2();
488 // operand size (0x66)
489 0x1: decode OPCODE_OP_BOTTOM3 {
490 0x0: punpckhbw_Vo_Wo();
491 0x1: punpckhwd_Vo_Wo();
492 0x2: punpckhdq_Vo_Wo();
493 0x3: packssdw_Vo_Wo();
494 0x4: punpcklqdq_Vo_Wq();
495 0x5: punpcklqdq_Vo_Wq();
499 default: Inst::UD2();
501 0x0E: decode LEGACY_DECODEVAL {
503 0x0: decode OPCODE_OP_BOTTOM3 {
504 0x0: pshufw_Pq_Qq_Ib();
505 //0x1: group13_pshimw();
506 0x1: decode MODRM_REG {
507 0x2: decode LEGACY_OP {
511 0x4: decode LEGACY_OP {
515 0x6: decode LEGACY_OP {
519 default: Inst::UD2();
521 //0x2: group14_pshimd();
522 0x2: decode MODRM_REG {
523 0x2: decode LEGACY_OP {
527 0x4: decode LEGACY_OP {
531 0x6: decode LEGACY_OP {
535 default: Inst::UD2();
537 //0x3: group15_pshimq();
538 0x3: decode MODRM_REG {
539 0x2: decode LEGACY_OP {
543 0x3: decode LEGACY_OP {
545 0x1: psrldq_VRo_Ib();
547 0x6: decode LEGACY_OP {
551 0x7: decode LEGACY_OP {
553 0x1: pslldq_VRo_Ib();
555 default: Inst::UD2();
557 0x4: pcmpeqb_Pq_Qq();
558 0x5: pcmpeqw_Pq_Qq();
559 0x6: pcmpeqd_Pq_Qq();
563 0x4: decode OPCODE_OP_BOTTOM3 {
564 0x0: pshufhw_Vo_Wo_Ib();
565 default: Inst::UD2();
567 // operand size (0x66)
568 0x1: decode OPCODE_OP_BOTTOM3 {
569 0x0: pshufd_Vo_Wo_Ib();
570 //0x1: group13_pshimw();
571 0x1: decode MODRM_REG {
572 0x2: decode LEGACY_OP {
576 0x4: decode LEGACY_OP {
580 0x6: decode LEGACY_OP {
584 default: Inst::UD2();
586 //0x2: group14_pshimd();
587 0x2: decode MODRM_REG {
588 0x2: decode LEGACY_OP {
592 0x4: decode LEGACY_OP {
596 0x6: decode LEGACY_OP {
600 default: Inst::UD2();
602 //0x3: group15_pshimq();
603 0x3: decode MODRM_REG {
604 0x2: decode LEGACY_OP {
608 0x3: decode LEGACY_OP {
610 0x1: psrldq_VRo_Ib();
612 0x6: decode LEGACY_OP {
616 0x7: decode LEGACY_OP {
618 0x1: pslldq_VRo_Ib();
620 default: Inst::UD2();
622 0x4: pcmpeqb_Vo_Wo();
623 0x5: pcmpeqw_Vo_Wo();
624 0x6: pcmpeqd_Vo_Wo();
625 default: Inst::UD2();
628 0x8: decode OPCODE_OP_BOTTOM3 {
629 0x0: pshuflw_Vo_Wo_Ib();
630 default: Inst::UD2();
632 default: Inst::UD2();
634 0x0F: decode LEGACY_DECODEVAL {
636 0x0: decode OPCODE_OP_BOTTOM3 {
637 0x0: vmread_Ed_or_Eq_Gd_or_Gq();
638 0x1: vmwrite_Gd_or_Gq_Ed_or_Eq();
641 default: Inst::UD2();
644 0x4: decode OPCODE_OP_BOTTOM3 {
645 0x6: movq_Vo_Mq_or_Vq_Vq();
647 default: Inst::UD2();
649 // operand size (0x66)
650 0x1: decode OPCODE_OP_BOTTOM3 {
655 default: Inst::UD2();
658 0x8: decode OPCODE_OP_BOTTOM3 {
661 default: Inst::UD2();
663 default: Inst::UD2();
666 0x10: decode OPCODE_OP_BOTTOM3 {
676 0x11: decode OPCODE_OP_BOTTOM3 {
686 0x12: decode OPCODE_OP_BOTTOM3 {
696 0x13: decode OPCODE_OP_BOTTOM3 {
707 0x14: decode OPCODE_OP_BOTTOM3 {
710 0x2: Inst::CPUID(rAd);
711 0x3: Inst::BT(Ev,Gv);
712 0x4: shld_Ev_Gv_Ib();
713 0x5: shld_Ev_Gv_rCl();
714 0x6: xbts_and_cmpxchg();
715 0x7: ibts_and_cmpxchg();
717 0x15: decode OPCODE_OP_BOTTOM3 {
721 0x3: Inst::BTS(Ev,Gv);
722 0x4: shrd_Ev_Gv_Ib();
723 0x5: shrd_Ev_Gv_rCl();
725 0x6: decode MODRM_MOD {
726 0x3: decode MODRM_REG {
730 default: Inst::UD2();
732 default: decode MODRM_REG {
736 default: Inst::UD2();
739 0x7: Inst::IMUL(Gv,Ev);
741 0x16: decode OPCODE_OP_BOTTOM3 {
742 0x0: Inst::CMPXCHG(Eb,Gb);
743 0x1: Inst::CMPXCHG(Ev,Gv);
745 0x3: Inst::BTR(Ev,Gv);
748 //The size of the second operand in these instructions should
749 //really be "b" or "w", but it's set to v in order to have a
750 //consistent register size. This shouldn't affect behavior.
751 0x6: Inst::MOVZX_B(Gv,Ev);
752 0x7: Inst::MOVZX_W(Gv,Ev);
754 0x17: decode OPCODE_OP_BOTTOM3 {
755 0x0: jmpe_Jz(); // IA-64?
757 //0x1: group11_UD2();
759 //0x2: group8_Ev_Ib();
760 0x2: decode MODRM_REG {
769 0x4: Inst::BSF(Gv,Ev);
770 0x5: Inst::BSR(Gv,Ev);
771 //The size of the second operand in these instructions should
772 //really be "b" or "w", but it's set to v in order to have a
773 //consistent register size. This shouldn't affect behavior.
774 0x6: Inst::MOVSX_B(Gv,Ev);
775 0x7: Inst::MOVSX_W(Gv,Ev);
777 0x18: decode OPCODE_OP_BOTTOM3 {
781 0x7: decode MODRM_REG {
783 0x6: decode LEGACY_OP {
785 default: decode LEGACY_REP {
791 default: Inst::UD2();
793 default: decode LEGACY_DECODEVAL {
795 0x0: decode OPCODE_OP_BOTTOM3 {
796 0x2: cmpccps_Vo_Wo_Ib();
797 0x3: cvtdq2ps_Vo_Wo();
803 0x4: decode OPCODE_OP_BOTTOM3 {
804 0x2: cmpccss_Vd_Wd_Ib();
805 default: Inst::UD2();
807 // operand size (0x66)
808 0x1: decode OPCODE_OP_BOTTOM3 {
809 0x2: cmpccpd_Vo_Wo_Ib();
813 default: Inst::UD2();
816 0x8: decode OPCODE_OP_BOTTOM3 {
817 0x2: cmpccsd_Vq_Wq_Ib();
818 default: Inst::UD2();
820 default: Inst::UD2();
824 0x1A: decode LEGACY_DECODEVAL {
826 0x0: decode OPCODE_OP_BOTTOM3 {
832 0x7: pmovmskb_Gd_PRq();
833 default: Inst::UD2();
836 0x4: decode OPCODE_OP_BOTTOM3 {
837 0x6: movq2dq_Vo_PRq();
838 default: Inst::UD2();
840 // operand size (0x66)
841 0x1: decode OPCODE_OP_BOTTOM3 {
842 0x0: addsubpd_Vo_Wo();
848 0x6: decode MODRM_MOD {
850 default: movq_Mq_Vq();
852 0x7: pmovmskb_Gd_VRo();
855 0x8: decode OPCODE_OP_BOTTOM3 {
856 0x0: addsubps_Vo_Wo();
857 0x6: movdq2q_Pq_VRq();
858 default: Inst::UD2();
860 default: Inst::UD2();
862 0x1B: decode LEGACY_DECODEVAL {
864 0x0: decode OPCODE_OP_BOTTOM3 {
865 0x0: psubusb_Pq_Qq();
866 0x1: psubusw_Pq_Qq();
869 0x4: paddusb_Pq_Qq();
870 0x5: paddusw_Pq_Qq();
874 // operand size (0x66)
875 0x1: decode OPCODE_OP_BOTTOM3 {
876 0x0: psubusb_Vo_Wo();
877 0x1: psubusw_Vo_Wo();
880 0x4: paddusb_Vo_Wo();
881 0x5: paddusw_Vo_Wo();
885 default: Inst::UD2();
887 0x1C: decode LEGACY_DECODEVAL {
889 0x0: decode OPCODE_OP_BOTTOM3 {
894 0x4: pmulhuw_Pq_Qq();
897 default: Inst::UD2();
900 0x4: decode OPCODE_OP_BOTTOM3 {
901 0x6: cvtdq2pd_Vo_Wq();
902 default: Inst::UD2();
904 // operand size (0x66)
905 0x1: decode OPCODE_OP_BOTTOM3 {
910 0x4: pmulhuw_Vo_Wo();
912 0x6: cvttpd2dq_Vo_Wo();
913 0x7: movntdq_Mo_Vo();
916 0x8: decode OPCODE_OP_BOTTOM3 {
917 0x6: cvtpd2dq_Vo_Wo();
918 default: Inst::UD2();
920 default: Inst::UD2();
922 0x1D: decode LEGACY_DECODEVAL {
924 0x0: decode OPCODE_OP_BOTTOM3 {
934 // operand size (0x66)
935 0x1: decode OPCODE_OP_BOTTOM3 {
945 default: Inst::UD2();
947 0x1E: decode OPCODE_OP_BOTTOM3 {
949 0x0: decode OPCODE_OP_BOTTOM3 {
953 0x4: pmuludq_Pq_Qq();
954 0x5: pmaddwd_Pq_Qq();
956 0x7: maskmovq_Pq_PRq();
957 default: Inst::UD2();
959 // operand size (0x66)
960 0x1: decode OPCODE_OP_BOTTOM3 {
964 0x4: pmuludq_Vo_Wo();
965 0x5: pmaddwd_Vo_Wo();
967 0x7: maskmovdqu_Vo_VRo();
968 default: Inst::UD2();
971 0x8: decode OPCODE_OP_BOTTOM3 {
973 default: Inst::UD2();
975 default: Inst::UD2();
977 0x1F: decode LEGACY_DECODEVAL {
979 0x0: decode OPCODE_OP_BOTTOM3 {
989 // operand size (0x66)
990 0x1: decode OPCODE_OP_BOTTOM3 {
1000 default: Inst::UD2();
1002 default: FailUnimpl::twoByteOps();
1005 default: M5InternalError::error(
1006 {{"Unexpected first opcode byte in two byte opcode!"}});