disasm fix

This commit is contained in:
Stanislav Shwartsman 2010-01-31 10:17:42 +00:00
parent eae084920a
commit 17e513fa8a
2 changed files with 13 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: dis_decode.cc,v 1.53 2010-01-31 09:45:27 sshwarts Exp $
// $Id: dis_decode.cc,v 1.54 2010-01-31 10:17:42 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2005-2009 Stanislav Shwartsman
@ -225,15 +225,17 @@ x86_insn disassembler::decode(bx_bool is_32, bx_bool is_64, bx_address base, bx_
/* SSE opcode group with only prefix 0x66 allowed */
sse_opcode = 1;
if (sse_prefix != SSE_PREFIX_66)
entry = &(OPCODE_TABLE(entry)[sse_prefix]);
break;
entry = &(BxDisasmGroupSSE_ERR[sse_prefix]);
attr = 0;
continue;
case _GRPSSEF2:
/* SSE opcode group with only prefix 0xF2 allowed */
sse_opcode = 1;
if (sse_prefix != SSE_PREFIX_F2)
entry = &(OPCODE_TABLE(entry)[sse_prefix]);
break;
entry = &(BxDisasmGroupSSE_ERR[sse_prefix]);
attr = 0;
continue;
case _GRPSSE:
sse_opcode = 1;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: dis_tables.h,v 1.38 2010-01-31 09:45:27 sshwarts Exp $
// $Id: dis_tables.h,v 1.39 2010-01-31 10:17:42 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2005-2009 Stanislav Shwartsman
@ -36,8 +36,6 @@
/* ************************************************************************ */
#define GRPSSE(n) _GRPSSE, BxDisasmGroupSSE_##n
#define GRPSSE66(n) _GRPSSE66, BxDisasmGroupSSE_ERR
#define GRPSSEF2(n) _GRPSSEF2, BxDisasmGroupSSE_ERR
#define GRPN(n) _GROUPN, BxDisasmGroup##n
#define GRPRM(n) _GRPRM, BxDisasmGroupRm##n
#define GRPMOD(n) _SPLIT11B, BxDisasmGroupMod##n
@ -47,6 +45,11 @@
#define GR64BIT(n) _GRP64B, BxDisasmGrpOs64B_##n
/* ************************************************************************ */
/* ************************************************************************ */
#define GRPSSE66(n) _GRPSSE66, &n
#define GRPSSEF2(n) _GRPSSEF2, &n
/* ************************************************************************ */
#define Apw &disassembler::Apw
#define Apd &disassembler::Apd