Fixed DR registers disasm

This commit is contained in:
Stanislav Shwartsman 2006-06-26 21:06:26 +00:00
parent aa1a61bfde
commit caee480547
2 changed files with 7 additions and 5 deletions

View File

@ -3819,9 +3819,9 @@ static BxDisasmOpcodeTable_t BxDisasmOpcodes64w[256*2] = {
/* 0F 1E */ { 0, &Ia_Invalid },
/* 0F 1F */ { 0, &Ia_multibyte_nop },
/* 0F 20 */ { 0, &Ia_movq_Rq_Cq },
/* 0F 21 */ { 0, &Ia_movl_Rd_Dd },
/* 0F 21 */ { 0, &Ia_movq_Rq_Dq },
/* 0F 22 */ { 0, &Ia_movq_Cq_Rq },
/* 0F 23 */ { 0, &Ia_movl_Dd_Rd },
/* 0F 23 */ { 0, &Ia_movq_Dq_Rq },
/* 0F 24 */ { 0, &Ia_Invalid },
/* 0F 25 */ { 0, &Ia_Invalid },
/* 0F 26 */ { 0, &Ia_Invalid },
@ -4337,9 +4337,9 @@ static BxDisasmOpcodeTable_t BxDisasmOpcodes64d[256*2] = {
/* 0F 1E */ { 0, &Ia_Invalid },
/* 0F 1F */ { 0, &Ia_multibyte_nop },
/* 0F 20 */ { 0, &Ia_movq_Rq_Cq },
/* 0F 21 */ { 0, &Ia_movl_Rd_Dd },
/* 0F 21 */ { 0, &Ia_movq_Rq_Dq },
/* 0F 22 */ { 0, &Ia_movq_Cq_Rq },
/* 0F 23 */ { 0, &Ia_movl_Dd_Rd },
/* 0F 23 */ { 0, &Ia_movq_Dq_Rq },
/* 0F 24 */ { 0, &Ia_Invalid },
/* 0F 25 */ { 0, &Ia_Invalid },
/* 0F 26 */ { 0, &Ia_Invalid },

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: resolve.cc,v 1.11 2006-04-27 15:11:45 sshwarts Exp $
// $Id: resolve.cc,v 1.12 2006-06-26 21:06:26 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
#include <stdio.h>
@ -9,6 +9,8 @@ void disassembler::decode_modrm(x86_insn *insn)
{
insn->modrm = fetch_byte();
BX_DECODE_MODRM(insn->modrm, insn->mod, insn->nnn, insn->rm);
// MOVs with CRx and DRx always use register ops and ignore the mod field.
if ((insn->b1 & ~3) == 0x120) insn->mod = 3;
insn->nnn |= insn->rex_r;
if (insn->mod == 3) {