/*
Copyright (C) 2006 - 2009 Evan Teran
                   eteran@alum.rit.edu

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifndef OPTABLE_2BYTE_20080314_TCC_
#define OPTABLE_2BYTE_20080314_TCC_

template <int N>
const typename Instruction<N>::OpcodeEntry Instruction<N>::m_Opcodes2Byte_NA[0x100] = {

	/* 0x0f 0x00 - 0x0f 0x0f */
	{ "group6", &Instruction::decode_group6, OP_GROUP6 },
	{ "group7", &Instruction::decode_group7, OP_GROUP7 },
	{ "lar", &Instruction::decode_Gv_Ew, OP_LAR },
	{ "lsl", &Instruction::decode_Gv_Ew, OP_LSL },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "syscall", &Instruction::decode0, OP_SYSCALL },
	{ "clts", &Instruction::decode0, OP_CLTS },
	{ "sysret", &Instruction::decode0, OP_SYSRET },
	{ "invd", &Instruction::decode0, OP_INVD },
	{ "wbinvd", &Instruction::decode0, OP_WBINVD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "ud2", &Instruction::decode0, OP_UD2 },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "nop", &Instruction::decode_Ev, OP_NOP },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	
	/* 0x0f 0x10 - 0x0f 0x1f */
	{ "movups", &Instruction::decode_Vo_Wo, OP_MOVUPS },
	{ "movups", &Instruction::decode_Wo_Vo, OP_MOVUPS },
	{ "movlps", &Instruction::decode_Vq_Mq, OP_MOVLPS },
	{ "movlps", &Instruction::decode_Mq_Vq, OP_MOVLPS },
	{ "unpcklps", &Instruction::decode_Vo_Wq, OP_UNPCKLPS },
	{ "unpckhps", &Instruction::decode_Vo_Wq, OP_UNPCKHPS },
	{ "movhps", &Instruction::decode_Vq_Mq, OP_MOVHPS },
	{ "movhps", &Instruction::decode_Mq_Vq, OP_MOVHPS },
	{ "group17", &Instruction::decode_group17, OP_GROUP17 },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "nop", &Instruction::decode_Ev, OP_NOP },
	
	/* 0x0f 0x20 - 0x0f 0x2f */
	{ "mov", &Instruction::decode_Rd_Cd, OP_MOV },
	{ "mov", &Instruction::decode_Rd_Dd, OP_MOV },
	{ "mov", &Instruction::decode_Cd_Rd, OP_MOV },
	{ "mov", &Instruction::decode_Dd_Rd, OP_MOV },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movaps", &Instruction::decode_Vo_Wo, OP_MOVAPS },
	{ "movaps", &Instruction::decode_Wo_Vo, OP_MOVAPS },
	{ "cvtpi2ps", &Instruction::decode_Vo_Qq, OP_CVTPI2PS },
	{ "movntps",  &Instruction::decode_Mo_Vo, OP_MOVNTPS },	
	{ "cvttps2pi",  &Instruction::decode_Pq_Wo, OP_CVTTPS2PI },
	{ "cvtps2pi",  &Instruction::decode_Pq_Wo, OP_CVTPS2PI },
	{ "ucomiss",  &Instruction::decode_Vo_Wo, OP_UCOMISS },
	{ "comiss",  &Instruction::decode_Vo_Wo, OP_COMISS },
	
	/* 0x0f 0x30 - 0x0f 0x3f */
	{ "wrmsr", &Instruction::decode0, OP_WRMSR },
	{ "rdtsc", &Instruction::decode0, OP_RDTSC },
	{ "rdmsr", &Instruction::decode0, OP_RDMSR },
	{ "rdpmc", &Instruction::decode0, OP_RDPMC },
	{ "sysenter", &Instruction::decode0, OP_SYSENTER },
	{ "sysexit", &Instruction::decode0, OP_SYSEXIT },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "getsec", &Instruction::decode0, OP_GETSEC },
	{ "3byte", &Instruction::decode_3byte_38, OP_3BYTE },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "3byte", &Instruction::decode_3byte_3A, OP_3BYTE },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	
	/* 0x0f 0x40 - 0x0f 0x4f */
	{ "cmovo", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovno", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovz", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnz", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnbe", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovs", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovns", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovp", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnp", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovl", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnl", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovle", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnle", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	
	/* 0x0f 0x50 - 0x0f 0x5f */
	{ "movmskps", &Instruction::decode_Gd_Uo, OP_MOVMSKPS },	// x86-64: movmskps Gq, Uo
	{ "sqrtps", &Instruction::decode_Vo_Wo, OP_SQRTPS },
	{ "rsqrtps", &Instruction::decode_Vo_Wo, OP_RSQRTPS },
	{ "rcpps", &Instruction::decode_Vo_Wo, OP_RCPPS },
	{ "andps", &Instruction::decode_Vo_Wo, OP_ANDPS },
	{ "andnps", &Instruction::decode_Vo_Wo, OP_ANDNPS },
	{ "orps", &Instruction::decode_Vo_Wo, OP_ORPS },
	{ "xorps", &Instruction::decode_Vo_Wo, OP_XORPS },
	{ "addps", &Instruction::decode_Vo_Wo, OP_ADDPS },
	{ "mulps", &Instruction::decode_Vo_Wo, OP_MULPS },
	{ "cvtps2pd", &Instruction::decode_Vo_Wo, OP_CVTPS2PD },
	{ "cvtdq2ps", &Instruction::decode_Vo_Wo, OP_CVTDQ2PS },
	{ "subps", &Instruction::decode_Vo_Wo, OP_SUBPS },
	{ "minps", &Instruction::decode_Vo_Wo, OP_MINPS },
	{ "divps", &Instruction::decode_Vo_Wo, OP_DIVPS },
	{ "maxps", &Instruction::decode_Vo_Wo, OP_MAXPS },
	
	/* 0x0f 0x60 - 0x0f 0x6f */
	{ "punpcklbw", &Instruction::decode_Pq_Qd, OP_PUNPCKLBW },
	{ "punpcklwd", &Instruction::decode_Pq_Qd, OP_PUNPCKLWD },
	{ "punpckldq", &Instruction::decode_Pq_Qd, OP_PUNPCKLDQ },
	{ "packsswb", &Instruction::decode_Pq_Qq, OP_PACKSSWB },
	{ "pcmpgtb", &Instruction::decode_Pq_Qq, OP_PCMPGTB },
	{ "pcmpgtw", &Instruction::decode_Pq_Qq, OP_PCMPGTW },
	{ "pcmpgtd", &Instruction::decode_Pq_Qq, OP_PCMPGTD },
	{ "packuswb", &Instruction::decode_Pq_Qq, OP_PACKUSWB },
	{ "punpckhbw", &Instruction::decode_Pq_Qd, OP_PUNPCKHBW },
	{ "punpckhwd", &Instruction::decode_Pq_Qd, OP_PUNPCKHWD },
	{ "punpckhdq", &Instruction::decode_Pq_Qd, OP_PUNPCKHDQ },
	{ "packssdw", &Instruction::decode_Pq_Qq, OP_PACKSSDW },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movd", &Instruction::decode_Pd_Ed, OP_MOVD },		// x86-64: movq Pd, Eq
	{ "movq", &Instruction::decode_Pq_Qq, OP_MOVQ },
	
	/* 0x0f 0x70 - 0x0f 0x7f */
	{ "pshufw", &Instruction::decode_Pq_Qq_Ib, OP_PSHUFW },
	{ "group13", &Instruction::decode_group13, OP_GROUP13 },
	{ "group14", &Instruction::decode_group14, OP_GROUP14 },
	{ "group15", &Instruction::decode_group15, OP_GROUP15 },
	{ "pcmpeqb", &Instruction::decode_Pq_Qq, OP_PCMPEQB },
	{ "pcmpeqw", &Instruction::decode_Pq_Qq, OP_PCMPEQW },
	{ "pcmpeqd", &Instruction::decode_Pq_Qq, OP_PCMPEQD },
	{ "emms", &Instruction::decode0, OP_EMMS },
	{ "vmread", &Instruction::decode_Ed_Gd, OP_VMREAD },	// x86-64: vmread Eq, Gq
	{ "vmwrite", &Instruction::decode_Gd_Ed, OP_VMWRITE },	// x86-64: vmwrite Gq, Eq
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movd", &Instruction::decode_Ed_Pd, OP_MOVD },		// x86-64: movq Eq,Pd
	{ "movq", &Instruction::decode_Qq_Pq, OP_MOVQ },
	
	/* 0x0f 0x80 - 0x0f 0x8f */
	{ "jo", &Instruction::decode_Jz, OP_JCC },
	{ "jno", &Instruction::decode_Jz, OP_JCC },
	{ "jb", &Instruction::decode_Jz, OP_JCC },
	{ "jnb", &Instruction::decode_Jz, OP_JCC },
	{ "jz", &Instruction::decode_Jz, OP_JCC },
	{ "jnz", &Instruction::decode_Jz, OP_JCC },
	{ "jbe", &Instruction::decode_Jz, OP_JCC },
	{ "jnbe", &Instruction::decode_Jz, OP_JCC },
	{ "js", &Instruction::decode_Jz, OP_JCC },
	{ "jns", &Instruction::decode_Jz, OP_JCC },
	{ "jp", &Instruction::decode_Jz, OP_JCC },
	{ "jnp", &Instruction::decode_Jz, OP_JCC },
	{ "jl", &Instruction::decode_Jz, OP_JCC },
	{ "jnl", &Instruction::decode_Jz, OP_JCC },
	{ "jle", &Instruction::decode_Jz, OP_JCC },
	{ "jnle", &Instruction::decode_Jz, OP_JCC },
	
	/* 0x0f 0x90 - 0x0f 0x9f */
	{ "seto", &Instruction::decode_Eb, OP_SETCC },
	{ "setno", &Instruction::decode_Eb, OP_SETCC },
	{ "setb", &Instruction::decode_Eb, OP_SETCC },
	{ "setnb", &Instruction::decode_Eb, OP_SETCC },
	{ "setz", &Instruction::decode_Eb, OP_SETCC },
	{ "setnz", &Instruction::decode_Eb, OP_SETCC },
	{ "setbe", &Instruction::decode_Eb, OP_SETCC },
	{ "setnbe", &Instruction::decode_Eb, OP_SETCC },
	{ "sets", &Instruction::decode_Eb, OP_SETCC },
	{ "setns", &Instruction::decode_Eb, OP_SETCC },
	{ "setp", &Instruction::decode_Eb, OP_SETCC },
	{ "setnp", &Instruction::decode_Eb, OP_SETCC },
	{ "setl", &Instruction::decode_Eb, OP_SETCC },
	{ "setnl", &Instruction::decode_Eb, OP_SETCC },
	{ "setle", &Instruction::decode_Eb, OP_SETCC },
	{ "setnle", &Instruction::decode_Eb, OP_SETCC },
	
	/* 0x0f 0xa0 - 0x0f 0xaf */
	{ "push", &Instruction::template decode_Reg<operand_t::REG_FS>, OP_PUSH },
	{ "pop", &Instruction::template decode_Reg<operand_t::REG_FS>, OP_POP },
	{ "cpuid", &Instruction::decode0, OP_CPUID },
	{ "bt", &Instruction::decode_Ev_Gv, OP_BT },
	{ "shld", &Instruction::decode_Ev_Gv_Ib, OP_SHLD },
	{ "shld", &Instruction::template decode_Ev_Gv_Reg<operand_t::REG_CL>, OP_SHLD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "push", &Instruction::template decode_Reg<operand_t::REG_GS>, OP_PUSH },
	{ "pop", &Instruction::template decode_Reg<operand_t::REG_GS>, OP_POP },
	{ "rsm", &Instruction::decode0, OP_RSM },
	{ "bts", &Instruction::decode_Ev_Gv, OP_BTS },
	{ "shrd", &Instruction::decode_Ev_Gv_Ib, OP_SHRD },
	{ "shrd", &Instruction::template decode_Ev_Gv_Reg<operand_t::REG_CL>, OP_SHRD },
	{ "group16", &Instruction::decode_group16, OP_GROUP16 },
	{ "imul",  &Instruction::decode_Gv_Ev, OP_IMUL },
	
	/* 0x0f 0xb0 - 0x0f 0xbf */
	{ "cmpxchg", &Instruction::decode_Eb_Gb, OP_CMPXCHG },
	{ "cmpxchg", &Instruction::decode_Ev_Gv, OP_CMPXCHG },
	{ "lss", &Instruction::decode_Gv_Mp, OP_LSS },
	{ "btr", &Instruction::decode_Ev_Gv, OP_BTR },
	{ "lfs", &Instruction::decode_Gv_Mp, OP_LFS },
	{ "lgs", &Instruction::decode_Gv_Mp, OP_LGS },
	{ "movzx", &Instruction::decode_Gv_Eb, OP_MOVZX },
	{ "movzx", &Instruction::decode_Gv_Ew, OP_MOVZX },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "group11", &Instruction::decode_group11, OP_GROUP11 },
	{ "group8", &Instruction::decode_group8, OP_GROUP8 },
	{ "btc", &Instruction::decode_Ev_Gv, OP_BTC },
	{ "bsf", &Instruction::decode_Gv_Ev, OP_BSF },
	{ "bsr", &Instruction::decode_Gv_Ev, OP_BSR },
	{ "movsx", &Instruction::decode_Gv_Eb, OP_MOVSX },
	{ "movsx", &Instruction::decode_Gv_Ew, OP_MOVSX },
	
	/* 0x0f 0xc0 - 0x0f 0xcf */
	{ "xadd", &Instruction::decode_Eb_Gb, OP_XADD },
	{ "xadd", &Instruction::decode_Ev_Gv, OP_XADD },
	{ "cmpps", &Instruction::decode_Vo_Wo_Ib, OP_CMPPS },
	{ "movnti", &Instruction::decode_Md_Gd, OP_MOVNTI },	// x86-64: movnti Nq, Gq
	{ "pinsrw", &Instruction::decode_Pq_Rd_Mw_Ib, OP_PINSRW },	// x86-64: pinsrw Pq, Rq/Mw,Ib
	{ "pextrw", &Instruction::decode_Gd_Nq_Ib, OP_PEXTRW },
	{ "shufps", &Instruction::decode_Vo_Wo_Ib, OP_SHUFPS },
	{ "group9", &Instruction::decode_group9, OP_GROUP9 },
	{ "bswap", &Instruction::decode_rAX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rCX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rDX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rBX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rSP, OP_BSWAP },
	{ "bswap", &Instruction::decode_rBP, OP_BSWAP },
	{ "bswap", &Instruction::decode_rSI, OP_BSWAP },
	{ "bswap", &Instruction::decode_rDI, OP_BSWAP },
	
	/* 0x0f 0xd0 - 0x0f 0xdf */
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "psrlw", &Instruction::decode_Pq_Qq, OP_PSRLW },
	{ "psrld", &Instruction::decode_Pq_Qq, OP_PSRLD },
	{ "psrlq", &Instruction::decode_Pq_Qq, OP_PSRLQ },
	{ "paddq", &Instruction::decode_Pq_Qq, OP_PADDQ },
	{ "pmullw", &Instruction::decode_Pq_Qq, OP_PMULLW },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "pmovmskb", &Instruction::decode_Gd_Nq, OP_PMOVMSKB },
    { "psubusb", &Instruction::decode_Pq_Qq, OP_PSUBUSB },
    { "psubusw", &Instruction::decode_Pq_Qq, OP_PSUBUSW },
    { "pminub", &Instruction::decode_Pq_Qq, OP_PMINUB },
    { "pand", &Instruction::decode_Pq_Qq, OP_PAND },
    { "paddusb", &Instruction::decode_Pq_Qq, OP_PADDUSB },
    { "paddusw", &Instruction::decode_Pq_Qq, OP_PADDUSW },
    { "pmaxub", &Instruction::decode_Pq_Qq, OP_PMAXUB },
    { "pandn", &Instruction::decode_Pq_Qq, OP_PANDN },
	
	/* 0x0f 0xe0 - 0x0f 0xef */
	{ "pavgb", &Instruction::decode_Pq_Qq, OP_PAVGB },
	{ "psraw", &Instruction::decode_Pq_Qq, OP_PSRAW },
	{ "psrad", &Instruction::decode_Pq_Qq, OP_PSRAD },
	{ "pavgw", &Instruction::decode_Pq_Qq, OP_PAVGW },
	{ "pmulhuw", &Instruction::decode_Pq_Qq, OP_PMULHUW },
	{ "pmulhw", &Instruction::decode_Pq_Qq, OP_PMULHW },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movntq", &Instruction::decode_Mq_Pq, OP_MOVNTQ },
	{ "psubsb", &Instruction::decode_Pq_Qq, OP_PSUBSB },
	{ "psubsw", &Instruction::decode_Pq_Qq, OP_PSUBSW },
	{ "pminsw", &Instruction::decode_Pq_Qq, OP_PMINSW },
	{ "por", &Instruction::decode_Pq_Qq, OP_POR },  
	{ "paddsb", &Instruction::decode_Pq_Qq, OP_PADDSB },
	{ "paddsw", &Instruction::decode_Pq_Qq, OP_PADDSW },
	{ "pmaxsw", &Instruction::decode_Pq_Qq, OP_PMAXSW },
	{ "pxor", &Instruction::decode_Pq_Qq, OP_PXOR },
	
	/* 0x0f 0xf0 - 0x0f 0xff */
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "psllw", &Instruction::decode_Pq_Qq, OP_PSLLW },
	{ "pslld", &Instruction::decode_Pq_Qq, OP_PSLLD },
	{ "psllq", &Instruction::decode_Pq_Qq, OP_PSLLQ },
	{ "pmuludq", &Instruction::decode_Pq_Qq, OP_PMULUDQ },
	{ "pmaddwd", &Instruction::decode_Pq_Qq, OP_PMADDWD },
	{ "psadbw", &Instruction::decode_Pq_Qq, OP_PSADBW },
	{ "maskmovq", &Instruction::decode_Pq_Nq, OP_MASKMOVQ },
	{ "psubb", &Instruction::decode_Pq_Qq, OP_PSUBB },
	{ "psubw", &Instruction::decode_Pq_Qq, OP_PSUBW },
	{ "psubd", &Instruction::decode_Pq_Qq, OP_PSUBD },
	{ "psubq", &Instruction::decode_Pq_Qq, OP_PSUBQ },	
	{ "paddb", &Instruction::decode_Pq_Qq, OP_PADDB },
	{ "paddw", &Instruction::decode_Pq_Qq, OP_PADDW },
	{ "paddd", &Instruction::decode_Pq_Qq, OP_PADDD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID }
};


// 2 byte opcodes with a 66 prefix
template <int N>
const typename Instruction<N>::OpcodeEntry Instruction<N>::m_Opcodes2Byte_66[0x100] = {
	
	/* 0x0f 0x00 - 0x0f 0x0f */
	{ "group6", &Instruction::decode_group6, OP_GROUP6 },
	{ "group7", &Instruction::decode_group7, OP_GROUP7 },
	{ "lar", &Instruction::decode_Gv_Ew, OP_LAR },
	{ "lsl", &Instruction::decode_Gv_Ew, OP_LSL },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "syscall", &Instruction::decode0, OP_SYSCALL },
	{ "clts", &Instruction::decode0, OP_CLTS },
	{ "sysret", &Instruction::decode0, OP_SYSRET },
	{ "invd", &Instruction::decode0, OP_INVD },
	{ "wbinvd", &Instruction::decode0, OP_WBINVD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "ud2", &Instruction::decode0, OP_UD2 },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "nop", &Instruction::decode_Ev, OP_NOP },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	
	/* 0x0f 0x10 - 0x0f 0x1f */
	{ "movupd", &Instruction::decode_Vo_Wo, OP_MOVUPD },
	{ "movupd", &Instruction::decode_Wo_Vo, OP_MOVUPD },
	{ "movlpd", &Instruction::decode_Vq_Mq, OP_MOVLPD },
	{ "movlpd", &Instruction::decode_Mq_Vq, OP_MOVLPD },
	{ "unpcklpd", &Instruction::decode_Vo_Wq, OP_UNPCKLPD },
	{ "unpckhpd", &Instruction::decode_Vo_Wq, OP_UNPCKHPD },
	{ "movhpd", &Instruction::decode_Vq_Mq, OP_MOVHPD },
	{ "movhpd", &Instruction::decode_Mq_Vq, OP_MOVHPD },
	{ "group17", &Instruction::decode_group17, OP_GROUP17 },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "nop", &Instruction::decode_Ev, OP_NOP },
	
	/* 0x0f 0x20 - 0x0f 0x2f */
	{ "mov", &Instruction::decode_Rd_Cd, OP_MOV },
	{ "mov", &Instruction::decode_Rd_Dd, OP_MOV },
	{ "mov", &Instruction::decode_Cd_Rd, OP_MOV },
	{ "mov", &Instruction::decode_Dd_Rd, OP_MOV },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movapd", &Instruction::decode_Vo_Wo, OP_MOVAPD },
	{ "movapd", &Instruction::decode_Wo_Vo, OP_MOVAPD },
	{ "cvtpi2pd", &Instruction::decode_Vo_Qq, OP_CVTPI2PD },
	{ "movntpd",  &Instruction::decode_Mo_Vo, OP_MOVNTPD },	
	{ "cvttpd2pi",  &Instruction::decode_Pq_Wo, OP_CVTTPD2PI },
	{ "cvtpd2pi",  &Instruction::decode_Qq_Wo, OP_CVTPD2PI },
	{ "ucomisd",  &Instruction::decode_Vo_Wo, OP_UCOMISD },
	{ "comisd",  &Instruction::decode_Vo_Wo, OP_COMISD },
	
	/* 0x0f 0x30 - 0x0f 0x3f */
	{ "wrmsr", &Instruction::decode0, OP_WRMSR },
	{ "rdtsc", &Instruction::decode0, OP_RDTSC },
	{ "rdmsr", &Instruction::decode0, OP_RDMSR },
	{ "rdpmc", &Instruction::decode0, OP_RDPMC },
	{ "sysenter", &Instruction::decode0, OP_SYSENTER },
	{ "sysexit", &Instruction::decode0, OP_SYSEXIT },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "getsec", &Instruction::decode0, OP_GETSEC },
	{ "3byte", &Instruction::decode_3byte_38, OP_3BYTE },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "3byte", &Instruction::decode_3byte_3A, OP_3BYTE },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	
	/* 0x0f 0x40 - 0x0f 0x4f */
	{ "cmovo", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovno", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovz", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnz", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnbe", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovs", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovns", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovp", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnp", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovl", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnl", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovle", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnle", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	
	/* 0x0f 0x50 - 0x0f 0x5f */
	{ "movmskpd", &Instruction::decode_Gd_Uo, OP_MOVMSKPD },	// x86-64: movmskpd Gq, Uo
	{ "sqrtpd", &Instruction::decode_Vo_Wo, OP_SQRTPD },
	{ "rsqrtps", &Instruction::decode_Vo_Wo, OP_RSQRTPS },
	{ "rcpps", &Instruction::decode_Vo_Wo, OP_RCPPS },
	{ "andpd", &Instruction::decode_Vo_Wo, OP_ANDPD },
	{ "andnpd", &Instruction::decode_Vo_Wo, OP_ANDNPD },
	{ "orpd", &Instruction::decode_Vo_Wo, OP_ORPD },
	{ "xorpd", &Instruction::decode_Vo_Wo, OP_XORPD },
	{ "addpd", &Instruction::decode_Vo_Wo, OP_ADDPD },
	{ "mulpd", &Instruction::decode_Vo_Wo, OP_MULPD },
	{ "cvtpd2ps", &Instruction::decode_Vo_Wo, OP_CVTPD2PS },
	{ "cvtps2dq", &Instruction::decode_Vo_Wo, OP_CVTPS2DQ },
	{ "subpd", &Instruction::decode_Vo_Wo, OP_SUBPD },
	{ "minpd", &Instruction::decode_Vo_Wo, OP_MINPD },
	{ "divpd", &Instruction::decode_Vo_Wo, OP_DIVPD },
	{ "maxpd", &Instruction::decode_Vo_Wo, OP_MAXPD },
	
	/* 0x0f 0x60 - 0x0f 0x6f */
	{ "punpcklbw", &Instruction::decode_Vo_Wo, OP_PUNPCKLBW },
	{ "punpcklwd", &Instruction::decode_Vo_Wo, OP_PUNPCKLWD },
	{ "punpckldq", &Instruction::decode_Vo_Wo, OP_PUNPCKLDQ },
	{ "packsswb", &Instruction::decode_Vo_Wo, OP_PACKSSWB },
	{ "pcmpgtb", &Instruction::decode_Vo_Wo, OP_PCMPGTB },
	{ "pcmpgtw", &Instruction::decode_Vo_Wo, OP_PCMPGTW },
	{ "pcmpgtd", &Instruction::decode_Vo_Wo, OP_PCMPGTD },
	{ "packuswb", &Instruction::decode_Vo_Wo, OP_PACKUSWB },
	{ "punpckhbw", &Instruction::decode_Vo_Wo, OP_PUNPCKHBW },
	{ "punpckhwd", &Instruction::decode_Vo_Wo, OP_PUNPCKHWD },
	{ "punpckhdq", &Instruction::decode_Vo_Wo, OP_PUNPCKHDQ },
	{ "packssdw", &Instruction::decode_Vo_Wo, OP_PACKSSDW },
	{ "punpcklqdq", &Instruction::decode_Vo_Wo, OP_PUNPCKLQDQ },
	{ "punpckhqdq", &Instruction::decode_Vo_Wo, OP_PUNPCKHQDQ },
	{ "movd", &Instruction::decode_Vo_Ed, OP_MOVD },		// x86-64: movq Vo, Eq
	{ "movq", &Instruction::decode_Vo_Qq, OP_MOVQ },
	
	/* 0x0f 0x70 - 0x0f 0x7f */
	{ "pshufd", &Instruction::decode_Vo_Wo_Ib, OP_PSHUFD },
	{ "group13", &Instruction::decode_group13, OP_GROUP13 },
	{ "group14", &Instruction::decode_group14, OP_GROUP14 },
	{ "group15", &Instruction::decode_group15, OP_GROUP15 },
	{ "pcmpeqb", &Instruction::decode_Vo_Wo, OP_PCMPEQB },
	{ "pcmpeqw", &Instruction::decode_Vo_Wo, OP_PCMPEQW },
	{ "pcmpeqd", &Instruction::decode_Vo_Wo, OP_PCMPEQD },
	{ "emms", &Instruction::decode0, OP_EMMS },
	{ "vmread", &Instruction::decode_Ed_Gd, OP_VMREAD },	// x86-64: vmread Eq, Gq
	{ "vmwrite", &Instruction::decode_Gd_Ed, OP_VMWRITE },	// x86-64: vmwrite Gq, Eq
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "haddpd", &Instruction::decode_Vo_Wo, OP_HADDPD },
	{ "hsubpd", &Instruction::decode_Vo_Wo, OP_HSUBPD },
	{ "movd", &Instruction::decode_Ed_Vo, OP_MOVD },		// x86-64: movq Eq, Vo
	{ "movdqa", &Instruction::decode_Wo_Vo, OP_MOVDQA },
	
	/* 0x0f 0x80 - 0x0f 0x8f */
	{ "jo", &Instruction::decode_Jz, OP_JCC },
	{ "jno", &Instruction::decode_Jz, OP_JCC },
	{ "jb", &Instruction::decode_Jz, OP_JCC },
	{ "jnb", &Instruction::decode_Jz, OP_JCC },
	{ "jz", &Instruction::decode_Jz, OP_JCC },
	{ "jnz", &Instruction::decode_Jz, OP_JCC },
	{ "jbe", &Instruction::decode_Jz, OP_JCC },
	{ "jnbe", &Instruction::decode_Jz, OP_JCC },
	{ "js", &Instruction::decode_Jz, OP_JCC },
	{ "jns", &Instruction::decode_Jz, OP_JCC },
	{ "jp", &Instruction::decode_Jz, OP_JCC },
	{ "jnp", &Instruction::decode_Jz, OP_JCC },
	{ "jl", &Instruction::decode_Jz, OP_JCC },
	{ "jnl", &Instruction::decode_Jz, OP_JCC },
	{ "jle", &Instruction::decode_Jz, OP_JCC },
	{ "jnle", &Instruction::decode_Jz, OP_JCC },
	
	/* 0x0f 0x90 - 0x0f 0x9f */
	{ "seto", &Instruction::decode_Eb, OP_SETCC },
	{ "setno", &Instruction::decode_Eb, OP_SETCC },
	{ "setb", &Instruction::decode_Eb, OP_SETCC },
	{ "setnb", &Instruction::decode_Eb, OP_SETCC },
	{ "setz", &Instruction::decode_Eb, OP_SETCC },
	{ "setnz", &Instruction::decode_Eb, OP_SETCC },
	{ "setbe", &Instruction::decode_Eb, OP_SETCC },
	{ "setnbe", &Instruction::decode_Eb, OP_SETCC },
	{ "sets", &Instruction::decode_Eb, OP_SETCC },
	{ "setns", &Instruction::decode_Eb, OP_SETCC },
	{ "setp", &Instruction::decode_Eb, OP_SETCC },
	{ "setnp", &Instruction::decode_Eb, OP_SETCC },
	{ "setl", &Instruction::decode_Eb, OP_SETCC },
	{ "setnl", &Instruction::decode_Eb, OP_SETCC },
	{ "setle", &Instruction::decode_Eb, OP_SETCC },
	{ "setnle", &Instruction::decode_Eb, OP_SETCC },
	
	/* 0x0f 0xa0 - 0x0f 0xaf */
	{ "push", &Instruction::template decode_Reg<operand_t::REG_FS>, OP_PUSH },
	{ "pop", &Instruction::template decode_Reg<operand_t::REG_FS>, OP_POP },
	{ "cpuid", &Instruction::decode0, OP_CPUID },
	{ "bt", &Instruction::decode_Ev_Gv, OP_BT },
	{ "shld", &Instruction::decode_Ev_Gv_Ib, OP_SHLD },
	{ "shld", &Instruction::template decode_Ev_Gv_Reg<operand_t::REG_CL>, OP_SHLD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "push", &Instruction::template decode_Reg<operand_t::REG_GS>, OP_PUSH },
	{ "pop", &Instruction::template decode_Reg<operand_t::REG_GS>, OP_POP },
	{ "rsm", &Instruction::decode0, OP_RSM },
	{ "bts", &Instruction::decode_Ev_Gv, OP_BTS },
	{ "shrd", &Instruction::decode_Ev_Gv_Ib, OP_SHRD },
	{ "shrd", &Instruction::template decode_Ev_Gv_Reg<operand_t::REG_CL>, OP_SHRD },
	{ "group16", &Instruction::decode_group16, OP_GROUP16 },
	{ "imul",  &Instruction::decode_Gv_Ev, OP_IMUL },
	
	/* 0x0f 0xb0 - 0x0f 0xbf */
	{ "cmpxchg", &Instruction::decode_Eb_Gb, OP_CMPXCHG },
	{ "cmpxchg", &Instruction::decode_Ev_Gv, OP_CMPXCHG },
	{ "lss", &Instruction::decode_Gv_Mp, OP_LSS },
	{ "btr", &Instruction::decode_Ev_Gv, OP_BTR },
	{ "lfs", &Instruction::decode_Gv_Mp, OP_LFS },
	{ "lgs", &Instruction::decode_Gv_Mp, OP_LGS },
	{ "movzx", &Instruction::decode_Gv_Eb, OP_MOVZX },
	{ "movzx", &Instruction::decode_Gv_Ew, OP_MOVZX },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "group11", &Instruction::decode_group11, OP_GROUP11 },
	{ "group8", &Instruction::decode_group8, OP_GROUP8 },
	{ "btc", &Instruction::decode_Ev_Gv, OP_BTC },
	{ "bsf", &Instruction::decode_Gv_Ev, OP_BSF },
	{ "bsr", &Instruction::decode_Gv_Ev, OP_BSR },
	{ "movsx", &Instruction::decode_Gv_Eb, OP_MOVSX },
	{ "movsx", &Instruction::decode_Gv_Ew, OP_MOVSX },
	
	/* 0x0f 0xc0 - 0x0f 0xcf */
	{ "xadd", &Instruction::decode_Eb_Gb, OP_XADD },
	{ "xadd", &Instruction::decode_Ev_Gv, OP_XADD },
	{ "cmppd", &Instruction::decode_Vo_Wo_Ib, OP_CMPPD },
	{ "movnti", &Instruction::decode_Md_Gd, OP_MOVNTI },	// x86-64: movnti Nq, Gq
	{ "pinsrw", &Instruction::decode_Vo_Rd_Mw_Ib, OP_PINSRW },	// x86-64: pinsrw Vo, Rq/Mw,Ib
	{ "pextrw", &Instruction::decode_Gd_Uo_Ib, OP_PEXTRW },
	{ "shufpd", &Instruction::decode_Vo_Wo_Ib, OP_SHUFPD },
	{ "group9", &Instruction::decode_group9, OP_GROUP9 },
	{ "bswap", &Instruction::decode_rAX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rCX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rDX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rBX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rSP, OP_BSWAP },
	{ "bswap", &Instruction::decode_rBP, OP_BSWAP },
	{ "bswap", &Instruction::decode_rSI, OP_BSWAP },
	{ "bswap", &Instruction::decode_rDI, OP_BSWAP },
	
	/* 0x0f 0xd0 - 0x0f 0xdf */
	{ "addsubpd", &Instruction::decode_Vo_Wo, OP_ADDSUBPD },
	{ "psrlw", &Instruction::decode_Vo_Wo, OP_PSRLW },
	{ "psrld", &Instruction::decode_Vo_Wo, OP_PSRLD },
	{ "psrlq", &Instruction::decode_Vo_Wo, OP_PSRLQ },
	{ "paddq", &Instruction::decode_Vo_Wo, OP_PADDQ },
	{ "pmullw", &Instruction::decode_Vo_Wo, OP_PMULLW },
	{ "movq", &Instruction::decode_Vo_Wo, OP_MOVQ },
	{ "pmovmskb", &Instruction::decode_Gd_Uo, OP_PMOVMSKB },
    { "psubusb", &Instruction::decode_Vo_Wo, OP_PSUBUSB },
    { "psubusw", &Instruction::decode_Vo_Wo, OP_PSUBUSW },
    { "pminub", &Instruction::decode_Vo_Wo, OP_PMINUB },
    { "pand", &Instruction::decode_Vo_Wo, OP_PAND },
    { "paddusb", &Instruction::decode_Vo_Wo, OP_PADDUSB },
    { "paddusw", &Instruction::decode_Vo_Wo, OP_PADDUSW },
    { "pmaxub", &Instruction::decode_Vo_Wo, OP_PMAXUB },
    { "pandn", &Instruction::decode_Vo_Wo, OP_PANDN },
	
	/* 0x0f 0xe0 - 0x0f 0xef */
	{ "pavgb", &Instruction::decode_Vo_Wo, OP_PAVGB },
	{ "psraw", &Instruction::decode_Vo_Wo, OP_PSRAW },
	{ "psrad", &Instruction::decode_Vo_Wo, OP_PSRAD },
	{ "pavgw", &Instruction::decode_Vo_Wo, OP_PAVGW },
	{ "pmulhuw", &Instruction::decode_Vo_Wo, OP_PMULHUW },
	{ "pmulhw", &Instruction::decode_Vo_Wo, OP_PMULHW },
	{ "cvttpd2dq", &Instruction::decode_Vo_Wo, OP_CVTTPD2DQ },
	{ "movntdq", &Instruction::decode_Mo_Vo, OP_MOVNTDQ },
	{ "psubsb", &Instruction::decode_Vo_Wo, OP_PSUBSB },
	{ "psubsw", &Instruction::decode_Vo_Wo, OP_PSUBSW },
	{ "pminsw", &Instruction::decode_Vo_Wo, OP_PMINSW },
	{ "por", &Instruction::decode_Vo_Wo, OP_POR },  
	{ "paddsb", &Instruction::decode_Vo_Wo, OP_PADDSB },
	{ "paddsw", &Instruction::decode_Vo_Wo, OP_PADDSW },
	{ "pmaxsw", &Instruction::decode_Vo_Wo, OP_PMAXSW },
	{ "pxor", &Instruction::decode_Vo_Wo, OP_PXOR },
	
	/* 0x0f 0xf0 - 0x0f 0xff */
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "psllw", &Instruction::decode_Vo_Wo, OP_PSLLW },
	{ "pslld", &Instruction::decode_Vo_Wo, OP_PSLLD },
	{ "psllq", &Instruction::decode_Vo_Wo, OP_PSLLQ },
	{ "pmuludq", &Instruction::decode_Vo_Wo, OP_PMULUDQ },
	{ "pmaddwd", &Instruction::decode_Vo_Wo, OP_PMADDWD },
	{ "psadbw", &Instruction::decode_Vo_Wo, OP_PSADBW },
	{ "maskmovdqu", &Instruction::decode_Vo_Uo, OP_MASKMOVDQU },
	{ "psubb", &Instruction::decode_Vo_Wo, OP_PSUBB },
	{ "psubw", &Instruction::decode_Vo_Wo, OP_PSUBW },
	{ "psubd", &Instruction::decode_Vo_Wo, OP_PSUBD },
	{ "psubq", &Instruction::decode_Vo_Wo, OP_PSUBQ },	
	{ "paddb", &Instruction::decode_Vo_Wo, OP_PADDB },
	{ "paddw", &Instruction::decode_Vo_Wo, OP_PADDW },
	{ "paddd", &Instruction::decode_Vo_Wo, OP_PADDD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID }
};

// 2 byte opcodes with a f2 prefix
template <int N>
const typename Instruction<N>::OpcodeEntry Instruction<N>::m_Opcodes2Byte_F2[0x100] = {

	/* 0x0f 0x00 - 0x0f 0x0f */
	{ "group6", &Instruction::decode_group6, OP_GROUP6 },
	{ "group7", &Instruction::decode_group7, OP_GROUP7 },
	{ "lar", &Instruction::decode_Gv_Ew, OP_LAR },
	{ "lsl", &Instruction::decode_Gv_Ew, OP_LSL },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "syscall", &Instruction::decode0, OP_SYSCALL },
	{ "clts", &Instruction::decode0, OP_CLTS },
	{ "sysret", &Instruction::decode0, OP_SYSRET },
	{ "invd", &Instruction::decode0, OP_INVD },
	{ "wbinvd", &Instruction::decode0, OP_WBINVD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "ud2", &Instruction::decode0, OP_UD2 },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "nop", &Instruction::decode_Ev, OP_NOP },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	
	/* 0x0f 0x10 - 0x0f 0x1f */
	{ "movsd", &Instruction::decode_Vo_Wo, OP_MOVSD },
	{ "movsd", &Instruction::decode_Wo_Vo, OP_MOVSD },
	{ "movddup", &Instruction::decode_Vq_Mq, OP_MOVDDUP },
	{ "movlps", &Instruction::decode_Mq_Vq, OP_MOVLPS },
	{ "unpcklps", &Instruction::decode_Vo_Wq, OP_UNPCKLPS },
	{ "unpckhps", &Instruction::decode_Vo_Wq, OP_UNPCKHPS },
	{ "movhps", &Instruction::decode_Vq_Mq, OP_MOVHPS },
	{ "movhps", &Instruction::decode_Mq_Vq, OP_MOVHPS },
	{ "group17", &Instruction::decode_group17, OP_GROUP17 },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "nop", &Instruction::decode_Ev, OP_NOP },
	
	/* 0x0f 0x20 - 0x0f 0x2f */
	{ "mov", &Instruction::decode_Rd_Cd, OP_MOV },
	{ "mov", &Instruction::decode_Rd_Dd, OP_MOV },
	{ "mov", &Instruction::decode_Cd_Rd, OP_MOV },
	{ "mov", &Instruction::decode_Dd_Rd, OP_MOV },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movaps", &Instruction::decode_Vo_Wo, OP_MOVAPS },
	{ "movaps", &Instruction::decode_Wo_Vo, OP_MOVAPS },
	{ "cvtsi2sd", &Instruction::decode_Vo_Ed, OP_CVTSI2SD },	// x86-64: cvtsi2sd Vo, Eq
	{ "movntps",  &Instruction::decode_Mo_Vo, OP_MOVNTPS },	
	{ "cvttsd2si",  &Instruction::decode_Gd_Wo, OP_CVTTSD2SI },	// x86-64: cvttsd2si Gq, Wo
	{ "cvtsd2si",  &Instruction::decode_Gd_Wo, OP_CVTSD2SI },	// x86-64: cvtsd2si Gq, Wo
	{ "ucomiss",  &Instruction::decode_Vo_Wo, OP_UCOMISS },
	{ "comiss",  &Instruction::decode_Vo_Wo, OP_COMISS },
	
	/* 0x0f 0x30 - 0x0f 0x3f */
	{ "wrmsr", &Instruction::decode0, OP_WRMSR },
	{ "rdtsc", &Instruction::decode0, OP_RDTSC },
	{ "rdmsr", &Instruction::decode0, OP_RDMSR },
	{ "rdpmc", &Instruction::decode0, OP_RDPMC },
	{ "sysenter", &Instruction::decode0, OP_SYSENTER },
	{ "sysexit", &Instruction::decode0, OP_SYSEXIT },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "getsec", &Instruction::decode0, OP_GETSEC },
	{ "3byte", &Instruction::decode_3byte_38, OP_3BYTE },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "3byte", &Instruction::decode_3byte_3A, OP_3BYTE },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	
	/* 0x0f 0x40 - 0x0f 0x4f */
	{ "cmovo", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovno", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovz", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnz", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnbe", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovs", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovns", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovp", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnp", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovl", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnl", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovle", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnle", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	
	/* 0x0f 0x50 - 0x0f 0x5f */
	{ "movmskps", &Instruction::decode_Gd_Uo, OP_MOVMSKPS },	// x86-64: movmskps Gq, Uo
	{ "sqrtsd", &Instruction::decode_Vo_Wo, OP_SQRTSD },
	{ "rsqrtps", &Instruction::decode_Vo_Wo, OP_RSQRTPS },
	{ "rcpps", &Instruction::decode_Vo_Wo, OP_RCPPS },
	{ "andps", &Instruction::decode_Vo_Wo, OP_ANDPS },
	{ "andnps", &Instruction::decode_Vo_Wo, OP_ANDNPS },
	{ "orps", &Instruction::decode_Vo_Wo, OP_ORPS },
	{ "xorps", &Instruction::decode_Vo_Wo, OP_XORPS },
	{ "addsd", &Instruction::decode_Vo_Wo, OP_ADDSD },
	{ "mulsd", &Instruction::decode_Vo_Wo, OP_MULSD },
	{ "cvtsd2ss", &Instruction::decode_Vo_Wo, OP_CVTSD2SS },
	{ "cvtdq2ps", &Instruction::decode_Vo_Wo, OP_CVTDQ2PS },
	{ "subsd", &Instruction::decode_Vo_Wo, OP_SUBSD },
	{ "minsd", &Instruction::decode_Vo_Wo, OP_MINSD },
	{ "divsd", &Instruction::decode_Vo_Wo, OP_DIVSD },
	{ "maxsd", &Instruction::decode_Vo_Wo, OP_MAXSD },
	
	/* 0x0f 0x60 - 0x0f 0x6f */
	{ "punpcklbw", &Instruction::decode_Pq_Qd, OP_PUNPCKLBW },
	{ "punpcklwd", &Instruction::decode_Pq_Qd, OP_PUNPCKLWD },
	{ "punpckldq", &Instruction::decode_Pq_Qd, OP_PUNPCKLDQ },
	{ "packsswb", &Instruction::decode_Pq_Qq, OP_PACKSSWB },
	{ "pcmpgtb", &Instruction::decode_Pq_Qq, OP_PCMPGTB },
	{ "pcmpgtw", &Instruction::decode_Pq_Qq, OP_PCMPGTW },
	{ "pcmpgtd", &Instruction::decode_Pq_Qq, OP_PCMPGTD },
	{ "packuswb", &Instruction::decode_Pq_Qq, OP_PACKUSWB },
	{ "punpckhbw", &Instruction::decode_Pq_Qd, OP_PUNPCKHBW },
	{ "punpckhwd", &Instruction::decode_Pq_Qd, OP_PUNPCKHWD },
	{ "punpckhdq", &Instruction::decode_Pq_Qd, OP_PUNPCKHDQ },
	{ "packssdw", &Instruction::decode_Pq_Qq, OP_PACKSSDW },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movd", &Instruction::decode_Pd_Ed, OP_MOVD },		// x86-64: movq Pd, Eq
	{ "movq", &Instruction::decode_Pq_Qq, OP_MOVQ },
	
	/* 0x0f 0x70 - 0x0f 0x7f */
	{ "pshuflw", &Instruction::decode_Vo_Wo_Ib, OP_PSHUFLW },
	{ "group13", &Instruction::decode_group13, OP_GROUP13 },
	{ "group14", &Instruction::decode_group14, OP_GROUP14 },
	{ "group15", &Instruction::decode_group15, OP_GROUP15 },
	{ "pcmpeqb", &Instruction::decode_Pq_Qq, OP_PCMPEQB },
	{ "pcmpeqw", &Instruction::decode_Pq_Qq, OP_PCMPEQW },
	{ "pcmpeqd", &Instruction::decode_Pq_Qq, OP_PCMPEQD },
	{ "emms", &Instruction::decode0, OP_EMMS },
	{ "vmread", &Instruction::decode_Ed_Gd, OP_VMREAD },	// x86-64: vmread Eq, Gq
	{ "vmwrite", &Instruction::decode_Gd_Ed, OP_VMWRITE },	// x86-64: vmwrite Gq, Eq
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "haddps", &Instruction::decode_Vo_Wo, OP_HADDPS },
	{ "hsubps", &Instruction::decode_Vo_Wo, OP_HSUBPS },
	{ "movd", &Instruction::decode_Ed_Pd, OP_MOVD },		// x86-64: movq Eq,Pd
	{ "movq", &Instruction::decode_Qq_Pq, OP_MOVQ },
	
	/* 0x0f 0x80 - 0x0f 0x8f */
	{ "jo", &Instruction::decode_Jz, OP_JCC },
	{ "jno", &Instruction::decode_Jz, OP_JCC },
	{ "jb", &Instruction::decode_Jz, OP_JCC },
	{ "jnb", &Instruction::decode_Jz, OP_JCC },
	{ "jz", &Instruction::decode_Jz, OP_JCC },
	{ "jnz", &Instruction::decode_Jz, OP_JCC },
	{ "jbe", &Instruction::decode_Jz, OP_JCC },
	{ "jnbe", &Instruction::decode_Jz, OP_JCC },
	{ "js", &Instruction::decode_Jz, OP_JCC },
	{ "jns", &Instruction::decode_Jz, OP_JCC },
	{ "jp", &Instruction::decode_Jz, OP_JCC },
	{ "jnp", &Instruction::decode_Jz, OP_JCC },
	{ "jl", &Instruction::decode_Jz, OP_JCC },
	{ "jnl", &Instruction::decode_Jz, OP_JCC },
	{ "jle", &Instruction::decode_Jz, OP_JCC },
	{ "jnle", &Instruction::decode_Jz, OP_JCC },
	
	/* 0x0f 0x90 - 0x0f 0x9f */
	{ "seto", &Instruction::decode_Eb, OP_SETCC },
	{ "setno", &Instruction::decode_Eb, OP_SETCC },
	{ "setb", &Instruction::decode_Eb, OP_SETCC },
	{ "setnb", &Instruction::decode_Eb, OP_SETCC },
	{ "setz", &Instruction::decode_Eb, OP_SETCC },
	{ "setnz", &Instruction::decode_Eb, OP_SETCC },
	{ "setbe", &Instruction::decode_Eb, OP_SETCC },
	{ "setnbe", &Instruction::decode_Eb, OP_SETCC },
	{ "sets", &Instruction::decode_Eb, OP_SETCC },
	{ "setns", &Instruction::decode_Eb, OP_SETCC },
	{ "setp", &Instruction::decode_Eb, OP_SETCC },
	{ "setnp", &Instruction::decode_Eb, OP_SETCC },
	{ "setl", &Instruction::decode_Eb, OP_SETCC },
	{ "setnl", &Instruction::decode_Eb, OP_SETCC },
	{ "setle", &Instruction::decode_Eb, OP_SETCC },
	{ "setnle", &Instruction::decode_Eb, OP_SETCC },
	
	/* 0x0f 0xa0 - 0x0f 0xaf */
	{ "push", &Instruction::template decode_Reg<operand_t::REG_FS>, OP_PUSH },
	{ "pop", &Instruction::template decode_Reg<operand_t::REG_FS>, OP_POP },
	{ "cpuid", &Instruction::decode0, OP_CPUID },
	{ "bt", &Instruction::decode_Ev_Gv, OP_BT },
	{ "shld", &Instruction::decode_Ev_Gv_Ib, OP_SHLD },
	{ "shld", &Instruction::template decode_Ev_Gv_Reg<operand_t::REG_CL>, OP_SHLD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "push", &Instruction::template decode_Reg<operand_t::REG_GS>, OP_PUSH },
	{ "pop", &Instruction::template decode_Reg<operand_t::REG_GS>, OP_POP },
	{ "rsm", &Instruction::decode0, OP_RSM },
	{ "bts", &Instruction::decode_Ev_Gv, OP_BTS },
	{ "shrd", &Instruction::decode_Ev_Gv_Ib, OP_SHRD },
	{ "shrd", &Instruction::template decode_Ev_Gv_Reg<operand_t::REG_CL>, OP_SHRD },
	{ "group16", &Instruction::decode_group16, OP_GROUP16 },
	{ "imul",  &Instruction::decode_Gv_Ev, OP_IMUL },
	
	/* 0x0f 0xb0 - 0x0f 0xbf */
	{ "cmpxchg", &Instruction::decode_Eb_Gb, OP_CMPXCHG },
	{ "cmpxchg", &Instruction::decode_Ev_Gv, OP_CMPXCHG },
	{ "lss", &Instruction::decode_Gv_Mp, OP_LSS },
	{ "btr", &Instruction::decode_Ev_Gv, OP_BTR },
	{ "lfs", &Instruction::decode_Gv_Mp, OP_LFS },
	{ "lgs", &Instruction::decode_Gv_Mp, OP_LGS },
	{ "movzx", &Instruction::decode_Gv_Eb, OP_MOVZX },
	{ "movzx", &Instruction::decode_Gv_Ew, OP_MOVZX },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "group11", &Instruction::decode_group11, OP_GROUP11 },
	{ "group8", &Instruction::decode_group8, OP_GROUP8 },
	{ "btc", &Instruction::decode_Ev_Gv, OP_BTC },
	{ "bsf", &Instruction::decode_Gv_Ev, OP_BSF },
	{ "bsr", &Instruction::decode_Gv_Ev, OP_BSR },
	{ "movsx", &Instruction::decode_Gv_Eb, OP_MOVSX },
	{ "movsx", &Instruction::decode_Gv_Ew, OP_MOVSX },
	
	/* 0x0f 0xc0 - 0x0f 0xcf */
	{ "xadd", &Instruction::decode_Eb_Gb, OP_XADD },
	{ "xadd", &Instruction::decode_Ev_Gv, OP_XADD },
	{ "cmpsd", &Instruction::decode_Vo_Wo_Ib, OP_CMPSD },
	{ "movnti", &Instruction::decode_Md_Gd, OP_MOVNTI },	// x86-64: movnti Nq, Gq
	{ "pinsrw", &Instruction::decode_Pq_Rd_Mw_Ib, OP_PINSRW },	// x86-64: pinsrw Pq, Rq/Mw,Ib
	{ "pextrw", &Instruction::decode_Gd_Nq_Ib, OP_PEXTRW },
	{ "shufps", &Instruction::decode_Vo_Wo_Ib, OP_SHUFPS },
	{ "group9", &Instruction::decode_group9, OP_GROUP9 },
	{ "bswap", &Instruction::decode_rAX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rCX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rDX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rBX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rSP, OP_BSWAP },
	{ "bswap", &Instruction::decode_rBP, OP_BSWAP },
	{ "bswap", &Instruction::decode_rSI, OP_BSWAP },
	{ "bswap", &Instruction::decode_rDI, OP_BSWAP },
	
	/* 0x0f 0xd0 - 0x0f 0xdf */
	{ "addsubps", &Instruction::decode_Vo_Wo, OP_ADDSUBPS },
	{ "psrlw", &Instruction::decode_Pq_Qq, OP_PSRLW },
	{ "psrld", &Instruction::decode_Pq_Qq, OP_PSRLD },
	{ "psrlq", &Instruction::decode_Pq_Qq, OP_PSRLQ },
	{ "paddq", &Instruction::decode_Pq_Qq, OP_PADDQ },
	{ "pmullw", &Instruction::decode_Pq_Qq, OP_PMULLW },
	{ "movdq2q", &Instruction::decode_Pq_Qq, OP_MOVDQ2Q },
	{ "pmovmskb", &Instruction::decode_Gd_Nq, OP_PMOVMSKB },
    { "psubusb", &Instruction::decode_Pq_Qq, OP_PSUBUSB },
    { "psubusw", &Instruction::decode_Pq_Qq, OP_PSUBUSW },
    { "pminub", &Instruction::decode_Pq_Qq, OP_PMINUB },
    { "pand", &Instruction::decode_Pq_Qq, OP_PAND },
    { "paddusb", &Instruction::decode_Pq_Qq, OP_PADDUSB },
    { "paddusw", &Instruction::decode_Pq_Qq, OP_PADDUSW },
    { "pmaxub", &Instruction::decode_Pq_Qq, OP_PMAXUB },
    { "pandn", &Instruction::decode_Pq_Qq, OP_PANDN },
	
	/* 0x0f 0xe0 - 0x0f 0xef */
	{ "pavgb", &Instruction::decode_Pq_Qq, OP_PAVGB },
	{ "psraw", &Instruction::decode_Pq_Qq, OP_PSRAW },
	{ "psrad", &Instruction::decode_Pq_Qq, OP_PSRAD },
	{ "pavgw", &Instruction::decode_Pq_Qq, OP_PAVGW },
	{ "pmulhuw", &Instruction::decode_Pq_Qq, OP_PMULHUW },
	{ "pmulhw", &Instruction::decode_Pq_Qq, OP_PMULHW },
	{ "cvtpd2dq", &Instruction::decode_Vo_Wo, OP_CVTPD2DQ },
	{ "movntq", &Instruction::decode_Mq_Pq, OP_MOVNTQ },
	{ "psubsb", &Instruction::decode_Pq_Qq, OP_PSUBSB },
	{ "psubsw", &Instruction::decode_Pq_Qq, OP_PSUBSW },
	{ "pminsw", &Instruction::decode_Pq_Qq, OP_PMINSW },
	{ "por", &Instruction::decode_Pq_Qq, OP_POR },  
	{ "paddsb", &Instruction::decode_Pq_Qq, OP_PADDSB },
	{ "paddsw", &Instruction::decode_Pq_Qq, OP_PADDSW },
	{ "pmaxsw", &Instruction::decode_Pq_Qq, OP_PMAXSW },
	{ "pxor", &Instruction::decode_Pq_Qq, OP_PXOR },
	
	/* 0x0f 0xf0 - 0x0f 0xff */
	{ "lddqu", &Instruction::decode_Vo_Mo, OP_LDDQU },
	{ "psllw", &Instruction::decode_Pq_Qq, OP_PSLLW },
	{ "pslld", &Instruction::decode_Pq_Qq, OP_PSLLD },
	{ "psllq", &Instruction::decode_Pq_Qq, OP_PSLLQ },
	{ "pmuludq", &Instruction::decode_Pq_Qq, OP_PMULUDQ },
	{ "pmaddwd", &Instruction::decode_Pq_Qq, OP_PMADDWD },
	{ "psadbw", &Instruction::decode_Pq_Qq, OP_PSADBW },
	{ "maskmovq", &Instruction::decode_Pq_Nq, OP_MASKMOVQ },
	{ "psubb", &Instruction::decode_Pq_Qq, OP_PSUBB },
	{ "psubw", &Instruction::decode_Pq_Qq, OP_PSUBW },
	{ "psubd", &Instruction::decode_Pq_Qq, OP_PSUBD },
	{ "psubq", &Instruction::decode_Pq_Qq, OP_PSUBQ },	
	{ "paddb", &Instruction::decode_Pq_Qq, OP_PADDB },
	{ "paddw", &Instruction::decode_Pq_Qq, OP_PADDW },
	{ "paddd", &Instruction::decode_Pq_Qq, OP_PADDD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID }
};

// 2 byte opcodes with a f3 prefix
template <int N>
const typename Instruction<N>::OpcodeEntry Instruction<N>::m_Opcodes2Byte_F3[0x100] = {

	/* 0x0f 0x00 - 0x0f 0x0f */
	{ "group6", &Instruction::decode_group6, OP_GROUP6 },
	{ "group7", &Instruction::decode_group7, OP_GROUP7 },
	{ "lar", &Instruction::decode_Gv_Ew, OP_LAR },
	{ "lsl", &Instruction::decode_Gv_Ew, OP_LSL },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "syscall", &Instruction::decode0, OP_SYSCALL },
	{ "clts", &Instruction::decode0, OP_CLTS },
	{ "sysret", &Instruction::decode0, OP_SYSRET },
	{ "invd", &Instruction::decode0, OP_INVD },
	{ "wbinvd", &Instruction::decode0, OP_WBINVD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "ud2", &Instruction::decode0, OP_UD2 },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "nop", &Instruction::decode_Ev, OP_NOP },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	
	/* 0x0f 0x10 - 0x0f 0x1f */
	{ "movss", &Instruction::decode_Vo_Wo, OP_MOVSS },
	{ "movss", &Instruction::decode_Wo_Vo, OP_MOVSS },
	{ "movsldup", &Instruction::decode_Vq_Wq, OP_MOVSLDUP },
	{ "movlps", &Instruction::decode_Mq_Vq, OP_MOVLPS },
	{ "unpcklps", &Instruction::decode_Vo_Wq, OP_UNPCKLPS },
	{ "unpckhps", &Instruction::decode_Vo_Wq, OP_UNPCKHPS },
	{ "movshdup", &Instruction::decode_Vq_Wq, OP_MOVSHDUP },
	{ "movhps", &Instruction::decode_Mq_Vq, OP_MOVHPS },
	{ "group17", &Instruction::decode_group17, OP_GROUP17 },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "nop", &Instruction::decode_Ev, OP_NOP },
	
	/* 0x0f 0x20 - 0x0f 0x2f */
	{ "mov", &Instruction::decode_Rd_Cd, OP_MOV },
	{ "mov", &Instruction::decode_Rd_Dd, OP_MOV },
	{ "mov", &Instruction::decode_Cd_Rd, OP_MOV },
	{ "mov", &Instruction::decode_Dd_Rd, OP_MOV },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movaps", &Instruction::decode_Vo_Wo, OP_MOVAPS },
	{ "movaps", &Instruction::decode_Wo_Vo, OP_MOVAPS },
	{ "cvtsi2ss", &Instruction::decode_Vo_Ed, OP_CVTSI2SS },	// x86-64: cvtsi2ss Vo, Eq
	{ "movntps",  &Instruction::decode_Mo_Vo, OP_MOVNTPS },	
	{ "cvttss2si",  &Instruction::decode_Gd_Wo, OP_CVTTSS2SI },	// x86-64: cvttss2si Gq, Wo
	{ "cvtss2si",  &Instruction::decode_Gd_Wo, OP_CVTSS2SI },	// x86-64: cvtss2si Gq, Wo
	{ "ucomiss",  &Instruction::decode_Vo_Wo, OP_UCOMISS },
	{ "comiss",  &Instruction::decode_Vo_Wo, OP_COMISS },
	
	/* 0x0f 0x30 - 0x0f 0x3f */
	{ "wrmsr", &Instruction::decode0, OP_WRMSR },
	{ "rdtsc", &Instruction::decode0, OP_RDTSC },
	{ "rdmsr", &Instruction::decode0, OP_RDMSR },
	{ "rdpmc", &Instruction::decode0, OP_RDPMC },
	{ "sysenter", &Instruction::decode0, OP_SYSENTER },
	{ "sysexit", &Instruction::decode0, OP_SYSEXIT },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "getsec", &Instruction::decode0, OP_GETSEC },
	{ "3byte", &Instruction::decode_3byte_38, OP_3BYTE },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "3byte", &Instruction::decode_3byte_3A, OP_3BYTE },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	
	/* 0x0f 0x40 - 0x0f 0x4f */
	{ "cmovo", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovno", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovz", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnz", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovb", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnbe", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovs", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovns", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovp", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnp", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovl", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnl", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovle", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	{ "cmovnle", &Instruction::decode_Gv_Ev, OP_CMOVCC },
	
	/* 0x0f 0x50 - 0x0f 0x5f */
	{ "movmskps", &Instruction::decode_Gd_Uo, OP_MOVMSKPS },	// x86-64: movmskps Gq, Uo
	{ "sqrtss", &Instruction::decode_Vo_Wo, OP_SQRTSS },
	{ "rsqrtss", &Instruction::decode_Vo_Wo, OP_RSQRTSS },
	{ "rcpss", &Instruction::decode_Vo_Wo, OP_RCPSS },
	{ "andps", &Instruction::decode_Vo_Wo, OP_ANDPS },
	{ "andnps", &Instruction::decode_Vo_Wo, OP_ANDNPS },
	{ "orps", &Instruction::decode_Vo_Wo, OP_ORPS },
	{ "xorps", &Instruction::decode_Vo_Wo, OP_XORPS },
	{ "addss", &Instruction::decode_Vo_Wo, OP_ADDSS },
	{ "mulss", &Instruction::decode_Vo_Wo, OP_MULSS },
	{ "cvtss2sd", &Instruction::decode_Vo_Wo, OP_CVTSS2SD },
	{ "cvttps2dq", &Instruction::decode_Vo_Wo, OP_CVTTPS2DQ },
	{ "subss", &Instruction::decode_Vo_Wo, OP_SUBSS },
	{ "minss", &Instruction::decode_Vo_Wo, OP_MINSS },
	{ "divss", &Instruction::decode_Vo_Wo, OP_DIVSS },
	{ "maxss", &Instruction::decode_Vo_Wo, OP_MAXSS },
	
	/* 0x0f 0x60 - 0x0f 0x6f */
	{ "punpcklbw", &Instruction::decode_Pq_Qd, OP_PUNPCKLBW },
	{ "punpcklwd", &Instruction::decode_Pq_Qd, OP_PUNPCKLWD },
	{ "punpckldq", &Instruction::decode_Pq_Qd, OP_PUNPCKLDQ },
	{ "packsswb", &Instruction::decode_Pq_Qq, OP_PACKSSWB },
	{ "pcmpgtb", &Instruction::decode_Pq_Qq, OP_PCMPGTB },
	{ "pcmpgtw", &Instruction::decode_Pq_Qq, OP_PCMPGTW },
	{ "pcmpgtd", &Instruction::decode_Pq_Qq, OP_PCMPGTD },
	{ "packuswb", &Instruction::decode_Pq_Qq, OP_PACKUSWB },
	{ "punpckhbw", &Instruction::decode_Pq_Qd, OP_PUNPCKHBW },
	{ "punpckhwd", &Instruction::decode_Pq_Qd, OP_PUNPCKHWD },
	{ "punpckhdq", &Instruction::decode_Pq_Qd, OP_PUNPCKHDQ },
	{ "packssdw", &Instruction::decode_Pq_Qq, OP_PACKSSDW },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movd", &Instruction::decode_Pd_Ed, OP_MOVD },		// x86-64: movq Pd, Eq
	{ "movdqu", &Instruction::decode_Vo_Wo, OP_MOVDQU },
	
	/* 0x0f 0x70 - 0x0f 0x7f */
	{ "pshufhw", &Instruction::decode_Vo_Wo_Ib, OP_PSHUFHW },
	{ "group13", &Instruction::decode_group13, OP_GROUP13 },
	{ "group14", &Instruction::decode_group14, OP_GROUP14 },
	{ "group15", &Instruction::decode_group15, OP_GROUP15 },
	{ "pcmpeqb", &Instruction::decode_Pq_Qq, OP_PCMPEQB },
	{ "pcmpeqw", &Instruction::decode_Pq_Qq, OP_PCMPEQW },
	{ "pcmpeqd", &Instruction::decode_Pq_Qq, OP_PCMPEQD },
	{ "emms", &Instruction::decode0, OP_EMMS },
	{ "vmread", &Instruction::decode_Ed_Gd, OP_VMREAD },	// x86-64: vmread Eq, Gq
	{ "vmwrite", &Instruction::decode_Gd_Ed, OP_VMWRITE },	// x86-64: vmwrite Gq, Eq
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "movq", &Instruction::decode_Vq_Wq, OP_MOVQ },
	{ "movdqu", &Instruction::decode_Wo_Vo, OP_MOVDQU },
	
	/* 0x0f 0x80 - 0x0f 0x8f */
	{ "jo", &Instruction::decode_Jz, OP_JCC },
	{ "jno", &Instruction::decode_Jz, OP_JCC },
	{ "jb", &Instruction::decode_Jz, OP_JCC },
	{ "jnb", &Instruction::decode_Jz, OP_JCC },
	{ "jz", &Instruction::decode_Jz, OP_JCC },
	{ "jnz", &Instruction::decode_Jz, OP_JCC },
	{ "jbe", &Instruction::decode_Jz, OP_JCC },
	{ "jnbe", &Instruction::decode_Jz, OP_JCC },
	{ "js", &Instruction::decode_Jz, OP_JCC },
	{ "jns", &Instruction::decode_Jz, OP_JCC },
	{ "jp", &Instruction::decode_Jz, OP_JCC },
	{ "jnp", &Instruction::decode_Jz, OP_JCC },
	{ "jl", &Instruction::decode_Jz, OP_JCC },
	{ "jnl", &Instruction::decode_Jz, OP_JCC },
	{ "jle", &Instruction::decode_Jz, OP_JCC },
	{ "jnle", &Instruction::decode_Jz, OP_JCC },
	
	/* 0x0f 0x90 - 0x0f 0x9f */
	{ "seto", &Instruction::decode_Eb, OP_SETCC },
	{ "setno", &Instruction::decode_Eb, OP_SETCC },
	{ "setb", &Instruction::decode_Eb, OP_SETCC },
	{ "setnb", &Instruction::decode_Eb, OP_SETCC },
	{ "setz", &Instruction::decode_Eb, OP_SETCC },
	{ "setnz", &Instruction::decode_Eb, OP_SETCC },
	{ "setbe", &Instruction::decode_Eb, OP_SETCC },
	{ "setnbe", &Instruction::decode_Eb, OP_SETCC },
	{ "sets", &Instruction::decode_Eb, OP_SETCC },
	{ "setns", &Instruction::decode_Eb, OP_SETCC },
	{ "setp", &Instruction::decode_Eb, OP_SETCC },
	{ "setnp", &Instruction::decode_Eb, OP_SETCC },
	{ "setl", &Instruction::decode_Eb, OP_SETCC },
	{ "setnl", &Instruction::decode_Eb, OP_SETCC },
	{ "setle", &Instruction::decode_Eb, OP_SETCC },
	{ "setnle", &Instruction::decode_Eb, OP_SETCC },
	
	/* 0x0f 0xa0 - 0x0f 0xaf */
	{ "push", &Instruction::template decode_Reg<operand_t::REG_FS>, OP_PUSH },
	{ "pop", &Instruction::template decode_Reg<operand_t::REG_FS>, OP_POP },
	{ "cpuid", &Instruction::decode0, OP_CPUID },
	{ "bt", &Instruction::decode_Ev_Gv, OP_BT },
	{ "shld", &Instruction::decode_Ev_Gv_Ib, OP_SHLD },
	{ "shld", &Instruction::template decode_Ev_Gv_Reg<operand_t::REG_CL>, OP_SHLD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "push", &Instruction::template decode_Reg<operand_t::REG_GS>, OP_PUSH },
	{ "pop", &Instruction::template decode_Reg<operand_t::REG_GS>, OP_POP },
	{ "rsm", &Instruction::decode0, OP_RSM },
	{ "bts", &Instruction::decode_Ev_Gv, OP_BTS },
	{ "shrd", &Instruction::decode_Ev_Gv_Ib, OP_SHRD },
	{ "shrd", &Instruction::template decode_Ev_Gv_Reg<operand_t::REG_CL>, OP_SHRD },
	{ "group16", &Instruction::decode_group16, OP_GROUP16 },
	{ "imul",  &Instruction::decode_Gv_Ev, OP_IMUL },
	
	/* 0x0f 0xb0 - 0x0f 0xbf */
	{ "cmpxchg", &Instruction::decode_Eb_Gb, OP_CMPXCHG },
	{ "cmpxchg", &Instruction::decode_Ev_Gv, OP_CMPXCHG },
	{ "lss", &Instruction::decode_Gv_Mp, OP_LSS },
	{ "btr", &Instruction::decode_Ev_Gv, OP_BTR },
	{ "lfs", &Instruction::decode_Gv_Mp, OP_LFS },
	{ "lgs", &Instruction::decode_Gv_Mp, OP_LGS },
	{ "movzx", &Instruction::decode_Gv_Eb, OP_MOVZX },
	{ "movzx", &Instruction::decode_Gv_Ew, OP_MOVZX },
	{ "popcnt", &Instruction::decode_Gv_Ev, OP_POPCNT },
	{ "group11", &Instruction::decode_group11, OP_GROUP11 },
	{ "group8", &Instruction::decode_group8, OP_GROUP8 },
	{ "btc", &Instruction::decode_Ev_Gv, OP_BTC },
	{ "bsf", &Instruction::decode_Gv_Ev, OP_BSF },
	{ "bsr", &Instruction::decode_Gv_Ev, OP_BSR },
	{ "movsx", &Instruction::decode_Gv_Eb, OP_MOVSX },
	{ "movsx", &Instruction::decode_Gv_Ew, OP_MOVSX },
	
	/* 0x0f 0xc0 - 0x0f 0xcf */
	{ "xadd", &Instruction::decode_Eb_Gb, OP_XADD },
	{ "xadd", &Instruction::decode_Ev_Gv, OP_XADD },
	{ "cmpss", &Instruction::decode_Vo_Wo_Ib, OP_CMPSS },
	{ "movnti", &Instruction::decode_Md_Gd, OP_MOVNTI },	// x86-64: movnti Nq, Gq
	{ "pinsrw", &Instruction::decode_Pq_Rd_Mw_Ib, OP_PINSRW },	// x86-64: pinsrw Pq, Rq/Mw,Ib
	{ "pextrw", &Instruction::decode_Gd_Nq_Ib, OP_PEXTRW },
	{ "shufps", &Instruction::decode_Vo_Wo_Ib, OP_SHUFPS },
	{ "group9", &Instruction::decode_group9, OP_GROUP9 },
	{ "bswap", &Instruction::decode_rAX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rCX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rDX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rBX, OP_BSWAP },
	{ "bswap", &Instruction::decode_rSP, OP_BSWAP },
	{ "bswap", &Instruction::decode_rBP, OP_BSWAP },
	{ "bswap", &Instruction::decode_rSI, OP_BSWAP },
	{ "bswap", &Instruction::decode_rDI, OP_BSWAP },
	
	/* 0x0f 0xd0 - 0x0f 0xdf */
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "psrlw", &Instruction::decode_Pq_Qq, OP_PSRLW },
	{ "psrld", &Instruction::decode_Pq_Qq, OP_PSRLD },
	{ "psrlq", &Instruction::decode_Pq_Qq, OP_PSRLQ },
	{ "paddq", &Instruction::decode_Pq_Qq, OP_PADDQ },
	{ "pmullw", &Instruction::decode_Pq_Qq, OP_PMULLW },
	{ "movq2dq", &Instruction::decode_Vo_Nq, OP_MOVQ2DQ },
	{ "pmovmskb", &Instruction::decode_Gd_Nq, OP_PMOVMSKB },
    { "psubusb", &Instruction::decode_Pq_Qq, OP_PSUBUSB },
    { "psubusw", &Instruction::decode_Pq_Qq, OP_PSUBUSW },
    { "pminub", &Instruction::decode_Pq_Qq, OP_PMINUB },
    { "pand", &Instruction::decode_Pq_Qq, OP_PAND },
    { "paddusb", &Instruction::decode_Pq_Qq, OP_PADDUSB },
    { "paddusw", &Instruction::decode_Pq_Qq, OP_PADDUSW },
    { "pmaxub", &Instruction::decode_Pq_Qq, OP_PMAXUB },
    { "pandn", &Instruction::decode_Pq_Qq, OP_PANDN },
	
	/* 0x0f 0xe0 - 0x0f 0xef */
	{ "pavgb", &Instruction::decode_Pq_Qq, OP_PAVGB },
	{ "psraw", &Instruction::decode_Pq_Qq, OP_PSRAW },
	{ "psrad", &Instruction::decode_Pq_Qq, OP_PSRAD },
	{ "pavgw", &Instruction::decode_Pq_Qq, OP_PAVGW },
	{ "pmulhuw", &Instruction::decode_Pq_Qq, OP_PMULHUW },
	{ "pmulhw", &Instruction::decode_Pq_Qq, OP_PMULHW },
	{ "cvtdq2pd", &Instruction::decode_Vo_Wo, OP_CVTDQ2PD },
	{ "movntq", &Instruction::decode_Mq_Pq, OP_MOVNTQ },
	{ "psubsb", &Instruction::decode_Pq_Qq, OP_PSUBSB },
	{ "psubsw", &Instruction::decode_Pq_Qq, OP_PSUBSW },
	{ "pminsw", &Instruction::decode_Pq_Qq, OP_PMINSW },
	{ "por", &Instruction::decode_Pq_Qq, OP_POR },  
	{ "paddsb", &Instruction::decode_Pq_Qq, OP_PADDSB },
	{ "paddsw", &Instruction::decode_Pq_Qq, OP_PADDSW },
	{ "pmaxsw", &Instruction::decode_Pq_Qq, OP_PMAXSW },
	{ "pxor", &Instruction::decode_Pq_Qq, OP_PXOR },
	
	/* 0x0f 0xf0 - 0x0f 0xff */
	{ "invalid", &Instruction::decode_invalid, OP_INVALID },
	{ "psllw", &Instruction::decode_Pq_Qq, OP_PSLLW },
	{ "pslld", &Instruction::decode_Pq_Qq, OP_PSLLD },
	{ "psllq", &Instruction::decode_Pq_Qq, OP_PSLLQ },
	{ "pmuludq", &Instruction::decode_Pq_Qq, OP_PMULUDQ },
	{ "pmaddwd", &Instruction::decode_Pq_Qq, OP_PMADDWD },
	{ "psadbw", &Instruction::decode_Pq_Qq, OP_PSADBW },
	{ "maskmovq", &Instruction::decode_Pq_Nq, OP_MASKMOVQ },
	{ "psubb", &Instruction::decode_Pq_Qq, OP_PSUBB },
	{ "psubw", &Instruction::decode_Pq_Qq, OP_PSUBW },
	{ "psubd", &Instruction::decode_Pq_Qq, OP_PSUBD },
	{ "psubq", &Instruction::decode_Pq_Qq, OP_PSUBQ },	
	{ "paddb", &Instruction::decode_Pq_Qq, OP_PADDB },
	{ "paddw", &Instruction::decode_Pq_Qq, OP_PADDW },
	{ "paddd", &Instruction::decode_Pq_Qq, OP_PADDD },
	{ "invalid", &Instruction::decode_invalid, OP_INVALID }
};

#endif
