From ec52f30bc5192db00484e007ddcd34ff23b3e3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Feb 2014 21:02:02 +0000 Subject: [PATCH] [FAST486] - Fix return values of Fast486OpcodeSahf and Fast486OpcodeLahf handlers. - [TheFlash], can you please see what we should return after calling Fast486ExceptionWithErrorCode in Fast486OpcodePopFlags ? svn path=/branches/ntvdm/; revision=62313 --- lib/fast486/opcodes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/fast486/opcodes.c b/lib/fast486/opcodes.c index 0c4f3d86573..f5bf0bb8e60 100644 --- a/lib/fast486/opcodes.c +++ b/lib/fast486/opcodes.c @@ -4268,6 +4268,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodePopFlags) return FALSE; } + /* Check for VM86 mode when IOPL is not 3 */ if (State->Flags.Vm && (State->Flags.Iopl != 3)) { /* Call the VM86 monitor */ @@ -4305,7 +4306,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSahf) State->Flags.AlwaysSet = TRUE; State->Flags.Reserved0 = State->Flags.Reserved1 = FALSE; - return FALSE; + return TRUE; } FAST486_OPCODE_HANDLER(Fast486OpcodeLahf) @@ -4316,7 +4317,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeLahf) /* Set AH to the low-order byte of FLAGS */ State->GeneralRegs[FAST486_REG_EAX].HighByte = LOBYTE(State->Flags.Long); - return FALSE; + return TRUE; } FAST486_OPCODE_HANDLER(Fast486OpcodeRet)