Make STI instruction raise an exception
Jukka Heinonen
jhei at iki.fi
Sun Mar 14 04:18:17 CST 2004
This patch restores exception raising logic to STI instruction.
After this patch, fixing DPMI event handling requires that
return path in call16_handler and entry path in K32WOWCallback16Ex
make the application jump into short assembler code block that
executes STI if both teb->dpmi_vif and teb->vm86_pending are set.
Changelog:
Emulating STI instruction now raises an exception if there are pending events.
Index: dlls/kernel/instr.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/instr.c,v
retrieving revision 1.12
diff -u -r1.12 instr.c
--- dlls/kernel/instr.c 17 Feb 2004 22:46:06 -0000 1.12
+++ dlls/kernel/instr.c 14 Mar 2004 10:08:47 -0000
@@ -822,6 +822,11 @@
case 0xfb: /* sti */
NtCurrentTeb()->dpmi_vif = 1;
context->Eip += prefixlen + 1;
+ if (NtCurrentTeb()->vm86_pending)
+ {
+ rec->ExceptionCode = EXCEPTION_VM86_STI;
+ break; /* Handle the pending event. */
+ }
return ExceptionContinueExecution;
}
return ExceptionContinueSearch; /* Unable to emulate it */
--
Jukka Heinonen <http://www.iki.fi/jhei>
More information about the wine-patches
mailing list