added MOVDIRI opcode implementation

This commit is contained in:
Stanislav Shwartsman 2018-04-06 05:06:36 +00:00
parent 776e8270f6
commit d000e21001
5 changed files with 21 additions and 4 deletions

View File

@ -400,7 +400,7 @@ typedef bx_cpuid_t* (*bx_create_cpuid_method)(BX_CPU_C *cpu);
// [25:25] CLDEMOTE: CLDEMOTE instruction support
// [26:26] reserved
// [27:27] MOVDIRI: MOVDIRI instruction support
// [28:28] MOVDIRI64: MOVDIRI64 instruction support
// [28:28] MOVDIR64: MOVDIR64 instruction support
// [29:29] reserved
// [30:30] SGX_LC: SGX Launch Configuration
// [31:31] reserved
@ -433,7 +433,7 @@ typedef bx_cpuid_t* (*bx_create_cpuid_method)(BX_CPU_C *cpu);
#define BX_CPUID_EXT4_CLDEMOTE (1 << 25)
#define BX_CPUID_EXT4_RESERVED26 (1 << 26)
#define BX_CPUID_EXT4_MOVDIRI (1 << 27)
#define BX_CPUID_EXT4_MOVDIRI64 (1 << 28)
#define BX_CPUID_EXT4_MOVDIR64 (1 << 28)
#define BX_CPUID_EXT4_RESERVED29 (1 << 29)
#define BX_CPUID_EXT4_SGX_LAUNCH_CONFIG (1 << 30)
#define BX_CPUID_EXT4_RESERVED31 (1 << 31)

View File

@ -873,7 +873,7 @@ static BxOpcodeDecodeDescriptor32 decode32_descriptor[] =
/* 0F 38 F6 */ { &decoder32_sse, BxOpcodeGroupSSE_0F38F6 },
/* 0F 38 F7 */ { &decoder_ud32, NULL },
/* 0F 38 F8 */ { &decoder_ud32, NULL },
/* 0F 38 F9 */ { &decoder_ud32, NULL },
/* 0F 38 F9 */ { &decoder_modrm32, BxOpcodeTable0F38F9_32 },
/* 0F 38 FA */ { &decoder_ud32, NULL },
/* 0F 38 FB */ { &decoder_ud32, NULL },
/* 0F 38 FC */ { &decoder_ud32, NULL },

View File

@ -894,7 +894,7 @@ static BxOpcodeDecodeDescriptor64 decode64_descriptor[] =
/* 0F 38 F6 */ { &decoder64_sseq, BxOpcodeGroupSSE_0F38F6 },
/* 0F 38 F7 */ { &decoder_ud64, NULL },
/* 0F 38 F8 */ { &decoder_ud64, NULL },
/* 0F 38 F9 */ { &decoder_ud64, NULL },
/* 0F 38 F9 */ { &decoder_modrm64, BxOpcodeTable0F38F9_64 },
/* 0F 38 FA */ { &decoder_ud64, NULL },
/* 0F 38 FB */ { &decoder_ud64, NULL },
/* 0F 38 FC */ { &decoder_ud64, NULL },

View File

@ -573,6 +573,19 @@ static const BxOpcodeInfo_t BxOpcodeGroupSSE_0F38F6[] = {
#endif
};
// opcode 0F 38 F9
static const BxOpcodeInfo_t BxOpcodeTable0F38F9_32[] = {
/* 0F C3 /w */ { BxNoPrefixSSE, BX_IA_MOVDIRI_Op32_MdGd },
/* 0F C3 /d */ { BxNoPrefixSSE, BX_IA_MOVDIRI_Op32_MdGd },
};
#if BX_SUPPORT_X86_64
static const BxOpcodeInfo_t BxOpcodeTable0F38F9_64[] = {
/* 0F C3 /w */ { BxNoPrefixSSE, BX_IA_MOVDIRI_Op64_MdGd },
/* 0F C3 /d */ { BxNoPrefixSSE, BX_IA_MOVDIRI_Op64_MdGd },
/* 0F C3 /q */ { BxNoPrefixSSE, BX_IA_MOVDIRI_MqGq },
};
#endif
#endif
#endif // BX_FETCHDECODE_OPMAP_0F38_H

View File

@ -3734,3 +3734,7 @@ bx_define_opcode(BX_IA_V512_VGF2P8AFFINEINVQB_VdqHdqWdqIb_Kmask, &BX_CPU_C::LOAD
bx_define_opcode(BX_IA_V512_VGF2P8MULB_VdqHdqWdq_Kmask, &BX_CPU_C::LOAD_Vector, &BX_CPU_C::VGF2P8MULB_VdqHdqWdqR, BX_ISA_GFNI, OP_Vdq, OP_Hdq, OP_Wdq, OP_NONE, BX_PREPARE_EVEX_NO_SAE | BX_PREPARE_EVEX_NO_BROADCAST)
#endif // BX_SUPPORT_EVEX
bx_define_opcode(BX_IA_MOVDIRI_Op32_MdGd, &BX_CPU_C::MOV32_EdGdM, &BX_CPU_C::BxError, BX_ISA_MOVDIRI, OP_Ed, OP_Gd, OP_NONE, OP_NONE, 0)
bx_define_opcode(BX_IA_MOVDIRI_Op64_MdGd, &BX_CPU_C::MOV64_EdGdM, &BX_CPU_C::BxError, BX_ISA_MOVDIRI, OP_Ed, OP_Gd, OP_NONE, OP_NONE, 0)
bx_define_opcode(BX_IA_MOVDIRI_MqGq, &BX_CPU_C::MOV_EqGqM, &BX_CPU_C::BxError, BX_ISA_MOVDIRI, OP_Eq, OP_Gq, OP_NONE, OP_NONE, 0)