Index: vm/port/src/encoder/ia32_em64t/enc_base.cpp =================================================================== --- vm/port/src/encoder/ia32_em64t/enc_base.cpp (revision 618286) +++ vm/port/src/encoder/ia32_em64t/enc_base.cpp (working copy) @@ -45,15 +45,41 @@ int EncoderBase::dummy = EncoderBase::buildTable(); -const unsigned char EncoderBase::size_hash[OpndSize_64+1] = { +const unsigned char EncoderBase::size_hash[OpndSize_128+1] = { // 0xFF, // OpndSize_Null = 0, - 3, // OpndSize_8 = 0x1, - 2, // OpndSize_16 = 0x2, + 5, // OpndSize_8 = 0x1, + 4, // OpndSize_16 = 0x2, 0xFF, // 0x3 - 1, // OpndSize_32 = 0x4, - 0, // OpndSize_64 = 0x8, - // + 3, // OpndSize_32 = 0x4, + 0xFF, // 0x5 + 0xFF, // 0x6 + 0xFF, // 0x7 + 2, // OpndSize_64 = 0x8, + 0xFF, // 0x9 + 0xFF, // 0xA + 0xFF, // 0xB + 0xFF, // 0xC + 0xFF, // 0xD + 0xFF, // 0xE + 0xFF, // 0xF + 1, // OpndSize_80 = 0x10, + 0xFF, // 0x11 + 0xFF, // 0x12 + 0xFF, // 0x13 + 0xFF, // 0x14 + 0xFF, // 0x15 + 0xFF, // 0x16 + 0xFF, // 0x17 + 0xFF, // 0x18 + 0xFF, // 0x19 + 0xFF, // 0x1A + 0xFF, // 0x1B + 0xFF, // 0x1C + 0xFF, // 0x1D + 0xFF, // 0x1E + 0xFF, // 0x1F + 0 // OpndSize_128 = 0x20, }; const unsigned char EncoderBase::kind_hash[OpndKind_Mem+1] = { @@ -67,19 +93,19 @@ //mmx reg -> 110 = 6 // 0xFF, // 0 OpndKind_Null=0, - 0<<2, // 1 OpndKind_GPReg = + 0<<3, // 1 OpndKind_GPReg = // OpndKind_MinRegKind=0x1, - 4<<2, // 2 OpndKind_SReg=0x2, + 4<<3, // 2 OpndKind_SReg=0x2, #ifdef _HAVE_MMX_ - 6<<2, // 3 + 6<<3, // 3 #else 0xFF, // 3 #endif - 5<<2, // 4 OpndKind_FPReg=0x4, + 5<<3, // 4 OpndKind_FPReg=0x4, 0xFF, 0xFF, 0xFF, // 5, 6, 7 - 3<<2, // OpndKind_XMMReg=0x8, + 3<<3, // OpndKind_XMMReg=0x8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 9, 0xA, 0xB, 0xC, 0xD, // 0xE, 0xF 0xFF, // OpndKind_MaxRegKind = @@ -87,12 +113,12 @@ // OpndKind_OtherReg=0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x11-0x18 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x19-0x1F - 2<<2, // OpndKind_Immediate=0x20, + 2<<3, // OpndKind_Immediate=0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x21-0x28 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x29-0x30 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x31-0x38 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x39-0x3F - 1<<2, // OpndKind_Memory=0x40 + 1<<3, // OpndKind_Memory=0x40 }; char* EncoderBase::encode_aux(char* stream, unsigned aux, @@ -430,7 +456,7 @@ } // if(idi.get_length_with_prefix() != (int)len) { - //__asm { int 3 }; + //__asm { int 3 }; // } #endif Index: vm/port/src/encoder/ia32_em64t/enc_base.h =================================================================== --- vm/port/src/encoder/ia32_em64t/enc_base.h (revision 618286) +++ vm/port/src/encoder/ia32_em64t/enc_base.h (working copy) @@ -278,10 +278,8 @@ * * For meaning and arithmetics see enc_tabl.cpp. * - * The value was increased from '5155' to '8192' to make it aligned - * for faster access in EncoderBase::lookup(). */ - static const unsigned int HASH_MAX = 8192; //5155; + static const unsigned int HASH_MAX = 65536; /** * @brief Empty value, used in hash-to-opcode map to show an empty slot. */ @@ -289,7 +287,7 @@ /** * @brief The name says it all. */ - static const unsigned char HASH_BITS_PER_OPERAND = 5; + static const unsigned char HASH_BITS_PER_OPERAND = 6; /** * @brief Contains info about a single instructions's operand - its @@ -667,7 +665,8 @@ * A change must be strictly balanced with hash-related functions and data * in enc_base.h/.cpp. */ - static const unsigned char size_hash[OpndSize_64+1]; +// static const unsigned char size_hash[OpndSize_64+1]; + static const unsigned char size_hash[OpndSize_128+1]; /** * @brief A table used for the fast computation of hash value. * Index: vm/port/src/encoder/ia32_em64t/enc_defs.h =================================================================== --- vm/port/src/encoder/ia32_em64t/enc_defs.h (revision 618286) +++ vm/port/src/encoder/ia32_em64t/enc_defs.h (working copy) @@ -537,6 +537,7 @@ Mnemonic_MOV, // Move Mnemonic_MOVD, // Move Double word Mnemonic_MOVQ, // Move Quadword +Mnemonic_MOVDQA, // Move DoubleQuadword /*Mnemonic_MOVS, // Move Data from String to String*/ // MOVS is a special case: see encoding table for more details, Mnemonic_MOVS8, Mnemonic_MOVS16, Mnemonic_MOVS32, Mnemonic_MOVS64, Index: vm/port/src/encoder/ia32_em64t/enc_prvt.h =================================================================== --- vm/port/src/encoder/ia32_em64t/enc_prvt.h (revision 618286) +++ vm/port/src/encoder/ia32_em64t/enc_prvt.h (working copy) @@ -213,8 +213,11 @@ #define mm_m64 {(OpndKind)(OpndKind_MMXReg|OpndKind_Mem), OpndSize_64, RegName_Null} #define xmm64 {OpndKind_XMMReg, OpndSize_64, RegName_Null} -#define xmm_m64 {(OpndKind)(OpndKind_XMMReg|OpndKind_Mem), OpndSize_64, RegName_Null} +#define xmm_m64 {(OpndKind)(OpndKind_XMMReg|OpndKind_Mem), OpndSize_64, RegName_Null} +#define xmm128 {OpndKind_XMMReg, OpndSize_128, RegName_Null} +#define xmm_m128 {(OpndKind)(OpndKind_XMMReg|OpndKind_Mem), OpndSize_128, RegName_Null} + #define xmm32 {OpndKind_XMMReg, OpndSize_32, RegName_Null} #define xmm_m32 {(OpndKind)(OpndKind_XMMReg|OpndKind_Mem), OpndSize_32, RegName_Null} Index: vm/port/src/encoder/ia32_em64t/enc_tabl.cpp =================================================================== --- vm/port/src/encoder/ia32_em64t/enc_tabl.cpp (revision 618286) +++ vm/port/src/encoder/ia32_em64t/enc_tabl.cpp (working copy) @@ -1046,6 +1046,13 @@ END_OPCODES() END_MNEMONIC() +BEGIN_MNEMONIC(MOVDQA, MF_NONE, D_U ) +BEGIN_OPCODES() + {OpcodeInfo::all, {0x66, 0x0F, 0x6F, _r}, {xmm128, xmm_m128}, D_U }, + {OpcodeInfo::all, {0x66, 0x0F, 0x7F, _r}, {xmm_m128, xmm128}, D_U }, +END_OPCODES() +END_MNEMONIC() + // // A bunch of MMX instructions // @@ -1083,12 +1090,13 @@ #endif // ~_HAVE_MMX_ -BEGIN_MNEMONIC(PXOR, MF_NONE, DU_U) +BEGIN_MNEMONIC(PXOR, MF_SYMMETRIC|MF_SAME_ARG_NO_USE, DU_U) BEGIN_OPCODES() #ifdef _HAVE_MMX_ {OpcodeInfo::all, {0x0F, 0xEF, _r}, {mm64, mm_m64}, DU_U }, #endif {OpcodeInfo::all, {0x66, 0x0F, 0xEF, _r}, {xmm64, xmm_m64}, DU_U }, + {OpcodeInfo::all, {0x66, 0x0F, 0xEF, _r}, {xmm128, xmm_m128}, DU_U }, END_OPCODES() END_MNEMONIC()