From 9339e12e6986de6dc2b8cbaca2082f384ee64f54 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Tue, 8 Oct 2013 23:03:56 +0000 Subject: [PATCH] [SOFT386] Fix prefix handling. svn path=/branches/ntvdm/; revision=60585 --- lib/soft386/opcodes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/soft386/opcodes.c b/lib/soft386/opcodes.c index 099ef3b3195..120662b0620 100644 --- a/lib/soft386/opcodes.c +++ b/lib/soft386/opcodes.c @@ -1152,12 +1152,13 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeMovRegImm) /* Make sure this is the right instruction */ ASSERT((Opcode & 0xF8) == 0xB8); - if (State->PrefixFlags == SOFT386_PREFIX_OPSIZE) + if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE) { /* The OPSIZE prefix toggles the size */ Size = !Size; } - else if (State->PrefixFlags != 0) + + if (State->PrefixFlags & SOFT386_PREFIX_LOCK) { /* Invalid prefix */ Soft386Exception(State, SOFT386_EXCEPTION_UD);