two_byte_opcodes.isa revision 10632
17087Snate@binkert.org// Copyright (c) 2007-2008 The Hewlett-Packard Development Company 27087Snate@binkert.org// All rights reserved. 37087Snate@binkert.org// 47087Snate@binkert.org// The license below extends only to copyright in the software and shall 57087Snate@binkert.org// not be construed as granting a license to any other intellectual 67087Snate@binkert.org// property including but not limited to intellectual property relating 77087Snate@binkert.org// to a hardware implementation of the functionality of the software 87087Snate@binkert.org// licensed hereunder. You may use the software subject to the license 97087Snate@binkert.org// terms below provided that you ensure that this notice is replicated 107087Snate@binkert.org// unmodified and in its entirety in all distributions of the software, 117087Snate@binkert.org// modified or unmodified, in source code or in binary form. 127087Snate@binkert.org// 135331Sgblack@eecs.umich.edu// Copyright (c) 2008 The Regents of The University of Michigan 145331Sgblack@eecs.umich.edu// All rights reserved. 155331Sgblack@eecs.umich.edu// 165331Sgblack@eecs.umich.edu// Redistribution and use in source and binary forms, with or without 175331Sgblack@eecs.umich.edu// modification, are permitted provided that the following conditions are 185331Sgblack@eecs.umich.edu// met: redistributions of source code must retain the above copyright 195331Sgblack@eecs.umich.edu// notice, this list of conditions and the following disclaimer; 205331Sgblack@eecs.umich.edu// redistributions in binary form must reproduce the above copyright 215331Sgblack@eecs.umich.edu// notice, this list of conditions and the following disclaimer in the 225331Sgblack@eecs.umich.edu// documentation and/or other materials provided with the distribution; 235331Sgblack@eecs.umich.edu// neither the name of the copyright holders nor the names of its 245331Sgblack@eecs.umich.edu// contributors may be used to endorse or promote products derived from 255331Sgblack@eecs.umich.edu// this software without specific prior written permission. 265331Sgblack@eecs.umich.edu// 275331Sgblack@eecs.umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 285331Sgblack@eecs.umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 295331Sgblack@eecs.umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 305331Sgblack@eecs.umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 315331Sgblack@eecs.umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 325331Sgblack@eecs.umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 335331Sgblack@eecs.umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 345331Sgblack@eecs.umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 355331Sgblack@eecs.umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 365331Sgblack@eecs.umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 375331Sgblack@eecs.umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 385331Sgblack@eecs.umich.edu// 395331Sgblack@eecs.umich.edu// Authors: Gabe Black 405331Sgblack@eecs.umich.edu 414276Sgblack@eecs.umich.edu//////////////////////////////////////////////////////////////////// 424276Sgblack@eecs.umich.edu// 434276Sgblack@eecs.umich.edu// Decode the two byte opcodes 444276Sgblack@eecs.umich.edu// 4510593Sgabeblack@google.com'X86ISA::TwoByteOpcode': decode OPCODE_OP_TOP5 { 4610593Sgabeblack@google.com format WarnUnimpl { 4710593Sgabeblack@google.com 0x00: decode OPCODE_OP_BOTTOM3 { 4810593Sgabeblack@google.com //0x00: group6(); 4910593Sgabeblack@google.com 0x00: decode MODRM_REG { 5010593Sgabeblack@google.com 0x0: sldt_Mw_or_Rv(); 5110593Sgabeblack@google.com 0x1: str_Mw_or_Rv(); 5210593Sgabeblack@google.com 0x2: Inst::LLDT(Ew); 5310593Sgabeblack@google.com 0x3: Inst::LTR(Ew); 5410593Sgabeblack@google.com 0x4: verr_Mw_or_Rv(); 5510593Sgabeblack@google.com 0x5: verw_Mw_or_Rv(); 5610593Sgabeblack@google.com //0x6: jmpe_Ev(); // IA-64 5710593Sgabeblack@google.com default: Inst::UD2(); 5810593Sgabeblack@google.com } 5910593Sgabeblack@google.com //0x01: group7(); // Ugly, ugly, ugly... 6010593Sgabeblack@google.com 0x01: decode MODRM_REG { 6110593Sgabeblack@google.com 0x0: decode MODRM_MOD { 6210593Sgabeblack@google.com 0x3: decode MODRM_RM { 6310593Sgabeblack@google.com 0x1: vmcall(); 6410593Sgabeblack@google.com 0x2: vmlaunch(); 6510593Sgabeblack@google.com 0x3: vmresume(); 6610593Sgabeblack@google.com 0x4: vmxoff(); 6710593Sgabeblack@google.com default: Inst::UD2(); 6810593Sgabeblack@google.com } 6910593Sgabeblack@google.com default: sgdt_Ms(); 705238Sgblack@eecs.umich.edu } 7110593Sgabeblack@google.com 0x1: decode MODRM_MOD { 7210593Sgabeblack@google.com 0x3: decode MODRM_RM { 7310593Sgabeblack@google.com 0x0: MonitorInst::monitor({{ 7410593Sgabeblack@google.com xc->armMonitor(Rax); 7510593Sgabeblack@google.com }}); 7610593Sgabeblack@google.com 0x1: MwaitInst::mwait({{ 7710593Sgabeblack@google.com uint64_t m = 0; //mem 7810593Sgabeblack@google.com unsigned s = 0x8; //size 7910593Sgabeblack@google.com unsigned f = 0; //flags 8010593Sgabeblack@google.com readMemAtomic(xc, traceData, 8110593Sgabeblack@google.com xc->getAddrMonitor()->vAddr, 8210593Sgabeblack@google.com m, s, f); 8310593Sgabeblack@google.com xc->mwaitAtomic(xc->tcBase()); 8410593Sgabeblack@google.com MicroHalt hltObj(machInst, mnemonic, 0x0); 8510593Sgabeblack@google.com hltObj.execute(xc, traceData); 8610593Sgabeblack@google.com }}); 8710593Sgabeblack@google.com default: Inst::UD2(); 886611Sgblack@eecs.umich.edu } 8910593Sgabeblack@google.com default: sidt_Ms(); 9010593Sgabeblack@google.com } 9110593Sgabeblack@google.com 0x2: decode MODRM_MOD { 9210593Sgabeblack@google.com 0x3: decode MODRM_RM { 9310593Sgabeblack@google.com 0x0: xgetbv(); 9410593Sgabeblack@google.com 0x1: xsetbv(); 956611Sgblack@eecs.umich.edu } 9610593Sgabeblack@google.com default: decode MODE_SUBMODE { 9710593Sgabeblack@google.com 0x0: Inst::LGDT(M); 9810593Sgabeblack@google.com default: decode OPSIZE { 9910593Sgabeblack@google.com // 16 bit operand sizes are special, but only 10010593Sgabeblack@google.com // in legacy and compatability modes. 10110593Sgabeblack@google.com 0x2: Inst::LGDT_16(M); 10210593Sgabeblack@google.com default: Inst::LGDT(M); 1036611Sgblack@eecs.umich.edu } 1046611Sgblack@eecs.umich.edu } 10510593Sgabeblack@google.com } 10610593Sgabeblack@google.com 0x3: decode MODRM_MOD { 10710593Sgabeblack@google.com 0x3: decode MODRM_RM { 10810593Sgabeblack@google.com 0x0: vmrun(); 10910593Sgabeblack@google.com 0x1: vmmcall(); 11010593Sgabeblack@google.com 0x2: vmload(); 11110593Sgabeblack@google.com 0x3: vmsave(); 11210593Sgabeblack@google.com 0x4: stgi(); 11310593Sgabeblack@google.com 0x5: clgi(); 11410593Sgabeblack@google.com 0x6: skinit(); 11510593Sgabeblack@google.com 0x7: invlpga(); 11610593Sgabeblack@google.com } 11710593Sgabeblack@google.com default: decode MODE_SUBMODE { 11810593Sgabeblack@google.com 0x0: Inst::LIDT(M); 11910593Sgabeblack@google.com default: decode OPSIZE { 12010593Sgabeblack@google.com // 16 bit operand sizes are special, but only 12110593Sgabeblack@google.com // in legacy and compatability modes. 12210593Sgabeblack@google.com 0x2: Inst::LIDT_16(M); 12310593Sgabeblack@google.com default: Inst::LIDT(M); 1245292Sgblack@eecs.umich.edu } 1256611Sgblack@eecs.umich.edu } 1265238Sgblack@eecs.umich.edu } 12710593Sgabeblack@google.com 0x4: decode MODRM_MOD { 12810593Sgabeblack@google.com 0x3: Inst::SMSW(Rv); 12910593Sgabeblack@google.com default: Inst::SMSW(Mw); 13010593Sgabeblack@google.com } 13110593Sgabeblack@google.com 0x6: Inst::LMSW(Ew); 13210593Sgabeblack@google.com 0x7: decode MODRM_MOD { 13310593Sgabeblack@google.com 0x3: decode MODRM_RM { 13410593Sgabeblack@google.com 0x0: Inst::SWAPGS(); 13510593Sgabeblack@google.com 0x1: rdtscp(); 1365789Sgblack@eecs.umich.edu default: Inst::UD2(); 1375789Sgblack@eecs.umich.edu } 13810593Sgabeblack@google.com default: Inst::INVLPG(M); 1395908Sgblack@eecs.umich.edu } 1404276Sgblack@eecs.umich.edu } 14110593Sgabeblack@google.com 0x02: lar_Gv_Ew(); 14210593Sgabeblack@google.com 0x03: lsl_Gv_Ew(); 14310593Sgabeblack@google.com // sandpile.org doesn't seem to know what this is...? We'll 14410593Sgabeblack@google.com // use it for pseudo instructions. We've got 16 bits of space 14510593Sgabeblack@google.com // to play with so there can be quite a few pseudo 14610593Sgabeblack@google.com // instructions. 14710593Sgabeblack@google.com //0x04: loadall_or_reset_or_hang(); 14810593Sgabeblack@google.com 0x4: decode IMMEDIATE { 14910593Sgabeblack@google.com format BasicOperate { 15010593Sgabeblack@google.com 0x00: m5arm({{ 15110593Sgabeblack@google.com PseudoInst::arm(xc->tcBase()); 15210593Sgabeblack@google.com }}, IsNonSpeculative); 15310593Sgabeblack@google.com 0x01: m5quiesce({{ 15410593Sgabeblack@google.com PseudoInst::quiesce(xc->tcBase()); 15510593Sgabeblack@google.com }}, IsNonSpeculative, IsQuiesce); 15610593Sgabeblack@google.com 0x02: m5quiesceNs({{ 15710593Sgabeblack@google.com PseudoInst::quiesceNs(xc->tcBase(), Rdi); 15810593Sgabeblack@google.com }}, IsNonSpeculative, IsQuiesce); 15910593Sgabeblack@google.com 0x03: m5quiesceCycle({{ 16010593Sgabeblack@google.com PseudoInst::quiesceCycles(xc->tcBase(), Rdi); 16110593Sgabeblack@google.com }}, IsNonSpeculative, IsQuiesce); 16210593Sgabeblack@google.com 0x04: m5quiesceTime({{ 16310593Sgabeblack@google.com Rax = PseudoInst::quiesceTime(xc->tcBase()); 16410593Sgabeblack@google.com }}, IsNonSpeculative); 16510593Sgabeblack@google.com 0x07: m5rpns({{ 16610593Sgabeblack@google.com Rax = PseudoInst::rpns(xc->tcBase()); 16710593Sgabeblack@google.com }}, IsNonSpeculative); 16810593Sgabeblack@google.com 0x21: m5exit({{ 16910593Sgabeblack@google.com PseudoInst::m5exit(xc->tcBase(), Rdi); 17010593Sgabeblack@google.com }}, IsNonSpeculative); 17110593Sgabeblack@google.com 0x22: m5fail({{ 17210593Sgabeblack@google.com PseudoInst::m5fail(xc->tcBase(), Rdi, Rsi); 17310593Sgabeblack@google.com }}, IsNonSpeculative); 17410593Sgabeblack@google.com 0x30: m5initparam({{ 17510593Sgabeblack@google.com Rax = PseudoInst::initParam(xc->tcBase()); 17610593Sgabeblack@google.com }}, IsNonSpeculative); 17710593Sgabeblack@google.com 0x31: m5loadsymbol({{ 17810593Sgabeblack@google.com PseudoInst::loadsymbol(xc->tcBase()); 17910593Sgabeblack@google.com }}, IsNonSpeculative); 18010593Sgabeblack@google.com 0x40: m5resetstats({{ 18110593Sgabeblack@google.com PseudoInst::resetstats(xc->tcBase(), Rdi, Rsi); 18210593Sgabeblack@google.com }}, IsNonSpeculative); 18310593Sgabeblack@google.com 0x41: m5dumpstats({{ 18410593Sgabeblack@google.com PseudoInst::dumpstats(xc->tcBase(), Rdi, Rsi); 18510593Sgabeblack@google.com }}, IsNonSpeculative); 18610593Sgabeblack@google.com 0x42: m5dumpresetstats({{ 18710593Sgabeblack@google.com PseudoInst::dumpresetstats(xc->tcBase(), Rdi, Rsi); 18810593Sgabeblack@google.com }}, IsNonSpeculative); 18910593Sgabeblack@google.com 0x43: m5checkpoint({{ 19010593Sgabeblack@google.com PseudoInst::m5checkpoint(xc->tcBase(), Rdi, Rsi); 19110593Sgabeblack@google.com }}, IsNonSpeculative); 19210593Sgabeblack@google.com 0x50: m5readfile({{ 19310593Sgabeblack@google.com Rax = PseudoInst::readfile( 19410593Sgabeblack@google.com xc->tcBase(), Rdi, Rsi, Rdx); 19510593Sgabeblack@google.com }}, IsNonSpeculative); 19610593Sgabeblack@google.com 0x51: m5debugbreak({{ 19710593Sgabeblack@google.com PseudoInst::debugbreak(xc->tcBase()); 19810593Sgabeblack@google.com }}, IsNonSpeculative); 19910593Sgabeblack@google.com 0x52: m5switchcpu({{ 20010593Sgabeblack@google.com PseudoInst::switchcpu(xc->tcBase()); 20110593Sgabeblack@google.com }}, IsNonSpeculative); 20210593Sgabeblack@google.com 0x53: m5addsymbol({{ 20310593Sgabeblack@google.com PseudoInst::addsymbol(xc->tcBase(), Rdi, Rsi); 20410593Sgabeblack@google.com }}, IsNonSpeculative); 20510593Sgabeblack@google.com 0x54: m5panic({{ 20610593Sgabeblack@google.com panic("M5 panic instruction called at pc = %#x.\n", 20710593Sgabeblack@google.com RIP); 20810593Sgabeblack@google.com }}, IsNonSpeculative); 20910593Sgabeblack@google.com 0x55: m5reserved1({{ 21010593Sgabeblack@google.com warn("M5 reserved opcode 1 ignored.\n"); 21110593Sgabeblack@google.com }}, IsNonSpeculative); 21210593Sgabeblack@google.com 0x56: m5reserved2({{ 21310593Sgabeblack@google.com warn("M5 reserved opcode 2 ignored.\n"); 21410593Sgabeblack@google.com }}, IsNonSpeculative); 21510593Sgabeblack@google.com 0x57: m5reserved3({{ 21610593Sgabeblack@google.com warn("M5 reserved opcode 3 ignored.\n"); 21710593Sgabeblack@google.com }}, IsNonSpeculative); 21810593Sgabeblack@google.com 0x58: m5reserved4({{ 21910593Sgabeblack@google.com warn("M5 reserved opcode 4 ignored.\n"); 22010593Sgabeblack@google.com }}, IsNonSpeculative); 22110593Sgabeblack@google.com 0x59: m5reserved5({{ 22210593Sgabeblack@google.com warn("M5 reserved opcode 5 ignored.\n"); 22310593Sgabeblack@google.com }}, IsNonSpeculative); 22410593Sgabeblack@google.com 0x5a: m5_work_begin({{ 22510593Sgabeblack@google.com PseudoInst::workbegin(xc->tcBase(), Rdi, Rsi); 22610593Sgabeblack@google.com }}, IsNonSpeculative); 22710593Sgabeblack@google.com 0x5b: m5_work_end({{ 22810593Sgabeblack@google.com PseudoInst::workend(xc->tcBase(), Rdi, Rsi); 22910593Sgabeblack@google.com }}, IsNonSpeculative); 2306616Sgblack@eecs.umich.edu default: Inst::UD2(); 2316616Sgblack@eecs.umich.edu } 2324276Sgblack@eecs.umich.edu } 23310593Sgabeblack@google.com 0x05: decode FullSystemInt { 23410593Sgabeblack@google.com 0: SyscallInst::syscall('xc->syscall(Rax)', 23510593Sgabeblack@google.com IsSyscall, IsNonSpeculative, IsSerializeAfter); 23610593Sgabeblack@google.com default: decode MODE_MODE { 23710593Sgabeblack@google.com 0x0: decode MODE_SUBMODE { 23810593Sgabeblack@google.com 0x0: Inst::SYSCALL_64(); 23910593Sgabeblack@google.com 0x1: Inst::SYSCALL_COMPAT(); 24010593Sgabeblack@google.com } 24110593Sgabeblack@google.com 0x1: Inst::SYSCALL_LEGACY(); 24210593Sgabeblack@google.com } 24310593Sgabeblack@google.com } 24410593Sgabeblack@google.com 0x06: Inst::CLTS(); 24510593Sgabeblack@google.com 0x07: decode MODE_SUBMODE { 24610593Sgabeblack@google.com 0x0: decode OPSIZE { 24710593Sgabeblack@google.com // Return to 64 bit mode. 24810593Sgabeblack@google.com 0x8: Inst::SYSRET_TO_64(); 24910593Sgabeblack@google.com // Return to compatibility mode. 25010593Sgabeblack@google.com default: Inst::SYSRET_TO_COMPAT(); 25110593Sgabeblack@google.com } 25210593Sgabeblack@google.com default: Inst::SYSRET_NON_64(); 25310593Sgabeblack@google.com } 25410593Sgabeblack@google.com } 25510593Sgabeblack@google.com 0x01: decode OPCODE_OP_BOTTOM3 { 25610593Sgabeblack@google.com 0x0: invd(); 25710593Sgabeblack@google.com 0x1: wbinvd(); 25810593Sgabeblack@google.com 0x2: Inst::UD2(); 25910593Sgabeblack@google.com 0x3: Inst::UD2(); 26010593Sgabeblack@google.com 0x4: Inst::UD2(); 26110593Sgabeblack@google.com 0x5: Inst::PREFETCH(Mb); 26210593Sgabeblack@google.com 0x6: FailUnimpl::femms(); 26310593Sgabeblack@google.com 0x7: decode IMMEDIATE { 26410593Sgabeblack@google.com 0x0C: pi2fw_Pq_Qq(); 26510593Sgabeblack@google.com 0x0D: pi2fd_Pq_Qq(); 26610593Sgabeblack@google.com 0x1C: pf2iw_Pq_Qq(); 26710593Sgabeblack@google.com 0x1D: pf2id_Pq_Qq(); 26810593Sgabeblack@google.com 0x8A: pfnacc_Pq_Qq(); 26910593Sgabeblack@google.com 0x8E: pfpnacc_Pq_Qq(); 27010593Sgabeblack@google.com 0x90: pfcmpge_Pq_Qq(); 27110593Sgabeblack@google.com 0x94: pfmin_Pq_Qq(); 27210593Sgabeblack@google.com 0x96: pfrcp_Pq_Qq(); 27310593Sgabeblack@google.com 0x97: pfrsqrt_Pq_Qq(); 27410593Sgabeblack@google.com 0x9A: Inst::PFSUB(Pq,Qq); 27510593Sgabeblack@google.com 0x9E: pfadd_Pq_Qq(); 27610593Sgabeblack@google.com 0xA0: pfcmpgt_Pq_Qq(); 27710593Sgabeblack@google.com 0xA4: pfmax_Pq_Qq(); 27810593Sgabeblack@google.com 0xA6: pfrcpit1_Pq_Qq(); 27910593Sgabeblack@google.com 0xA7: pfrsqit1_Pq_Qq(); 28010593Sgabeblack@google.com 0xAA: Inst::PFSUBR(Pq,Qq); 28110593Sgabeblack@google.com 0xAE: pfacc_Pq_Qq(); 28210593Sgabeblack@google.com 0xB0: pfcmpeq_Pq_Qq(); 28310593Sgabeblack@google.com 0xB4: Inst::PFMUL(Pq,Qq); 28410593Sgabeblack@google.com 0xB6: pfrcpit2_Pq_Qq(); 28510593Sgabeblack@google.com 0xB7: Inst::PMULHRW(Pq,Qq); 28610593Sgabeblack@google.com 0xBB: pswapd_Pq_Qq(); 28710593Sgabeblack@google.com 0xBF: pavgusb_Pq_Qq(); 28810593Sgabeblack@google.com default: Inst::UD2(); 28910593Sgabeblack@google.com } 29010593Sgabeblack@google.com } 29110593Sgabeblack@google.com format Inst{ 29210593Sgabeblack@google.com 0x02: decode LEGACY_DECODEVAL { 29310593Sgabeblack@google.com // no prefix 29410593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 29510593Sgabeblack@google.com 0x0: MOVUPS(Vo,Wo); 29610593Sgabeblack@google.com 0x1: MOVUPS(Wo,Vo); 29710593Sgabeblack@google.com 0x2: decode MODRM_MOD { 29810593Sgabeblack@google.com 0x3: MOVHLPS(Vps,VRq); 29910593Sgabeblack@google.com default: MOVLPS(Vps,Mq); 30010593Sgabeblack@google.com } 30110593Sgabeblack@google.com 0x3: MOVLPS(Mq,Vps); 30210593Sgabeblack@google.com 0x4: UNPCKLPS(Vps,Wq); 30310593Sgabeblack@google.com 0x5: UNPCKHPS(Vps,Wq); 30410593Sgabeblack@google.com 0x6: decode MODRM_MOD { 30510593Sgabeblack@google.com 0x3: MOVLHPS(Vps,VRq); 30610593Sgabeblack@google.com default: MOVHPS(Vps,Mq); 30710593Sgabeblack@google.com } 30810593Sgabeblack@google.com 0x7: MOVHPS(Mq,Vq); 30910593Sgabeblack@google.com } 31010593Sgabeblack@google.com // repe (0xF3) 31110593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 31210593Sgabeblack@google.com 0x0: MOVSS(Vd,Wd); 31310593Sgabeblack@google.com 0x1: MOVSS(Wd,Vd); 31410593Sgabeblack@google.com 0x2: WarnUnimpl::movsldup_Vo_Wo(); 31510593Sgabeblack@google.com 0x6: WarnUnimpl::movshdup_Vo_Wo(); 31610593Sgabeblack@google.com default: UD2(); 31710593Sgabeblack@google.com } 31810593Sgabeblack@google.com // operand size (0x66) 31910593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 32010593Sgabeblack@google.com 0x0: MOVUPD(Vo,Wo); 32110593Sgabeblack@google.com 0x1: MOVUPD(Wo,Vo); 32210593Sgabeblack@google.com 0x2: MOVLPD(Vq,Mq); 32310593Sgabeblack@google.com 0x3: MOVLPD(Mq,Vq); 32410593Sgabeblack@google.com 0x4: UNPCKLPD(Vo,Wq); 32510593Sgabeblack@google.com 0x5: UNPCKHPD(Vo,Wo); 32610593Sgabeblack@google.com 0x6: MOVHPD(Vq,Mq); 32710593Sgabeblack@google.com 0x7: MOVHPD(Mq,Vq); 32810593Sgabeblack@google.com } 32910593Sgabeblack@google.com // repne (0xF2) 33010593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 33110593Sgabeblack@google.com 0x0: MOVSD(Vq,Wq); 33210593Sgabeblack@google.com 0x1: MOVSD(Wq,Vq); 33310593Sgabeblack@google.com 0x2: MOVDDUP(Vo,Wq); 33410593Sgabeblack@google.com default: UD2(); 33510593Sgabeblack@google.com } 33610593Sgabeblack@google.com default: UD2(); 33710593Sgabeblack@google.com } 33810593Sgabeblack@google.com 0x03: decode OPCODE_OP_BOTTOM3 { 33910593Sgabeblack@google.com //group16(); 34010593Sgabeblack@google.com 0x0: decode MODRM_REG { 34110593Sgabeblack@google.com 0x0: WarnUnimpl::prefetch_nta(); 34210593Sgabeblack@google.com 0x1: PREFETCH_T0(Mb); 34310593Sgabeblack@google.com 0x2: WarnUnimpl::prefetch_t1(); 34410593Sgabeblack@google.com 0x3: WarnUnimpl::prefetch_t2(); 34510593Sgabeblack@google.com default: HINT_NOP(); 34610593Sgabeblack@google.com } 34710593Sgabeblack@google.com 0x1: HINT_NOP(); 34810593Sgabeblack@google.com 0x2: HINT_NOP(); 34910593Sgabeblack@google.com 0x3: HINT_NOP(); 35010593Sgabeblack@google.com 0x4: HINT_NOP(); 35110593Sgabeblack@google.com 0x5: HINT_NOP(); 35210593Sgabeblack@google.com 0x6: HINT_NOP(); 35310593Sgabeblack@google.com 0x7: HINT_NOP(); 35410593Sgabeblack@google.com } 35510593Sgabeblack@google.com 0x04: decode LEGACY_DECODEVAL { 35610593Sgabeblack@google.com // no prefix 35710593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 35810593Sgabeblack@google.com 0x0: MOV(Rd,Cd); 35910593Sgabeblack@google.com 0x1: MOV(Rd,Dd); 36010593Sgabeblack@google.com 0x2: MOV(Cd,Rd); 36110593Sgabeblack@google.com 0x3: MOV(Dd,Rd); 36210593Sgabeblack@google.com default: UD2(); 36310593Sgabeblack@google.com } 36410593Sgabeblack@google.com default: UD2(); 36510593Sgabeblack@google.com } 36610593Sgabeblack@google.com 0x05: decode LEGACY_DECODEVAL { 36710593Sgabeblack@google.com // no prefix 36810593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 36910593Sgabeblack@google.com //These moves should really use size o (octword), but 37010593Sgabeblack@google.com //because they are split in two, they use q (quadword). 37110593Sgabeblack@google.com 0x0: MOVAPS(Vq,Wq); 37210593Sgabeblack@google.com 0x1: MOVAPS(Wq,Vq); 37310593Sgabeblack@google.com 0x2: CVTPI2PS(Vq,Qq); 37410593Sgabeblack@google.com 0x3: WarnUnimpl::movntps_Mo_Vo(); 37510593Sgabeblack@google.com 0x4: CVTTPS2PI(Pq,Wq); 37610593Sgabeblack@google.com 0x5: CVTPS2PI(Pq,Wq); 37710593Sgabeblack@google.com 0x6: UCOMISS(Vd,Wd); 37810593Sgabeblack@google.com 0x7: COMISS(Vd,Wd); 37910593Sgabeblack@google.com } 38010593Sgabeblack@google.com // repe (0xF3) 38110593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 38210593Sgabeblack@google.com 0x2: CVTSI2SS(Vd,Ed); 38310593Sgabeblack@google.com 0x4: CVTTSS2SI(Gd,Wd); 38410593Sgabeblack@google.com 0x5: CVTSS2SI(Gd,Wd); 38510593Sgabeblack@google.com default: UD2(); 38610593Sgabeblack@google.com } 38710593Sgabeblack@google.com // operand size (0x66) 38810593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 38910593Sgabeblack@google.com 0x0: MOVAPD(Vo,Wo); 39010593Sgabeblack@google.com 0x1: MOVAPD(Wo,Vo); 39110593Sgabeblack@google.com 0x2: CVTPI2PD(Vo,Qq); 39210593Sgabeblack@google.com 0x3: WarnUnimpl::movntpd_Mo_Vo(); 39310593Sgabeblack@google.com 0x4: CVTTPD2PI(Pq,Wo); 39410593Sgabeblack@google.com 0x5: CVTPD2PI(Pq,Wo); 39510593Sgabeblack@google.com 0x6: UCOMISD(Vq,Wq); 39610593Sgabeblack@google.com 0x7: COMISD(Vq,Wq); 39710593Sgabeblack@google.com } 39810593Sgabeblack@google.com // repne (0xF2) 39910593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 40010593Sgabeblack@google.com // The size of the V operand should be q, not dp 40110593Sgabeblack@google.com 0x2: CVTSI2SD(Vdp,Edp); 40210593Sgabeblack@google.com // The size of the W operand should be q, not dp 40310593Sgabeblack@google.com 0x4: CVTTSD2SI(Gdp,Wdp); 40410593Sgabeblack@google.com 0x5: CVTSD2SI(Gd,Wq); 40510593Sgabeblack@google.com default: UD2(); 40610593Sgabeblack@google.com } 40710593Sgabeblack@google.com default: UD2(); 40810593Sgabeblack@google.com } 40910593Sgabeblack@google.com } 41010593Sgabeblack@google.com 0x06: decode OPCODE_OP_BOTTOM3 { 41110593Sgabeblack@google.com 0x0: Inst::WRMSR(); 41210593Sgabeblack@google.com 0x1: Inst::RDTSC(); 41310593Sgabeblack@google.com 0x2: Inst::RDMSR(); 41410593Sgabeblack@google.com 0x3: rdpmc(); 41510593Sgabeblack@google.com 0x4: decode FullSystemInt { 41610593Sgabeblack@google.com 0: SyscallInst::sysenter('xc->syscall(Rax)', 41710593Sgabeblack@google.com IsSyscall, IsNonSpeculative, IsSerializeAfter); 41810593Sgabeblack@google.com default: sysenter(); 41910593Sgabeblack@google.com } 42010593Sgabeblack@google.com 0x5: sysexit(); 42110593Sgabeblack@google.com 0x6: Inst::UD2(); 42210593Sgabeblack@google.com 0x7: getsec(); 42310593Sgabeblack@google.com } 42410593Sgabeblack@google.com 0x07: decode OPCODE_OP_BOTTOM3 { 42510593Sgabeblack@google.com 0x0: M5InternalError::error( 42610593Sgabeblack@google.com {{"Three byte opcode shouldn't be handled by " 42710593Sgabeblack@google.com "two_byte_opcodes.isa!"}}); 42810593Sgabeblack@google.com 0x2: M5InternalError::error( 42910593Sgabeblack@google.com {{"Three byte opcode shouldn't be handled by " 43010593Sgabeblack@google.com "two_byte_opcodes.isa!"}}); 43110593Sgabeblack@google.com default: UD2(); 43210593Sgabeblack@google.com } 43310593Sgabeblack@google.com format Inst { 43410593Sgabeblack@google.com 0x08: decode OPCODE_OP_BOTTOM3 { 43510593Sgabeblack@google.com 0x0: CMOVO(Gv,Ev); 43610593Sgabeblack@google.com 0x1: CMOVNO(Gv,Ev); 43710593Sgabeblack@google.com 0x2: CMOVB(Gv,Ev); 43810593Sgabeblack@google.com 0x3: CMOVNB(Gv,Ev); 43910593Sgabeblack@google.com 0x4: CMOVZ(Gv,Ev); 44010593Sgabeblack@google.com 0x5: CMOVNZ(Gv,Ev); 44110593Sgabeblack@google.com 0x6: CMOVBE(Gv,Ev); 44210593Sgabeblack@google.com 0x7: CMOVNBE(Gv,Ev); 44310593Sgabeblack@google.com } 44410593Sgabeblack@google.com 0x09: decode OPCODE_OP_BOTTOM3 { 44510593Sgabeblack@google.com 0x0: CMOVS(Gv,Ev); 44610593Sgabeblack@google.com 0x1: CMOVNS(Gv,Ev); 44710593Sgabeblack@google.com 0x2: CMOVP(Gv,Ev); 44810593Sgabeblack@google.com 0x3: CMOVNP(Gv,Ev); 44910593Sgabeblack@google.com 0x4: CMOVL(Gv,Ev); 45010593Sgabeblack@google.com 0x5: CMOVNL(Gv,Ev); 45110593Sgabeblack@google.com 0x6: CMOVLE(Gv,Ev); 45210593Sgabeblack@google.com 0x7: CMOVNLE(Gv,Ev); 45310593Sgabeblack@google.com } 45410593Sgabeblack@google.com 0x0A: decode LEGACY_DECODEVAL { 45510593Sgabeblack@google.com // no prefix 45610593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 45710593Sgabeblack@google.com 0x0: MOVMSKPS(Gd,VRo); 45810593Sgabeblack@google.com 0x1: SQRTPS(Vo,Wo); 45910593Sgabeblack@google.com 0x2: WarnUnimpl::rqsrtps_Vo_Wo(); 46010593Sgabeblack@google.com 0x3: WarnUnimpl::rcpps_Vo_Wo(); 46110593Sgabeblack@google.com 0x4: ANDPS(Vo,Wo); 46210593Sgabeblack@google.com 0x5: ANDNPS(Vo,Wo); 46310593Sgabeblack@google.com 0x6: ORPS(Vo,Wo); 46410593Sgabeblack@google.com 0x7: XORPS(Vo,Wo); 46510593Sgabeblack@google.com } 46610593Sgabeblack@google.com // repe (0xF3) 46710593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 46810593Sgabeblack@google.com 0x1: SQRTSS(Vd,Wd); 46910593Sgabeblack@google.com 0x2: WarnUnimpl::rsqrtss_Vd_Wd(); 47010593Sgabeblack@google.com 0x3: WarnUnimpl::rcpss_Vd_Wd(); 47110593Sgabeblack@google.com default: UD2(); 47210593Sgabeblack@google.com } 47310593Sgabeblack@google.com // operand size (0x66) 47410593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 47510593Sgabeblack@google.com 0x0: MOVMSKPD(Gd,VRo); 47610593Sgabeblack@google.com 0x1: SQRTPD(Vo,Wo); 47710593Sgabeblack@google.com 0x4: ANDPD(Vo,Wo); 47810593Sgabeblack@google.com 0x5: ANDNPD(Vo,Wo); 47910593Sgabeblack@google.com 0x6: ORPD(Vo,Wo); 48010593Sgabeblack@google.com 0x7: XORPD(Vo,Wo); 48110593Sgabeblack@google.com default: UD2(); 48210593Sgabeblack@google.com } 48310593Sgabeblack@google.com // repne (0xF2) 48410593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 48510593Sgabeblack@google.com 0x1: SQRTSD(Vq,Wq); 48610593Sgabeblack@google.com default: UD2(); 48710593Sgabeblack@google.com } 48810593Sgabeblack@google.com default: UD2(); 48910593Sgabeblack@google.com } 49010593Sgabeblack@google.com 0x0B: decode LEGACY_DECODEVAL { 49110593Sgabeblack@google.com // no prefix 49210593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 49310593Sgabeblack@google.com 0x0: ADDPS(Vo,Wo); 49410593Sgabeblack@google.com 0x1: MULPS(Vo,Wo); 49510593Sgabeblack@google.com 0x2: CVTPS2PD(Vo,Wq); 49610593Sgabeblack@google.com 0x3: CVTDQ2PS(Vo,Wo); 49710593Sgabeblack@google.com 0x4: SUBPS(Vo,Wo); 49810593Sgabeblack@google.com 0x5: MINPS(Vo,Wo); 49910593Sgabeblack@google.com 0x6: DIVPS(Vo,Wo); 50010593Sgabeblack@google.com 0x7: MAXPS(Vo,Wo); 50110593Sgabeblack@google.com } 50210593Sgabeblack@google.com // repe (0xF3) 50310593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 50410593Sgabeblack@google.com 0x0: ADDSS(Vd,Wd); 50510593Sgabeblack@google.com 0x1: MULSS(Vd,Wd); 50610593Sgabeblack@google.com 0x2: CVTSS2SD(Vq,Wd); 50710593Sgabeblack@google.com 0x3: CVTTPS2DQ(Vo,Wo); 50810593Sgabeblack@google.com 0x4: SUBSS(Vd,Wd); 50910593Sgabeblack@google.com 0x5: MINSS(Vd,Wd); 51010593Sgabeblack@google.com 0x6: DIVSS(Vd,Wd); 51110593Sgabeblack@google.com 0x7: MAXSS(Vd,Wd); 51210593Sgabeblack@google.com } 51310593Sgabeblack@google.com // operand size (0x66) 51410593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 51510593Sgabeblack@google.com 0x0: ADDPD(Vo,Wo); 51610593Sgabeblack@google.com 0x1: MULPD(Vo,Wo); 51710593Sgabeblack@google.com 0x2: CVTPD2PS(Vo,Wo); 51810593Sgabeblack@google.com 0x3: CVTPS2DQ(Vo,Wo); 51910593Sgabeblack@google.com 0x4: SUBPD(Vo,Wo); 52010593Sgabeblack@google.com 0x5: MINPD(Vo,Wo); 52110593Sgabeblack@google.com 0x6: DIVPD(Vo,Wo); 52210593Sgabeblack@google.com 0x7: MAXPD(Vo,Wo); 52310593Sgabeblack@google.com } 52410593Sgabeblack@google.com // repne (0xF2) 52510593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 52610593Sgabeblack@google.com 0x0: ADDSD(Vq,Wq); 52710593Sgabeblack@google.com 0x1: MULSD(Vq,Wq); 52810593Sgabeblack@google.com 0x2: CVTSD2SS(Vd,Wq); 52910593Sgabeblack@google.com 0x4: SUBSD(Vq,Wq); 53010593Sgabeblack@google.com 0x5: MINSD(Vq,Wq); 53110593Sgabeblack@google.com 0x6: DIVSD(Vq,Wq); 53210593Sgabeblack@google.com 0x7: MAXSD(Vq,Wq); 53310593Sgabeblack@google.com default: UD2(); 53410593Sgabeblack@google.com } 53510593Sgabeblack@google.com default: UD2(); 53610593Sgabeblack@google.com } 53710593Sgabeblack@google.com 0x0C: decode LEGACY_DECODEVAL { 53810593Sgabeblack@google.com // no prefix 53910593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 54010593Sgabeblack@google.com 0x0: PUNPCKLBW(Pq,Qd); 54110593Sgabeblack@google.com 0x1: PUNPCKLWD(Pq,Qd); 54210593Sgabeblack@google.com 0x2: PUNPCKLDQ(Pq,Qd); 54310593Sgabeblack@google.com 0x3: PACKSSWB(Pq,Qq); 54410593Sgabeblack@google.com 0x4: PCMPGTB(Pq,Qq); 54510593Sgabeblack@google.com 0x5: PCMPGTW(Pq,Qq); 54610593Sgabeblack@google.com 0x6: PCMPGTD(Pq,Qq); 54710593Sgabeblack@google.com 0x7: PACKUSWB(Pq,Qq); 54810593Sgabeblack@google.com } 54910593Sgabeblack@google.com // operand size (0x66) 55010593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 55110593Sgabeblack@google.com 0x0: PUNPCKLBW(Vo,Wq); 55210593Sgabeblack@google.com 0x1: PUNPCKLWD(Vo,Wq); 55310593Sgabeblack@google.com 0x2: PUNPCKLDQ(Vo,Wq); 55410593Sgabeblack@google.com 0x3: PACKSSWB(Vo,Wo); 55510593Sgabeblack@google.com 0x4: PCMPGTB(Vo,Wo); 55610593Sgabeblack@google.com 0x5: PCMPGTW(Vo,Wo); 55710593Sgabeblack@google.com 0x6: PCMPGTD(Vo,Wo); 55810593Sgabeblack@google.com 0x7: PACKUSWB(Vo,Wo); 55910593Sgabeblack@google.com } 56010593Sgabeblack@google.com default: UD2(); 56110593Sgabeblack@google.com } 56210593Sgabeblack@google.com 0x0D: decode LEGACY_DECODEVAL { 56310593Sgabeblack@google.com // no prefix 56410593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 56510593Sgabeblack@google.com 0x0: PUNPCKHBW(Pq,Qq); 56610593Sgabeblack@google.com 0x1: PUNPCKHWD(Pq,Qq); 56710593Sgabeblack@google.com 0x2: PUNPCKHDQ(Pq,Qq); 56810593Sgabeblack@google.com 0x3: PACKSSDW(Pq,Qq); 56910593Sgabeblack@google.com 0x6: MOVD(Pq,Edp); 57010593Sgabeblack@google.com 0x7: MOVQ(Pq,Qq); 57110593Sgabeblack@google.com default: UD2(); 57210593Sgabeblack@google.com } 57310593Sgabeblack@google.com // repe (0xF3) 57410593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 57510593Sgabeblack@google.com 0x7: MOVDQU(Vo,Wo); 57610593Sgabeblack@google.com default: UD2(); 57710593Sgabeblack@google.com } 57810593Sgabeblack@google.com // operand size (0x66) 57910593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 58010593Sgabeblack@google.com 0x0: PUNPCKHBW(Vo,Wo); 58110593Sgabeblack@google.com 0x1: PUNPCKHWD(Vo,Wo); 58210593Sgabeblack@google.com 0x2: PUNPCKHDQ(Vo,Wo); 58310593Sgabeblack@google.com 0x3: PACKSSDW(Vo,Wo); 58410593Sgabeblack@google.com 0x4: PUNPCKLQDQ(Vo,Wq); 58510593Sgabeblack@google.com 0x5: PUNPCKHQDQ(Vo,Wq); 58610593Sgabeblack@google.com 0x6: MOVD(Vo,Edp); 58710593Sgabeblack@google.com 0x7: MOVDQA(Vo,Wo); 58810593Sgabeblack@google.com } 58910593Sgabeblack@google.com default: UD2(); 59010593Sgabeblack@google.com } 59110593Sgabeblack@google.com 0x0E: decode LEGACY_DECODEVAL { 59210593Sgabeblack@google.com // no prefix 59310593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 59410593Sgabeblack@google.com 0x0: PSHUFW(Pq,Qq,Ib); 59510593Sgabeblack@google.com //0x1: group12_pshimw(); 59610593Sgabeblack@google.com 0x1: decode MODRM_REG { 59710593Sgabeblack@google.com 0x2: PSRLW(PRq,Ib); 59810593Sgabeblack@google.com 0x4: PSRAW(PRq,Ib); 59910593Sgabeblack@google.com 0x6: PSLLW(PRq,Ib); 60010593Sgabeblack@google.com default: UD2(); 60110593Sgabeblack@google.com } 60210593Sgabeblack@google.com //0x2: group13_pshimd(); 60310593Sgabeblack@google.com 0x2: decode MODRM_REG { 60410593Sgabeblack@google.com 0x2: PSRLD(PRq,Ib); 60510593Sgabeblack@google.com 0x4: PSRAD(PRq,Ib); 60610593Sgabeblack@google.com 0x6: PSLLD(PRq,Ib); 60710593Sgabeblack@google.com default: UD2(); 60810593Sgabeblack@google.com } 60910593Sgabeblack@google.com //0x3: group14_pshimq(); 61010593Sgabeblack@google.com 0x3: decode MODRM_REG { 61110593Sgabeblack@google.com 0x2: PSRLQ(PRq,Ib); 61210593Sgabeblack@google.com 0x6: PSLLQ(PRq,Ib); 61310593Sgabeblack@google.com default: Inst::UD2(); 61410593Sgabeblack@google.com } 61510593Sgabeblack@google.com 0x4: Inst::PCMPEQB(Pq,Qq); 61610593Sgabeblack@google.com 0x5: Inst::PCMPEQW(Pq,Qq); 61710593Sgabeblack@google.com 0x6: Inst::PCMPEQD(Pq,Qq); 61810593Sgabeblack@google.com 0x7: Inst::EMMS(); 61910593Sgabeblack@google.com } 62010593Sgabeblack@google.com // repe (0xF3) 62110593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 62210593Sgabeblack@google.com 0x0: PSHUFHW(Vo,Wo,Ib); 62310593Sgabeblack@google.com default: UD2(); 62410593Sgabeblack@google.com } 62510593Sgabeblack@google.com // operand size (0x66) 62610593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 62710593Sgabeblack@google.com 0x0: PSHUFD(Vo,Wo,Ib); 62810593Sgabeblack@google.com //0x1: group12_pshimw(); 62910593Sgabeblack@google.com 0x1: decode MODRM_REG { 63010593Sgabeblack@google.com 0x2: PSRLW(VRo,Ib); 63110593Sgabeblack@google.com 0x4: PSRAW(VRo,Ib); 63210593Sgabeblack@google.com 0x6: PSLLW(VRo,Ib); 63310593Sgabeblack@google.com } 63410593Sgabeblack@google.com //0x2: group13_pshimd(); 63510593Sgabeblack@google.com 0x2: decode MODRM_REG { 63610593Sgabeblack@google.com 0x2: PSRLD(VRo,Ib); 63710593Sgabeblack@google.com 0x4: PSRAD(VRo,Ib); 63810593Sgabeblack@google.com 0x6: PSLLD(VRo,Ib); 63910593Sgabeblack@google.com default: UD2(); 64010593Sgabeblack@google.com } 64110593Sgabeblack@google.com //0x3: group14_pshimq(); 64210593Sgabeblack@google.com 0x3: decode MODRM_REG { 64310593Sgabeblack@google.com 0x2: PSRLQ(VRo,Ib); 64410593Sgabeblack@google.com 0x3: PSRLDQ(VRo,Ib); 64510593Sgabeblack@google.com 0x6: PSLLQ(VRo,Ib); 64610593Sgabeblack@google.com 0x7: PSLLDQ(VRo,Ib); 64710593Sgabeblack@google.com default: UD2(); 64810593Sgabeblack@google.com } 64910593Sgabeblack@google.com 0x4: PCMPEQB(Vo,Wo); 65010593Sgabeblack@google.com 0x5: PCMPEQW(Vo,Wo); 65110593Sgabeblack@google.com 0x6: PCMPEQD(Vo,Wo); 65210593Sgabeblack@google.com default: UD2(); 65310593Sgabeblack@google.com } 65410593Sgabeblack@google.com // repne (0xF2) 65510593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 65610593Sgabeblack@google.com 0x0: PSHUFLW(Vo,Wo,Ib); 65710593Sgabeblack@google.com default: UD2(); 65810593Sgabeblack@google.com } 65910593Sgabeblack@google.com default: UD2(); 66010593Sgabeblack@google.com } 66110593Sgabeblack@google.com 0x0F: decode LEGACY_DECODEVAL { 66210593Sgabeblack@google.com // no prefix 66310593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 66410593Sgabeblack@google.com 0x0: WarnUnimpl::vmread_Edp_Gdp(); 66510593Sgabeblack@google.com 0x1: WarnUnimpl::vmwrite_Gdp_Edp(); 66610593Sgabeblack@google.com 0x6: MOVD(Edp,Pdp); 66710593Sgabeblack@google.com 0x7: MOVQ(Qq,Pq); 66810593Sgabeblack@google.com default: UD2(); 66910593Sgabeblack@google.com } 67010593Sgabeblack@google.com // repe (0xF3) 67110593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 67210593Sgabeblack@google.com 0x6: MOVQ(Vq,Wq); 67310593Sgabeblack@google.com 0x7: MOVDQU(Wo,Vo); 67410593Sgabeblack@google.com default: UD2(); 67510593Sgabeblack@google.com } 67610593Sgabeblack@google.com // operand size (0x66) 67710593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 67810593Sgabeblack@google.com 0x4: HADDPD(Vo,Wo); 67910593Sgabeblack@google.com 0x5: WarnUnimpl::hsubpd_Vo_Wo(); 68010593Sgabeblack@google.com 0x6: MOVD(Edp,Vd); 68110593Sgabeblack@google.com 0x7: MOVDQA(Wo,Vo); 68210593Sgabeblack@google.com default: UD2(); 68310593Sgabeblack@google.com } 68410593Sgabeblack@google.com // repne (0xF2) 68510593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 68610593Sgabeblack@google.com 0x4: HADDPS(Vo,Wo); 68710593Sgabeblack@google.com 0x5: WarnUnimpl::hsubps_Vo_Wo(); 68810593Sgabeblack@google.com default: UD2(); 68910593Sgabeblack@google.com } 69010593Sgabeblack@google.com default: UD2(); 69110593Sgabeblack@google.com } 69210593Sgabeblack@google.com 0x10: decode OPCODE_OP_BOTTOM3 { 69310593Sgabeblack@google.com 0x0: JO(Jz); 69410593Sgabeblack@google.com 0x1: JNO(Jz); 69510593Sgabeblack@google.com 0x2: JB(Jz); 69610593Sgabeblack@google.com 0x3: JNB(Jz); 69710593Sgabeblack@google.com 0x4: JZ(Jz); 69810593Sgabeblack@google.com 0x5: JNZ(Jz); 69910593Sgabeblack@google.com 0x6: JBE(Jz); 70010593Sgabeblack@google.com 0x7: JNBE(Jz); 70110593Sgabeblack@google.com } 70210593Sgabeblack@google.com 0x11: decode OPCODE_OP_BOTTOM3 { 70310593Sgabeblack@google.com 0x0: JS(Jz); 70410593Sgabeblack@google.com 0x1: JNS(Jz); 70510593Sgabeblack@google.com 0x2: JP(Jz); 70610593Sgabeblack@google.com 0x3: JNP(Jz); 70710593Sgabeblack@google.com 0x4: JL(Jz); 70810593Sgabeblack@google.com 0x5: JNL(Jz); 70910593Sgabeblack@google.com 0x6: JLE(Jz); 71010593Sgabeblack@google.com 0x7: JNLE(Jz); 71110593Sgabeblack@google.com } 71210593Sgabeblack@google.com 0x12: decode OPCODE_OP_BOTTOM3 { 71310593Sgabeblack@google.com 0x0: SETO(Eb); 71410593Sgabeblack@google.com 0x1: SETNO(Eb); 71510593Sgabeblack@google.com 0x2: SETB(Eb); 71610593Sgabeblack@google.com 0x3: SETNB(Eb); 71710593Sgabeblack@google.com 0x4: SETZ(Eb); 71810593Sgabeblack@google.com 0x5: SETNZ(Eb); 71910593Sgabeblack@google.com 0x6: SETBE(Eb); 72010593Sgabeblack@google.com 0x7: SETNBE(Eb); 72110593Sgabeblack@google.com } 72210593Sgabeblack@google.com 0x13: decode OPCODE_OP_BOTTOM3 { 72310593Sgabeblack@google.com 0x0: SETS(Eb); 72410593Sgabeblack@google.com 0x1: SETNS(Eb); 72510593Sgabeblack@google.com 0x2: SETP(Eb); 72610593Sgabeblack@google.com 0x3: SETNP(Eb); 72710593Sgabeblack@google.com 0x4: SETL(Eb); 72810593Sgabeblack@google.com 0x5: SETNL(Eb); 72910593Sgabeblack@google.com 0x6: SETLE(Eb); 73010593Sgabeblack@google.com 0x7: SETNLE(Eb); 73110593Sgabeblack@google.com } 73210593Sgabeblack@google.com } 73310593Sgabeblack@google.com 0x14: decode OPCODE_OP_BOTTOM3 { 73410593Sgabeblack@google.com 0x0: push_fs(); 73510593Sgabeblack@google.com 0x1: pop_fs(); 73610593Sgabeblack@google.com 0x2: CPUIDInst::CPUID({{ 73710593Sgabeblack@google.com CpuidResult result; 73810593Sgabeblack@google.com bool success = doCpuid(xc->tcBase(), bits(Rax, 31, 0), 73910593Sgabeblack@google.com bits(Rcx, 31, 0), result); 74010593Sgabeblack@google.com if (success) { 74110593Sgabeblack@google.com Rax = result.rax; 74210593Sgabeblack@google.com Rbx = result.rbx; 74310593Sgabeblack@google.com Rcx = result.rcx; 74410593Sgabeblack@google.com Rdx = result.rdx; 74510593Sgabeblack@google.com } else { 74610593Sgabeblack@google.com Rax = Rax; 74710593Sgabeblack@google.com Rbx = Rbx; 74810593Sgabeblack@google.com Rcx = Rcx; 74910593Sgabeblack@google.com Rdx = Rdx; 75010593Sgabeblack@google.com } 75110593Sgabeblack@google.com }}); 75210593Sgabeblack@google.com 0x3: Inst::BT(Ev,Gv); 75310593Sgabeblack@google.com 0x4: Inst::SHLD(Ev,Gv,Ib); 75410593Sgabeblack@google.com 0x5: Inst::SHLD(Ev,Gv); 75510593Sgabeblack@google.com default: Inst::UD2(); 75610593Sgabeblack@google.com } 75710593Sgabeblack@google.com 0x15: decode OPCODE_OP_BOTTOM3 { 75810593Sgabeblack@google.com 0x0: push_gs(); 75910593Sgabeblack@google.com 0x1: pop_gs(); 76010593Sgabeblack@google.com 0x2: rsm_smm(); 76110593Sgabeblack@google.com 0x3: Inst::BTS(Ev,Gv); 76210593Sgabeblack@google.com 0x4: Inst::SHRD(Ev,Gv,Ib); 76310593Sgabeblack@google.com 0x5: Inst::SHRD(Ev,Gv); 76410593Sgabeblack@google.com //0x6: group15(); 76510593Sgabeblack@google.com 0x6: decode MODRM_MOD { 76610593Sgabeblack@google.com 0x3: decode MODRM_REG { 76710593Sgabeblack@google.com 0x5: BasicOperate::LFENCE( 76810593Sgabeblack@google.com {{/*Nothing*/}}, IsReadBarrier); 76910593Sgabeblack@google.com 0x6: BasicOperate::MFENCE( 77010593Sgabeblack@google.com {{/*Nothing*/}}, IsMemBarrier); 77110593Sgabeblack@google.com 0x7: BasicOperate::SFENCE( 77210593Sgabeblack@google.com {{/*Nothing*/}}, IsWriteBarrier); 77310593Sgabeblack@google.com default: Inst::UD2(); 77410593Sgabeblack@google.com } 77510593Sgabeblack@google.com default: decode MODRM_REG { 77610593Sgabeblack@google.com 0x0: decode OPSIZE { 77710593Sgabeblack@google.com 4: Inst::FXSAVE(M); 77810593Sgabeblack@google.com 8: Inst::FXSAVE64(M); 77910593Sgabeblack@google.com default: fxsave(); 78010593Sgabeblack@google.com } 78110593Sgabeblack@google.com 0x1: decode OPSIZE { 78210593Sgabeblack@google.com 4: Inst::FXRSTOR(M); 78310593Sgabeblack@google.com 8: Inst::FXRSTOR64(M); 78410593Sgabeblack@google.com default: fxrstor(); 78510593Sgabeblack@google.com } 78610593Sgabeblack@google.com 0x2: Inst::LDMXCSR(Md); 78710593Sgabeblack@google.com 0x3: Inst::STMXCSR(Md); 78810593Sgabeblack@google.com 0x4: xsave(); 78910593Sgabeblack@google.com 0x5: xrstor(); 79010593Sgabeblack@google.com 0x6: Inst::UD2(); 79110593Sgabeblack@google.com 0x7: clflush(); 79210593Sgabeblack@google.com } 79310593Sgabeblack@google.com } 79410593Sgabeblack@google.com 0x7: Inst::IMUL(Gv,Ev); 79510593Sgabeblack@google.com } 79610593Sgabeblack@google.com format Inst { 79710593Sgabeblack@google.com 0x16: decode OPCODE_OP_BOTTOM3 { 79810593Sgabeblack@google.com 0x0: CMPXCHG(Eb,Gb); 79910593Sgabeblack@google.com 0x1: CMPXCHG(Ev,Gv); 80010593Sgabeblack@google.com 0x2: WarnUnimpl::lss_Gz_Mp(); 80110593Sgabeblack@google.com 0x3: BTR(Ev,Gv); 80210593Sgabeblack@google.com 0x4: WarnUnimpl::lfs_Gz_Mp(); 80310593Sgabeblack@google.com 0x5: WarnUnimpl::lgs_Gz_Mp(); 80410593Sgabeblack@google.com //The size of the second operand in these instructions 80510593Sgabeblack@google.com //should really be "b" or "w", but it's set to v in order 80610593Sgabeblack@google.com //to have a consistent register size. This shouldn't 80710593Sgabeblack@google.com //affect behavior. 80810593Sgabeblack@google.com 0x6: MOVZX_B(Gv,Ev); 80910593Sgabeblack@google.com 0x7: MOVZX_W(Gv,Ev); 81010593Sgabeblack@google.com } 81110593Sgabeblack@google.com 0x17: decode OPCODE_OP_BOTTOM3 { 81210593Sgabeblack@google.com 0x0: decode LEGACY_REP { 81310593Sgabeblack@google.com 0x0: WarnUnimpl::jmpe_Jz(); 81410593Sgabeblack@google.com 0x1: WarnUnimpl::popcnt_Gv_Ev(); 81510593Sgabeblack@google.com } 81610593Sgabeblack@google.com //0x1: group10_UD2(); 81710593Sgabeblack@google.com 0x1: UD2(); 81810593Sgabeblack@google.com //0x2: group8_Ev_Ib(); 81910593Sgabeblack@google.com 0x2: decode MODRM_REG { 82010593Sgabeblack@google.com 0x4: BT(Ev,Ib); 82110593Sgabeblack@google.com 0x5: BTS(Ev,Ib); 82210593Sgabeblack@google.com 0x6: BTR(Ev,Ib); 82310593Sgabeblack@google.com 0x7: BTC(Ev,Ib); 82410593Sgabeblack@google.com default: UD2(); 82510593Sgabeblack@google.com } 82610593Sgabeblack@google.com 0x3: BTC(Ev,Gv); 82710593Sgabeblack@google.com 0x4: BSF(Gv,Ev); 82810593Sgabeblack@google.com 0x5: BSR(Gv,Ev); 82910593Sgabeblack@google.com //The size of the second operand in these instructions 83010593Sgabeblack@google.com //should really be "b" or "w", but it's set to v in order 83110593Sgabeblack@google.com //to have a consistent register size. This shouldn't 83210593Sgabeblack@google.com //affect behavior. 83310593Sgabeblack@google.com 0x6: MOVSX_B(Gv,Ev); 83410593Sgabeblack@google.com 0x7: MOVSX_W(Gv,Ev); 83510593Sgabeblack@google.com } 83610593Sgabeblack@google.com 0x18: decode OPCODE_OP_BOTTOM3 { 83710593Sgabeblack@google.com 0x0: XADD(Eb,Gb); 83810593Sgabeblack@google.com 0x1: XADD(Ev,Gv); 83910593Sgabeblack@google.com //0x7: group9(); 84010593Sgabeblack@google.com 0x7: decode MODRM_REG { 84110593Sgabeblack@google.com //Also CMPXCHG16B 84210593Sgabeblack@google.com 0x1: CMPXCHG8B(Mdp); 84310593Sgabeblack@google.com 0x6: decode LEGACY_OP { 84410593Sgabeblack@google.com 0x1: WarnUnimpl::vmclear_Mq(); 84510593Sgabeblack@google.com default: decode LEGACY_REP { 84610593Sgabeblack@google.com 0x1: WarnUnimpl::vmxon_Mq(); 84710593Sgabeblack@google.com 0x0: WarnUnimpl::vmptrld_Mq(); 84810593Sgabeblack@google.com } 84910593Sgabeblack@google.com } 85010593Sgabeblack@google.com 0x7: WarnUnimpl::vmptrst_Mq(); 85110593Sgabeblack@google.com default: UD2(); 85210593Sgabeblack@google.com } 85310593Sgabeblack@google.com default: decode LEGACY_DECODEVAL { 8546576Sgblack@eecs.umich.edu // no prefix 8556576Sgblack@eecs.umich.edu 0x0: decode OPCODE_OP_BOTTOM3 { 85610593Sgabeblack@google.com 0x2: CMPPS(Vo,Wo,Ib); 85710593Sgabeblack@google.com 0x3: MOVNTI(Mdp,Gdp); 85810593Sgabeblack@google.com 0x4: PINSRW(Pq,Ew,Ib); 85910593Sgabeblack@google.com 0x5: PEXTRW(Gd,PRq,Ib); 86010593Sgabeblack@google.com 0x6: SHUFPS(Vps,Wps,Ib); 8615020Sgblack@eecs.umich.edu } 8626576Sgblack@eecs.umich.edu // repe (0xF3) 8636576Sgblack@eecs.umich.edu 0x4: decode OPCODE_OP_BOTTOM3 { 86410593Sgabeblack@google.com 0x2: CMPSS(Vd,Wd,Ib); 8656576Sgblack@eecs.umich.edu default: UD2(); 8665020Sgblack@eecs.umich.edu } 8676576Sgblack@eecs.umich.edu // operand size (0x66) 8686576Sgblack@eecs.umich.edu 0x1: decode OPCODE_OP_BOTTOM3 { 86910593Sgabeblack@google.com 0x2: CMPPD(Vo,Wo,Ib); 87010593Sgabeblack@google.com 0x4: PINSRW(Vdw,Ew,Ib); 87110593Sgabeblack@google.com 0x5: PEXTRW(Gd,VRdq,Ib); 87210593Sgabeblack@google.com 0x6: SHUFPD(Vpd,Wpd,Ib); 87310593Sgabeblack@google.com default: UD2(); 8746576Sgblack@eecs.umich.edu } 8756576Sgblack@eecs.umich.edu // repne (0xF2) 8766576Sgblack@eecs.umich.edu 0x8: decode OPCODE_OP_BOTTOM3 { 87710593Sgabeblack@google.com 0x2: CMPSD(Vq,Wq,Ib); 8786611Sgblack@eecs.umich.edu default: UD2(); 8796611Sgblack@eecs.umich.edu } 8806611Sgblack@eecs.umich.edu default: UD2(); 8815020Sgblack@eecs.umich.edu } 8824276Sgblack@eecs.umich.edu } 88310593Sgabeblack@google.com 0x19: decode OPSIZE { 88410593Sgabeblack@google.com 4: BSWAP_D(Bd); 88510593Sgabeblack@google.com 8: BSWAP_Q(Bq); 8866611Sgblack@eecs.umich.edu default: UD2(); 8874276Sgblack@eecs.umich.edu } 88810593Sgabeblack@google.com 0x1A: decode LEGACY_DECODEVAL { 88910593Sgabeblack@google.com // no prefix 89010593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 89110593Sgabeblack@google.com 0x1: PSRLW(Pq,Qq); 89210593Sgabeblack@google.com 0x2: PSRLD(Pq,Qq); 89310593Sgabeblack@google.com 0x3: PSRLQ(Pq,Qq); 89410593Sgabeblack@google.com 0x4: PADDQ(Pq,Qq); 89510593Sgabeblack@google.com 0x5: PMULLW(Pq,Qq); 89610593Sgabeblack@google.com 0x7: PMOVMSKB(Gd,PRq); 8975059Sgblack@eecs.umich.edu default: UD2(); 8985020Sgblack@eecs.umich.edu } 89910593Sgabeblack@google.com // repe (0xF3) 90010593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 90110593Sgabeblack@google.com 0x6: MOVQ2DQ(Vo,PRq); 9026576Sgblack@eecs.umich.edu default: UD2(); 9035020Sgblack@eecs.umich.edu } 90410593Sgabeblack@google.com // operand size (0x66) 90510593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 90610632Smaxime.cscs@gmail.com 0x0: ADDSUBPD(Vo,Wo); 90710593Sgabeblack@google.com 0x1: PSRLW(Vo,Wo); 90810593Sgabeblack@google.com 0x2: PSRLD(Vo,Wo); 90910593Sgabeblack@google.com 0x3: PSRLQ(Vo,Wo); 91010593Sgabeblack@google.com 0x4: PADDQ(Vo,Wo); 91110593Sgabeblack@google.com 0x5: PMULLW(Vo,Wo); 91210593Sgabeblack@google.com 0x6: MOVQ(Wq,Vq); 91310593Sgabeblack@google.com 0x7: PMOVMSKB(Gd,VRo); 91410593Sgabeblack@google.com } 91510593Sgabeblack@google.com // repne (0xF2) 91610593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 91710593Sgabeblack@google.com 0x0: WarnUnimpl::addsubps_Vo_Wo(); 91810593Sgabeblack@google.com 0x6: MOVDQ2Q(Pq,VRq); 9196576Sgblack@eecs.umich.edu default: UD2(); 9205020Sgblack@eecs.umich.edu } 92110593Sgabeblack@google.com default: UD2(); 92210593Sgabeblack@google.com } 92310593Sgabeblack@google.com 0x1B: decode LEGACY_DECODEVAL { 92410593Sgabeblack@google.com // no prefix 92510593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 92610593Sgabeblack@google.com 0x0: PSUBUSB(Pq,Qq); 92710593Sgabeblack@google.com 0x1: PSUBUSW(Pq,Qq); 92810593Sgabeblack@google.com 0x2: PMINUB(Pq,Qq); 92910593Sgabeblack@google.com 0x3: PAND(Pq,Qq); 93010593Sgabeblack@google.com 0x4: PADDUSB(Pq,Qq); 93110593Sgabeblack@google.com 0x5: PADDUSW(Pq,Qq); 93210593Sgabeblack@google.com 0x6: PMAXUB(Pq,Qq); 93310593Sgabeblack@google.com 0x7: PANDN(Pq,Qq); 93410593Sgabeblack@google.com } 93510593Sgabeblack@google.com // operand size (0x66) 93610593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 93710593Sgabeblack@google.com 0x0: PSUBUSB(Vo,Wo); 93810593Sgabeblack@google.com 0x1: PSUBUSW(Vo,Wo); 93910593Sgabeblack@google.com 0x2: PMINUB(Vo,Wo); 94010593Sgabeblack@google.com 0x3: PAND(Vo,Wo); 94110593Sgabeblack@google.com 0x4: PADDUSB(Vo,Wo); 94210593Sgabeblack@google.com 0x5: PADDUSW(Vo,Wo); 94310593Sgabeblack@google.com 0x6: PMAXUB(Vo,Wo); 94410593Sgabeblack@google.com 0x7: PANDN(Vo,Wo); 94510593Sgabeblack@google.com } 94610593Sgabeblack@google.com default: UD2(); 94710593Sgabeblack@google.com } 94810593Sgabeblack@google.com 0x1C: decode LEGACY_DECODEVAL { 94910593Sgabeblack@google.com // no prefix 95010593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 95110593Sgabeblack@google.com 0x0: PAVGB(Pq,Qq); 95210593Sgabeblack@google.com 0x1: PSRAW(Pq,Qq); 95310593Sgabeblack@google.com 0x2: PSRAD(Pq,Qq); 95410593Sgabeblack@google.com 0x3: PAVGW(Pq,Qq); 95510593Sgabeblack@google.com 0x4: PMULHUW(Pq,Qq); 95610593Sgabeblack@google.com 0x5: PMULHW(Pq,Qq); 95710593Sgabeblack@google.com 0x7: WarnUnimpl::movntq_Mq_Pq(); 9586576Sgblack@eecs.umich.edu default: UD2(); 9595020Sgblack@eecs.umich.edu } 96010593Sgabeblack@google.com // repe (0xF3) 96110593Sgabeblack@google.com 0x4: decode OPCODE_OP_BOTTOM3 { 96210593Sgabeblack@google.com 0x6: CVTDQ2PD(Vo,Wq); 9636584Sgblack@eecs.umich.edu default: UD2(); 9645020Sgblack@eecs.umich.edu } 96510593Sgabeblack@google.com // operand size (0x66) 96610593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 96710593Sgabeblack@google.com 0x0: PAVGB(Vo,Wo); 96810593Sgabeblack@google.com 0x1: PSRAW(Vo,Wo); 96910593Sgabeblack@google.com 0x2: PSRAD(Vo,Wo); 97010593Sgabeblack@google.com 0x3: PAVGW(Vo,Wo); 97110593Sgabeblack@google.com 0x4: PMULHUW(Vo,Wo); 97210593Sgabeblack@google.com 0x5: PMULHW(Vo,Wo); 97310593Sgabeblack@google.com 0x6: CVTTPD2DQ(Vo,Wo); 97410593Sgabeblack@google.com 0x7: WarnUnimpl::movntdq_Mo_Vo(); 97510593Sgabeblack@google.com } 97610593Sgabeblack@google.com // repne (0xF2) 97710593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 97810593Sgabeblack@google.com 0x6: CVTPD2DQ(Vo,Wo); 9796584Sgblack@eecs.umich.edu default: UD2(); 9805020Sgblack@eecs.umich.edu } 98110593Sgabeblack@google.com default: UD2(); 98210593Sgabeblack@google.com } 98310593Sgabeblack@google.com 0x1D: decode LEGACY_DECODEVAL { 98410593Sgabeblack@google.com // no prefix 98510593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 98610593Sgabeblack@google.com 0x0: PSUBSB(Pq,Qq); 98710593Sgabeblack@google.com 0x1: PSUBSW(Pq,Qq); 98810593Sgabeblack@google.com 0x2: PMINSW(Pq,Qq); 98910593Sgabeblack@google.com 0x3: POR(Pq,Qq); 99010593Sgabeblack@google.com 0x4: PADDSB(Pq,Qq); 99110593Sgabeblack@google.com 0x5: PADDSW(Pq,Qq); 99210593Sgabeblack@google.com 0x6: PMAXSW(Pq,Qq); 99310593Sgabeblack@google.com 0x7: PXOR(Pq,Qq); 9944727Sgblack@eecs.umich.edu } 99510593Sgabeblack@google.com // operand size (0x66) 99610593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 99710593Sgabeblack@google.com 0x0: PSUBSB(Vo,Wo); 99810593Sgabeblack@google.com 0x1: PSUBSW(Vo,Wo); 99910593Sgabeblack@google.com 0x2: PMINSW(Vo,Wo); 100010593Sgabeblack@google.com 0x3: POR(Vo,Wo); 100110593Sgabeblack@google.com 0x4: PADDSB(Vo,Wo); 100210593Sgabeblack@google.com 0x5: PADDSW(Vo,Wo); 100310593Sgabeblack@google.com 0x6: PMAXSW(Vo,Wo); 100410593Sgabeblack@google.com 0x7: PXOR(Vo,Wo); 10054727Sgblack@eecs.umich.edu } 100610593Sgabeblack@google.com default: UD2(); 10074276Sgblack@eecs.umich.edu } 100810593Sgabeblack@google.com 0x1E: decode LEGACY_DECODEVAL { 100910593Sgabeblack@google.com // no prefix 101010593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 101110593Sgabeblack@google.com 0x1: PSLLW(Pq,Qq); 101210593Sgabeblack@google.com 0x2: PSLLD(Pq,Qq); 101310593Sgabeblack@google.com 0x3: PSLLQ(Pq,Qq); 101410593Sgabeblack@google.com 0x4: PMULUDQ(Pq,Qq); 101510593Sgabeblack@google.com 0x5: PMADDWD(Pq,Qq); 101610593Sgabeblack@google.com 0x6: PSADBW(Pq,Qq); 101710593Sgabeblack@google.com 0x7: MASKMOVQ(Pq,PRq); 10186576Sgblack@eecs.umich.edu default: UD2(); 10195020Sgblack@eecs.umich.edu } 102010593Sgabeblack@google.com // operand size (0x66) 102110593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 102210593Sgabeblack@google.com 0x1: PSLLW(Vo,Wo); 102310593Sgabeblack@google.com 0x2: PSLLD(Vo,Wo); 102410593Sgabeblack@google.com 0x3: PSLLQ(Vo,Wo); 102510593Sgabeblack@google.com 0x4: PMULUDQ(Vo,Wo); 102610593Sgabeblack@google.com 0x5: PMADDWD(Vo,Wo); 102710593Sgabeblack@google.com 0x6: PSADBW(Vo,Wo); 102810593Sgabeblack@google.com 0x7: MASKMOVDQU(Vo,VRo); 10296593Sgblack@eecs.umich.edu default: UD2(); 10305020Sgblack@eecs.umich.edu } 103110593Sgabeblack@google.com // repne (0xF2) 103210593Sgabeblack@google.com 0x8: decode OPCODE_OP_BOTTOM3 { 103310593Sgabeblack@google.com 0x0: WarnUnimpl::lddqu_Vo_Mo(); 10346576Sgblack@eecs.umich.edu default: UD2(); 10355020Sgblack@eecs.umich.edu } 103610593Sgabeblack@google.com default: UD2(); 103710593Sgabeblack@google.com } 103810593Sgabeblack@google.com 0x1F: decode LEGACY_DECODEVAL { 103910593Sgabeblack@google.com // no prefix 104010593Sgabeblack@google.com 0x0: decode OPCODE_OP_BOTTOM3 { 104110593Sgabeblack@google.com 0x0: PSUBB(Pq,Qq); 104210593Sgabeblack@google.com 0x1: PSUBW(Pq,Qq); 104310593Sgabeblack@google.com 0x2: PSUBD(Pq,Qq); 104410593Sgabeblack@google.com 0x3: PSUBQ(Pq,Qq); 104510593Sgabeblack@google.com 0x4: PADDB(Pq,Qq); 104610593Sgabeblack@google.com 0x5: PADDW(Pq,Qq); 104710593Sgabeblack@google.com 0x6: PADDD(Pq,Qq); 104810593Sgabeblack@google.com 0x7: UD2(); 10495022Sgblack@eecs.umich.edu } 105010593Sgabeblack@google.com // operand size (0x66) 105110593Sgabeblack@google.com 0x1: decode OPCODE_OP_BOTTOM3 { 105210593Sgabeblack@google.com 0x0: PSUBB(Vo,Wo); 105310593Sgabeblack@google.com 0x1: PSUBW(Vo,Wo); 105410593Sgabeblack@google.com 0x2: PSUBD(Vo,Wo); 105510593Sgabeblack@google.com 0x3: PSUBQ(Vo,Wo); 105610593Sgabeblack@google.com 0x4: PADDB(Vo,Wo); 105710593Sgabeblack@google.com 0x5: PADDW(Vo,Wo); 105810593Sgabeblack@google.com 0x6: PADDD(Vo,Wo); 105910593Sgabeblack@google.com 0x7: UD2(); 10605020Sgblack@eecs.umich.edu } 106110593Sgabeblack@google.com default: UD2(); 10624276Sgblack@eecs.umich.edu } 10634276Sgblack@eecs.umich.edu } 106410593Sgabeblack@google.com default: FailUnimpl::twoByteOps(); 10654276Sgblack@eecs.umich.edu } 10664276Sgblack@eecs.umich.edu} 1067