From 87103c243730aa9a536073af76054668e901521e Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Mon, 11 Aug 2008 17:55:57 +0000 Subject: [PATCH] Support for disasm of MOVBE Intel Atom(R) instruction --- bochs/disasm/dis_tables.inc | 16 ++++++++++++++-- bochs/disasm/disasm.h | 1 + bochs/disasm/opcodes.inc | 6 ++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bochs/disasm/dis_tables.inc b/bochs/disasm/dis_tables.inc index 29c6e66ed..3dbb66b2f 100755 --- a/bochs/disasm/dis_tables.inc +++ b/bochs/disasm/dis_tables.inc @@ -512,8 +512,20 @@ static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0f38df[4] = { /* F3 */ { 0, &Ia_Invalid } }; +static BxDisasmOpcodeTable_t BxDisasmGrpOs64B_movbe_GvEv[3] = { + /* 16 */ { 0, &Ia_movbe_Gw_Ew }, + /* 32 */ { 0, &Ia_movbe_Gd_Ed }, + /* 64 */ { 0, &Ia_movbe_Gq_Eq } +}; + +static BxDisasmOpcodeTable_t BxDisasmGrpOs64B_movbe_EvGv[3] = { + /* 16 */ { 0, &Ia_movbe_Ew_Gw }, + /* 32 */ { 0, &Ia_movbe_Ed_Gd }, + /* 64 */ { 0, &Ia_movbe_Eq_Gq } +}; + static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0f38f0[4] = { - /* -- */ { 0, &Ia_Invalid }, + /* -- */ { GR64BIT(movbe_GvEv) }, /* 66 */ { 0, &Ia_Invalid }, /* F2 */ { 0, &Ia_crc32_Gd_Eb }, // SSE4.2 /* F3 */ { 0, &Ia_Invalid } @@ -526,7 +538,7 @@ static BxDisasmOpcodeTable_t BxDisasmGrpOs64B_crc32[3] = { }; static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0f38f1[4] = { - /* -- */ { 0, &Ia_Invalid }, + /* -- */ { GR64BIT(movbe_EvGv) }, /* 66 */ { 0, &Ia_Invalid }, /* F2 */ { GR64BIT(crc32) }, // SSE4.2 /* F3 */ { 0, &Ia_Invalid } diff --git a/bochs/disasm/disasm.h b/bochs/disasm/disasm.h index 7b1755f78..8b19cee9e 100644 --- a/bochs/disasm/disasm.h +++ b/bochs/disasm/disasm.h @@ -43,6 +43,7 @@ #define IA_XSAVE 0x00800000 /* XSAVE/XRSTOR extensions instruction */ #define IA_AES 0x01000000 /* AES instruction */ #define IA_AVX 0x02000000 /* AVX instruction */ +#define IA_MOVBE 0x04000000 /* MOVBE Intel Atom(R) instruction */ #define IA_LEGACY 0x40000000 /* legacy instruction */ #define IA_UNDOCUMENTED 0x80000000 /* instruction undocumented */ diff --git a/bochs/disasm/opcodes.inc b/bochs/disasm/opcodes.inc index 71e4eef33..66fec4b49 100755 --- a/bochs/disasm/opcodes.inc +++ b/bochs/disasm/opcodes.inc @@ -587,6 +587,12 @@ Ia_movb_Eb_Ib = { "mov", "movb", Eb, Ib, XX, XX, 0 }, Ia_movb_Gb_Eb = { "mov", "movb", Gb, Eb, XX, XX, 0 }, Ia_movb_Ob_AL = { "mov", "movb", Ob, AL, XX, XX, 0 }, Ia_movb_R8_Ib = { "mov", "movb", R8, Ib, XX, XX, 0 }, +Ia_movbe_Ed_Gd = { "movbe", "movbel", Ed, Gd, XX, XX, IA_MOVBE }, +Ia_movbe_Eq_Gq = { "movbe", "movbeq", Eq, Gq, XX, XX, IA_MOVBE | IA_X86_64 }, +Ia_movbe_Ew_Gw = { "movbe", "movbew", Ew, Gw, XX, XX, IA_MOVBE }, +Ia_movbe_Gd_Ed = { "movbe", "movbel", Gd, Ed, XX, XX, IA_MOVBE }, +Ia_movbe_Gq_Eq = { "movbe", "movbeq", Gq, Eq, XX, XX, IA_MOVBE | IA_X86_64 }, +Ia_movbe_Gw_Ew = { "movbe", "movbew", Gw, Ew, XX, XX, IA_MOVBE }, Ia_movd_Ed_Pq = { "movd", "movd", Ed, Pq, XX, XX, IA_MMX }, Ia_movd_Ed_Vd = { "movd", "movd", Ed, Vdq, XX, XX, IA_SSE2 }, Ia_movd_Pq_Ed = { "movd", "movd", Pq, Ed, XX, XX, IA_MMX },