From 79355ae971cf9bd0346cac30be812d2e126daff6 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Mon, 30 Sep 2013 00:27:56 +0000 Subject: [PATCH] [SOFT386] Fix prefix handling. svn path=/branches/ntvdm/; revision=60464 --- lib/soft386/opcodes.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/soft386/opcodes.c b/lib/soft386/opcodes.c index bcc389b6488..33b7852afb7 100644 --- a/lib/soft386/opcodes.c +++ b/lib/soft386/opcodes.c @@ -3757,18 +3757,19 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodePushImm) /* Make sure this is the right instruction */ ASSERT(Opcode == 0x68); - if (State->PrefixFlags == SOFT386_PREFIX_OPSIZE) - { - /* The OPSIZE prefix toggles the size */ - Size = !Size; - } - else + if (State->PrefixFlags & SOFT386_PREFIX_LOCK) { /* Invalid prefix */ Soft386Exception(State, SOFT386_EXCEPTION_UD); return FALSE; } + if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE) + { + /* The OPSIZE prefix toggles the size */ + Size = !Size; + } + if (Size) { ULONG Data;