- applied patch from Luiz Henrique Shigunov [ 605815 ] more disasm functions

Modified Files: dis_decode.cc dis_groups.cc disasm.h
This commit is contained in:
Christophe Bothamy 2002-09-20 15:34:55 +00:00
parent 9b02229b84
commit c0be71cded
3 changed files with 68 additions and 29 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: dis_decode.cc,v 1.8 2001-10-03 13:10:37 bdenney Exp $
// $Id: dis_decode.cc,v 1.9 2002-09-20 15:34:55 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -668,10 +668,24 @@ bx_disassemble_c::disasm(Boolean is_32, Bit8u *instr, char *disbuf)
case 0x69: dis_sprintf("imul "); GvEv(); dis_sprintf(", "); Iv(); goto done;
case 0x6A: dis_sprintf("push "); Ib(); goto done;
case 0x6B: dis_sprintf("imul "); GvEv(); dis_sprintf(", "); Ib(); goto done;
case 0x6C: dis_sprintf("insb "); YbDX(); goto done;
case 0x6D: dis_sprintf("insw "); YvDX(); goto done;
case 0x6E: dis_sprintf("outsb "); DXXb(); goto done;
case 0x6F: dis_sprintf("outsw "); DXXv(); goto done;
case 0x6C: dis_sprintf("insb"); goto done;
case 0x6D:
if (db_32bit_opsize) {
dis_sprintf("insd");
}
else {
dis_sprintf("insw");
}
goto done;
case 0x6E: dis_sprintf("outsb"); goto done;
case 0x6F:
if (db_32bit_opsize) {
dis_sprintf("outsd");
}
else {
dis_sprintf("outsw");
}
goto done;
case 0x70: dis_sprintf("jo "); Jb(); goto done;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: dis_groups.cc,v 1.4 2002-08-12 14:39:40 cbothamy Exp $
// $Id: dis_groups.cc,v 1.5 2002-09-20 15:34:55 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -149,26 +149,45 @@ bx_disassemble_c::Ms(void)
}
}
void
bx_disassemble_c::Mp(void)
{
GvMp();
}
void
bx_disassemble_c::GvMa(void)
{
Bit8u mod_rm_byte, mod, opcode, rm;
mod_rm_byte = peek_byte();
BX_DECODE_MODRM(mod_rm_byte, mod, opcode, rm);
// only memory operand is valid
if (mod == 0x3) {
dis_sprintf("Invalid Opcode");
fetch_byte();
}
else {
if (db_32bit_opsize) {
decode_gxex(BX_GENERAL_32BIT_REG, BX_NO_REG_TYPE);
}
else {
decode_gxex(BX_GENERAL_16BIT_REG, BX_NO_REG_TYPE);
}
}
}
void
bx_disassemble_c::EwRw(void)
{
decode_exgx(BX_GENERAL_16BIT_REG, BX_GENERAL_16BIT_REG);
}
// Other un-implemented operand signatures
void
bx_disassemble_c::XBTS(void) {dis_sprintf("*** XBTS() unfinished ***");}
void
bx_disassemble_c::IBTS(void) {dis_sprintf("*** IBTS() unfinished ***");}
void
bx_disassemble_c::Mp(void) {dis_sprintf("*** Mp() unfinished ***");}
void
bx_disassemble_c::GvMa(void) {dis_sprintf("*** GvMa() unfinished ***");}
void
bx_disassemble_c::EwRw(void) {dis_sprintf("*** EwRw() unfinished ***");}
void
bx_disassemble_c::YbDX(void) {dis_sprintf("*** YbDX() unfinished ***");}
void
bx_disassemble_c::YvDX(void) {dis_sprintf("*** YvDX() unfinished ***");}
void
bx_disassemble_c::DXXb(void) {dis_sprintf("*** DXXb() unfinished ***");}
void
bx_disassemble_c::DXXv(void) {dis_sprintf("*** DXXv() unfinished ***");}
void
bx_disassemble_c::ALOb(void) {dis_sprintf("*** ALOb() unfinished ***");}
void
@ -604,12 +623,22 @@ bx_disassemble_c::YveAX(void)
void
bx_disassemble_c::GvMp(void)
{
Bit8u mod_rm_byte, mod, opcode, rm;
mod_rm_byte = peek_byte();
BX_DECODE_MODRM(mod_rm_byte, mod, opcode, rm);
// only memory operand is valid
if (mod == 0x3) {
dis_sprintf("Invalid Opcode");
fetch_byte();
}
else {
#if BX_CPU_LEVEL > 2
if (db_32bit_opsize)
decode_gxex(BX_GENERAL_32BIT_REG, BX_GENERAL_32BIT_REG);
else
if (db_32bit_opsize)
decode_gxex(BX_GENERAL_32BIT_REG, BX_GENERAL_32BIT_REG);
else
#endif /* BX_CPU_LEVEL > 2 */
decode_gxex(BX_GENERAL_16BIT_REG, BX_GENERAL_16BIT_REG);
decode_gxex(BX_GENERAL_16BIT_REG, BX_GENERAL_16BIT_REG);
}
}
void

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: disasm.h,v 1.5 2001-10-03 13:10:37 bdenney Exp $
// $Id: disasm.h,v 1.6 2002-09-20 15:34:55 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -135,10 +135,6 @@ private:
void EwRw(void);
void Iv(void);
void Ib(void);
void YbDX(void);
void YvDX(void);
void DXXb(void);
void DXXv(void);
void Jb(void);
void EbIb(void);
void EvIv(void);