From dafeadd7ab23fdb2c6704cb9456be88e92fc9cfa Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Tue, 12 May 2015 21:37:10 +0000 Subject: [PATCH] [FAST486] Addendum to r67702. svn path=/trunk/; revision=67703 --- reactos/lib/fast486/opcodes.c | 56 +++++------------------------------ 1 file changed, 8 insertions(+), 48 deletions(-) diff --git a/reactos/lib/fast486/opcodes.c b/reactos/lib/fast486/opcodes.c index 261c6a85bf9..4356defd3c8 100644 --- a/reactos/lib/fast486/opcodes.c +++ b/reactos/lib/fast486/opcodes.c @@ -635,12 +635,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeClearCarry) /* Make sure this is the right instruction */ ASSERT(Opcode == 0xF8); - /* No prefixes allowed */ - if (State->PrefixFlags) - { - Fast486Exception(State, FAST486_EXCEPTION_UD); - return; - } + NO_LOCK_PREFIX(); /* Clear CF and return success */ State->Flags.Cf = FALSE; @@ -651,12 +646,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSetCarry) /* Make sure this is the right instruction */ ASSERT(Opcode == 0xF9); - /* No prefixes allowed */ - if (State->PrefixFlags) - { - Fast486Exception(State, FAST486_EXCEPTION_UD); - return; - } + NO_LOCK_PREFIX(); /* Set CF and return success*/ State->Flags.Cf = TRUE; @@ -667,12 +657,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeComplCarry) /* Make sure this is the right instruction */ ASSERT(Opcode == 0xF5); - /* No prefixes allowed */ - if (State->PrefixFlags) - { - Fast486Exception(State, FAST486_EXCEPTION_UD); - return; - } + NO_LOCK_PREFIX(); /* Toggle CF and return success */ State->Flags.Cf = !State->Flags.Cf; @@ -684,12 +669,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeClearInt) /* Make sure this is the right instruction */ ASSERT(Opcode == 0xFA); - /* No prefixes allowed */ - if (State->PrefixFlags) - { - Fast486Exception(State, FAST486_EXCEPTION_UD); - return; - } + NO_LOCK_PREFIX(); /* Check for protected mode */ if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) @@ -719,12 +699,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSetInt) /* Make sure this is the right instruction */ ASSERT(Opcode == 0xFB); - /* No prefixes allowed */ - if (State->PrefixFlags) - { - Fast486Exception(State, FAST486_EXCEPTION_UD); - return; - } + NO_LOCK_PREFIX(); /* Check for protected mode */ if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) @@ -754,12 +729,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeClearDir) /* Make sure this is the right instruction */ ASSERT(Opcode == 0xFC); - /* No prefixes allowed */ - if (State->PrefixFlags) - { - Fast486Exception(State, FAST486_EXCEPTION_UD); - return; - } + NO_LOCK_PREFIX(); /* Clear DF */ State->Flags.Df = FALSE; @@ -770,12 +740,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSetDir) /* Make sure this is the right instruction */ ASSERT(Opcode == 0xFD); - /* No prefixes allowed */ - if (State->PrefixFlags) - { - Fast486Exception(State, FAST486_EXCEPTION_UD); - return; - } + NO_LOCK_PREFIX(); /* Set DF */ State->Flags.Df = TRUE; @@ -786,12 +751,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeHalt) /* Make sure this is the right instruction */ ASSERT(Opcode == 0xF4); - /* No prefixes allowed */ - if (State->PrefixFlags) - { - Fast486Exception(State, FAST486_EXCEPTION_UD); - return; - } + NO_LOCK_PREFIX(); /* Privileged instructions can only be executed under CPL = 0 */ if (Fast486GetCurrentPrivLevel(State) != 0)