Committed CPU fixes from Vitaly Vorobyov:
[x] fixed bug in int01 (opcode 0xF1) emulation [x] fixed bug in x86 debugger with dr0-dr3 registers Committed disassembler bugfix from Dirk Thierbach: [x] fixed bug in relative addresses in Jmp, Jcc, Call and so on
This commit is contained in:
parent
8b8b9b0450
commit
549eb70324
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: proc_ctrl.cc,v 1.72 2003-06-20 08:58:12 sshwarts Exp $
|
||||
// $Id: proc_ctrl.cc,v 1.73 2003-08-03 16:44:53 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -73,7 +73,7 @@ BX_CPU_C::HLT(bxInstruction_c *i)
|
||||
BX_PANIC(("HALT instruction encountered in the BIOS ROM"));
|
||||
|
||||
if (CPL!=0) {
|
||||
BX_INFO(("HLT(): CPL!=0"));
|
||||
// BX_INFO(("HLT(): CPL!=0"));
|
||||
exception(BX_GP_EXCEPTION, 0, 0);
|
||||
return;
|
||||
}
|
||||
@ -175,8 +175,9 @@ BX_CPU_C::MOV_DdRd(bxInstruction_c *i)
|
||||
#else
|
||||
Bit32u val_32;
|
||||
|
||||
if (v8086_mode()) BX_PANIC(("MOV_DdRd: v8086 mode unsupported"));
|
||||
|
||||
if (v8086_mode()) {
|
||||
exception(BX_GP_EXCEPTION, 0, 0);
|
||||
}
|
||||
/* NOTES:
|
||||
* 32bit operands always used
|
||||
* r/m field specifies general register
|
||||
@ -290,6 +291,10 @@ BX_CPU_C::MOV_DdRd(bxInstruction_c *i)
|
||||
// Even bits 11,10 are changeable though reserved.
|
||||
BX_CPU_THIS_PTR dr7 = (val_32 & 0xffff2fff) | 0x00000400;
|
||||
#endif
|
||||
// if we have breakpoints enabled then we must check
|
||||
// breakpoints condition in cpu loop
|
||||
if(BX_CPU_THIS_PTR dr7 & 0xff)
|
||||
BX_CPU_THIS_PTR async_event = 1;
|
||||
break;
|
||||
default:
|
||||
BX_PANIC(("MOV_DdRd: control register index out of range"));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: soft_int.cc,v 1.16 2003-05-15 16:41:16 sshwarts Exp $
|
||||
// $Id: soft_int.cc,v 1.17 2003-08-03 16:44:53 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -89,9 +89,9 @@ BX_CPU_C::INT1(bxInstruction_c *i)
|
||||
|
||||
#if BX_EXTERNAL_DEBUGGER
|
||||
trap_debugger(0);
|
||||
#else
|
||||
interrupt(1, 1, 0, 0);
|
||||
#endif
|
||||
|
||||
interrupt(1, 1, 0, 0);
|
||||
BX_INSTR_FAR_BRANCH(BX_CPU_ID, BX_INSTR_IS_INT,
|
||||
BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].selector.value,
|
||||
EIP);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: stack_pro.cc,v 1.14 2003-03-02 23:59:09 cbothamy Exp $
|
||||
// $Id: stack_pro.cc,v 1.15 2003-08-03 16:44:53 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -52,7 +52,7 @@ BailBigRSP("push_16");
|
||||
#endif
|
||||
temp_ESP = SP;
|
||||
if (!can_push(&BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache, temp_ESP, 2)) {
|
||||
BX_PANIC(("push_16(): push outside stack limits"));
|
||||
BX_DEBUG(("push_16(): push outside stack limits"));
|
||||
exception(BX_SS_EXCEPTION, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: dis_groups.cc,v 1.8 2003-01-21 13:23:47 cbothamy Exp $
|
||||
// $Id: dis_groups.cc,v 1.9 2003-08-03 16:44:53 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -418,12 +418,12 @@ bx_disassemble_c::Av(void)
|
||||
{
|
||||
if (db_32bit_opsize) {
|
||||
Bit32s imm32;
|
||||
imm32 = fetch_dword();
|
||||
imm32 = (Bit32s) fetch_dword();
|
||||
dis_sprintf("%08x", (unsigned) (imm32 + db_eip));
|
||||
}
|
||||
else {
|
||||
Bit16s imm16;
|
||||
imm16 = fetch_word();
|
||||
imm16 = (Bit16s) fetch_word();
|
||||
dis_sprintf("%04x", (unsigned) ((imm16 + db_eip) & 0xFFFF));
|
||||
}
|
||||
}
|
||||
@ -522,17 +522,17 @@ bx_disassemble_c::Jv(void)
|
||||
{
|
||||
#if BX_CPU_LEVEL > 2
|
||||
if (db_32bit_opsize) {
|
||||
Bit32u imm32;
|
||||
Bit32s imm32; /* JMP rel32 is signed */
|
||||
|
||||
imm32 = fetch_dword();
|
||||
imm32 = (Bit32s) fetch_dword();
|
||||
dis_sprintf("%08x", (unsigned) (imm32 + db_eip));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
Bit16u imm16;
|
||||
Bit16s imm16; /* JMP rel16 is signed */
|
||||
|
||||
imm16 = fetch_word();
|
||||
imm16 = (Bit16s) fetch_word();
|
||||
dis_sprintf("%04x", (unsigned) ((imm16 + db_eip) & 0xFFFF));
|
||||
}
|
||||
}
|
||||
@ -591,9 +591,9 @@ bx_disassemble_c::Ib(void)
|
||||
void
|
||||
bx_disassemble_c::Jb(void)
|
||||
{
|
||||
Bit8u imm8;
|
||||
Bit8s imm8; /* JMP rel8 is signed */
|
||||
|
||||
imm8 = fetch_byte();
|
||||
imm8 = (Bit8s) fetch_byte();
|
||||
#if BX_CPU_LEVEL > 2
|
||||
if (db_32bit_opsize) {
|
||||
dis_sprintf("%08x", (unsigned) (imm8 + db_eip));
|
||||
|
Loading…
Reference in New Issue
Block a user