From 153bec9d1a3b2c33a65d50984c7a1cc87aa7f07e Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Thu, 3 Feb 2005 22:24:45 +0000 Subject: [PATCH] Fixed compilation errors when CPU-LEVEL=3 --- bochs/cpu/flag_ctrl.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bochs/cpu/flag_ctrl.cc b/bochs/cpu/flag_ctrl.cc index 2bbcf50f6..10a189bc8 100644 --- a/bochs/cpu/flag_ctrl.cc +++ b/bochs/cpu/flag_ctrl.cc @@ -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; }