From cf56ffb6e0886310584baabed397aa78026cb6ea Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Wed, 31 Aug 2011 21:13:50 +0000 Subject: [PATCH] BSF/BSR should stay, only F3 prefix change opcode --- bochs/cpu/fetchdecode_sse.h | 24 ++++++++++++------------ bochs/disasm/dis_tables_sse.inc | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/bochs/cpu/fetchdecode_sse.h b/bochs/cpu/fetchdecode_sse.h index bfaea2a60..5dc40e59c 100644 --- a/bochs/cpu/fetchdecode_sse.h +++ b/bochs/cpu/fetchdecode_sse.h @@ -41,42 +41,42 @@ static const BxOpcodeInfo_t BxOpcodeGroupSSE_PAUSE[3] = { }; static const BxOpcodeInfo_t BxOpcodeGroupSSE_TZCNT16[3] = { - /* 66 */ { 0, BX_IA_NOP }, + /* 66 */ { 0, BX_IA_BSF_GwEw }, /* F3 */ { 0, BX_IA_TZCNT_GwEw }, - /* F2 */ { 0, BX_IA_NOP } + /* F2 */ { 0, BX_IA_BSF_GwEw } }; static const BxOpcodeInfo_t BxOpcodeGroupSSE_TZCNT32[3] = { - /* 66 */ { 0, BX_IA_NOP }, + /* 66 */ { 0, BX_IA_BSF_GdEd }, /* F3 */ { 0, BX_IA_TZCNT_GdEd }, - /* F2 */ { 0, BX_IA_NOP } + /* F2 */ { 0, BX_IA_BSF_GdEd } }; #if BX_SUPPORT_X86_64 static const BxOpcodeInfo_t BxOpcodeGroupSSE_TZCNT64[3] = { - /* 66 */ { 0, BX_IA_NOP }, + /* 66 */ { 0, BX_IA_BSF_GqEq }, /* F3 */ { 0, BX_IA_TZCNT_GqEq }, - /* F2 */ { 0, BX_IA_NOP } + /* F2 */ { 0, BX_IA_BSF_GqEq } }; #endif static const BxOpcodeInfo_t BxOpcodeGroupSSE_LZCNT16[3] = { - /* 66 */ { 0, BX_IA_NOP }, + /* 66 */ { 0, BX_IA_BSR_GwEw }, /* F3 */ { 0, BX_IA_LZCNT_GwEw }, - /* F2 */ { 0, BX_IA_NOP } + /* F2 */ { 0, BX_IA_BSR_GwEw } }; static const BxOpcodeInfo_t BxOpcodeGroupSSE_LZCNT32[3] = { - /* 66 */ { 0, BX_IA_NOP }, + /* 66 */ { 0, BX_IA_BSR_GdEd }, /* F3 */ { 0, BX_IA_LZCNT_GdEd }, - /* F2 */ { 0, BX_IA_NOP } + /* F2 */ { 0, BX_IA_BSR_GdEd } }; #if BX_SUPPORT_X86_64 static const BxOpcodeInfo_t BxOpcodeGroupSSE_LZCNT64[3] = { - /* 66 */ { 0, BX_IA_NOP }, + /* 66 */ { 0, BX_IA_BSR_GqEq }, /* F3 */ { 0, BX_IA_LZCNT_GqEq }, - /* F2 */ { 0, BX_IA_NOP } + /* F2 */ { 0, BX_IA_BSR_GqEq } }; #endif diff --git a/bochs/disasm/dis_tables_sse.inc b/bochs/disasm/dis_tables_sse.inc index f0c3cd22f..19e3e1662 100644 --- a/bochs/disasm/dis_tables_sse.inc +++ b/bochs/disasm/dis_tables_sse.inc @@ -1053,44 +1053,44 @@ static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0f3a22[4] = { static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0fbcw[4] = { /* -- */ { 0, &Ia_bsfw_Gw_Ew }, - /* 66 */ { 0, &Ia_Invalid }, + /* 66 */ { 0, &Ia_bsfw_Gw_Ew }, /* F3 */ { 0, &Ia_tzcntw_Gw_Ew }, - /* F2 */ { 0, &Ia_Invalid } + /* F2 */ { 0, &Ia_bsfw_Gw_Ew } }; static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0fbcd[4] = { /* -- */ { 0, &Ia_bsfl_Gd_Ed }, - /* 66 */ { 0, &Ia_Invalid }, + /* 66 */ { 0, &Ia_bsfl_Gd_Ed }, /* F3 */ { 0, &Ia_tzcntl_Gd_Ed }, - /* F2 */ { 0, &Ia_Invalid } + /* F2 */ { 0, &Ia_bsfl_Gd_Ed } }; static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0fbcq[4] = { /* -- */ { 0, &Ia_bsfq_Gq_Eq }, - /* 66 */ { 0, &Ia_Invalid }, + /* 66 */ { 0, &Ia_bsfq_Gq_Eq }, /* F3 */ { 0, &Ia_tzcntq_Gq_Eq }, - /* F2 */ { 0, &Ia_Invalid } + /* F2 */ { 0, &Ia_bsfq_Gq_Eq } }; static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0fbdw[4] = { /* -- */ { 0, &Ia_bsrw_Gw_Ew }, - /* 66 */ { 0, &Ia_Invalid }, + /* 66 */ { 0, &Ia_bsrw_Gw_Ew }, /* F3 */ { 0, &Ia_lzcntw_Gw_Ew }, - /* F2 */ { 0, &Ia_Invalid } + /* F2 */ { 0, &Ia_bsrw_Gw_Ew } }; static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0fbdd[4] = { /* -- */ { 0, &Ia_bsrl_Gd_Ed }, - /* 66 */ { 0, &Ia_Invalid }, + /* 66 */ { 0, &Ia_bsrl_Gd_Ed }, /* F3 */ { 0, &Ia_lzcntl_Gd_Ed }, - /* F2 */ { 0, &Ia_Invalid } + /* F2 */ { 0, &Ia_bsrl_Gd_Ed } }; static BxDisasmOpcodeTable_t BxDisasmGroupSSE_0fbdq[4] = { /* -- */ { 0, &Ia_bsrq_Gq_Eq }, - /* 66 */ { 0, &Ia_Invalid }, + /* 66 */ { 0, &Ia_bsrq_Gq_Eq }, /* F3 */ { 0, &Ia_lzcntq_Gq_Eq }, - /* F2 */ { 0, &Ia_Invalid } + /* F2 */ { 0, &Ia_bsrq_Gq_Eq } }; /* ************************************************************************ */