Reverting back the changes in data_xfer16.cc

Add/Fix bx_info messages in proc_ctrl.cc
This commit is contained in:
Stanislav Shwartsman 2003-11-13 21:57:13 +00:00
parent d51aece0c1
commit cdb68ff8c8
2 changed files with 46 additions and 32 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: data_xfer16.cc,v 1.25 2003-11-13 21:17:31 sshwarts Exp $
// $Id: data_xfer16.cc,v 1.26 2003-11-13 21:57:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -104,8 +104,13 @@ BX_CPU_C::MOV_EwSw(bxInstruction_c *i)
seg_reg = BX_CPU_THIS_PTR sregs[i->nnn()].selector.value;
if (i->modC0()) {
if ( i->os32L() ) {
BX_WRITE_32BIT_REGZ(i->rm(), seg_reg);
}
else {
BX_WRITE_16BIT_REG(i->rm(), seg_reg);
}
}
else {
write_virtual_word(i->seg(), RMAddr(i), &seg_reg);
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: proc_ctrl.cc,v 1.77 2003-11-13 21:17:31 sshwarts Exp $
// $Id: proc_ctrl.cc,v 1.78 2003-11-13 21:57:13 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -105,6 +105,7 @@ BX_CPU_C::CLTS(bxInstruction_c *i)
// #GP(0) if CPL is not 0
if ((v8086_mode() || protected_mode()) && CPL!=0) {
BX_INFO(("CLTS: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
return;
}
@ -126,7 +127,7 @@ void BX_CPU_C::INVD(bxInstruction_c *i)
// protected or v8086 mode
if (BX_CPU_THIS_PTR cr0.pe) {
if (CPL!=0) {
BX_INFO(("INVD: CPL!=0"));
BX_INFO(("INVD: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}
}
@ -145,7 +146,7 @@ void BX_CPU_C::WBINVD(bxInstruction_c *i)
if (BX_CPU_THIS_PTR cr0.pe) {
if (CPL!=0) {
BX_INFO(("WBINVD: CPL!=0"));
BX_INFO(("WBINVD: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}
}
@ -163,6 +164,7 @@ void BX_CPU_C::MOV_DdRd(bxInstruction_c *i)
Bit32u val_32;
if (v8086_mode()) {
BX_INFO(("MOV_DdRd: v8086 mode causes #GP(0)"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -180,8 +182,9 @@ void BX_CPU_C::MOV_DdRd(bxInstruction_c *i)
invalidate_prefetch_q();
if (protected_mode() && CPL!=0) {
/* #GP(0) if CPL is not 0 */
if (protected_mode() && CPL!=0) {
BX_INFO(("MOV_DdRd: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -297,7 +300,7 @@ void BX_CPU_C::MOV_RdDd(bxInstruction_c *i)
Bit32u val_32;
if (v8086_mode()) {
BX_INFO(("MOV_RdDd: v8086 mode causes #GP"));
BX_INFO(("MOV_RdDd: v8086 mode causes #GP(0)"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -305,10 +308,11 @@ void BX_CPU_C::MOV_RdDd(bxInstruction_c *i)
* regardless of the encoding of the MOD field in the MODRM byte.
*/
if (!i->modC0())
BX_INFO(("MOV_DdRd(): rm field not a register!"));
BX_INFO(("MOV_RdDd(): rm field not a register!"));
if (protected_mode() && (CPL!=0)) {
/* #GP(0) if CPL is not 0 */
if (protected_mode() && (CPL!=0)) {
BX_INFO(("MOV_RdDd: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -371,7 +375,7 @@ void BX_CPU_C::MOV_DqRq(bxInstruction_c *i)
Bit64u val_64;
if (v8086_mode()) {
BX_INFO(("MOV_DqRq: v8086 mode causes #GP"));
BX_INFO(("MOV_DqRq: v8086 mode causes #GP(0)"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -385,12 +389,13 @@ void BX_CPU_C::MOV_DqRq(bxInstruction_c *i)
* regardless of the encoding of the MOD field in the MODRM byte.
*/
if (!i->modC0())
BX_INFO(("MOV_DdRd(): rm field not a register!"));
BX_INFO(("MOV_DqRq(): rm field not a register!"));
invalidate_prefetch_q();
if (protected_mode() && CPL!=0) {
/* #GP(0) if CPL is not 0 */
if (protected_mode() && CPL!=0) {
BX_INFO(("MOV_DqRq: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -485,7 +490,7 @@ void BX_CPU_C::MOV_RqDq(bxInstruction_c *i)
Bit64u val_64;
if (v8086_mode()) {
BX_INFO(("MOV_RqDq: v8086 mode causes #GP"));
BX_INFO(("MOV_RqDq: v8086 mode causes #GP(0)"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -493,10 +498,11 @@ void BX_CPU_C::MOV_RqDq(bxInstruction_c *i)
* regardless of the encoding of the MOD field in the MODRM byte.
*/
if (!i->modC0())
BX_INFO(("MOV_DdRd(): rm field not a register!"));
BX_INFO(("MOV_RqDq(): rm field not a register!"));
if (protected_mode() && (CPL!=0)) {
/* #GP(0) if CPL is not 0 */
if (protected_mode() && (CPL!=0)) {
BX_INFO(("MOV_RqDq: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -633,7 +639,7 @@ void BX_CPU_C::MOV_CdRd(bxInstruction_c *i)
Bit32u val_32;
if (v8086_mode()) {
BX_INFO(("MOV_CdRd: GP(0) in v8086 mode!"));
BX_INFO(("MOV_CdRd: v8086 mode causes #GP(0)"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -647,12 +653,13 @@ void BX_CPU_C::MOV_CdRd(bxInstruction_c *i)
* regardless of the encoding of the MOD field in the MODRM byte.
*/
if (!i->modC0())
BX_INFO(("MOV_DdRd(): rm field not a register!"));
BX_INFO(("MOV_CdRd(): rm field not a register!"));
invalidate_prefetch_q();
if (protected_mode() && CPL!=0) {
/* #GP(0) if CPL is not 0 */
if (protected_mode() && CPL!=0) {
BX_INFO(("MOV_CdRd: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -713,7 +720,7 @@ void BX_CPU_C::MOV_RdCd(bxInstruction_c *i)
Bit32u val_32;
if (v8086_mode()) {
BX_INFO(("MOV_RdCd: GP(0) in v8086 mode!"));
BX_INFO(("MOV_RdCd: v8086 mode causes #GP(0)"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -727,12 +734,12 @@ void BX_CPU_C::MOV_RdCd(bxInstruction_c *i)
* regardless of the encoding of the MOD field in the MODRM byte.
*/
if (!i->modC0())
BX_INFO(("MOV_DdRd(): rm field not a register!"));
BX_INFO(("MOV_RdCd(): rm field not a register!"));
/* #GP(0) if CPL is not 0 */
if (protected_mode() && CPL!=0) {
BX_INFO(("MOV_RdCd: CPL!=0"));
BX_INFO(("MOV_RdCd: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
return;
}
switch (i->nnn()) {
@ -784,7 +791,7 @@ void BX_CPU_C::MOV_CqRq(bxInstruction_c *i)
Bit64u val_64;
if (v8086_mode()) {
BX_INFO(("MOV_CqRq: GP(0) in v8086 mode!"));
BX_INFO(("MOV_CqRq: v8086 mode causes #GP(0)"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -798,12 +805,13 @@ void BX_CPU_C::MOV_CqRq(bxInstruction_c *i)
* regardless of the encoding of the MOD field in the MODRM byte.
*/
if (!i->modC0())
BX_INFO(("MOV_DdRd(): rm field not a register!"));
BX_INFO(("MOV_CqRq(): rm field not a register!"));
invalidate_prefetch_q();
if (protected_mode() && CPL!=0) {
/* #GP(0) if CPL is not 0 */
if (protected_mode() && CPL!=0) {
BX_INFO(("MOV_CqRq: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -859,7 +867,7 @@ void BX_CPU_C::MOV_RqCq(bxInstruction_c *i)
Bit64u val_64;
if (v8086_mode()) {
BX_INFO(("MOV_RqCq: GP(0) in v8086 mode!"));
BX_INFO(("MOV_RqCq: v8086 mode causes #GP(0)"));
exception(BX_GP_EXCEPTION, 0, 0);
}
@ -873,10 +881,11 @@ void BX_CPU_C::MOV_RqCq(bxInstruction_c *i)
* regardless of the encoding of the MOD field in the MODRM byte.
*/
if (!i->modC0())
BX_INFO(("MOV_DdRd(): rm field not a register!"));
BX_INFO(("MOV_RqCq(): rm field not a register!"));
if (protected_mode() && CPL!=0) {
/* #GP(0) if CPL is not 0 */
if (protected_mode() && CPL!=0) {
BX_INFO(("MOV_RqCq: #GP(0) if CPL is not 0"));
exception(BX_GP_EXCEPTION, 0, 0);
}