Fixed compilation errors when CPU-LEVEL=3

This commit is contained in:
Stanislav Shwartsman 2005-02-03 22:24:45 +00:00
parent 9305305493
commit 153bec9d1a

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: flag_ctrl.cc,v 1.18 2005-02-03 22:08:34 sshwarts Exp $
// $Id: flag_ctrl.cc,v 1.19 2005-02-03 22:24:45 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -68,6 +68,7 @@ void BX_CPU_C::CLI(bxInstruction_c *i)
#if BX_CPU_LEVEL >= 2
if (protected_mode())
{
#if BX_CPU_LEVEL >= 4
if (BX_CPU_THIS_PTR cr4.get_PVI() && (cpl == 3))
{
if (IOPL < 3) {
@ -75,7 +76,9 @@ void BX_CPU_C::CLI(bxInstruction_c *i)
return;
}
}
else {
else
#endif
{
if (IOPL < cpl) {
exception(BX_GP_EXCEPTION, 0, 0);
return;
@ -86,12 +89,13 @@ void BX_CPU_C::CLI(bxInstruction_c *i)
else if (v8086_mode())
{
if (IOPL != 3) {
#if BX_CPU_LEVEL >= 4
if (BX_CPU_THIS_PTR cr4.get_VME())
{
BX_CPU_THIS_PTR clear_VIF();
return;
}
#endif
exception(BX_GP_EXCEPTION, 0, 0);
return;
}
@ -110,6 +114,7 @@ void BX_CPU_C::STI(bxInstruction_c *i)
#if BX_CPU_LEVEL >= 2
if (protected_mode())
{
#if BX_CPU_LEVEL >= 4
if (BX_CPU_THIS_PTR cr4.get_PVI())
{
if (cpl == 3) {
@ -126,7 +131,7 @@ void BX_CPU_C::STI(bxInstruction_c *i)
}
}
}
#endif
if (cpl > IOPL) {
exception(BX_GP_EXCEPTION, 0, 0);
return;
@ -136,12 +141,13 @@ void BX_CPU_C::STI(bxInstruction_c *i)
else if (v8086_mode())
{
if (IOPL != 3) {
#if BX_CPU_LEVEL >= 4
if (! BX_CPU_THIS_PTR get_VIP () && BX_CPU_THIS_PTR cr4.get_VME())
{
BX_CPU_THIS_PTR assert_VIF();
return;
}
#endif
exception(BX_GP_EXCEPTION, 0, 0);
return;
}