Module: wine Branch: master Commit: de3bc7d511909e4bf4b384e395e8bef91587050c URL: https://gitlab.winehq.org/wine/wine/-/commit/de3bc7d511909e4bf4b384e395e8bef...
Author: Alexandre Julliard julliard@winehq.org Date: Sat Jan 6 22:12:53 2024 +0100
krnl386: Use NtContinue to restore the full context.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56152
---
dlls/krnl386.exe16/kernel16_private.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/dlls/krnl386.exe16/kernel16_private.h b/dlls/krnl386.exe16/kernel16_private.h index a70dfeeec9f..cd08c40128f 100644 --- a/dlls/krnl386.exe16/kernel16_private.h +++ b/dlls/krnl386.exe16/kernel16_private.h @@ -335,17 +335,15 @@ static inline DWORD stack32_pop( CONTEXT *context ) __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") \ "movl %esp,%ebp\n\t" \ __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") \ - "leal -(0x2cc+4)(%esp),%esp\n\t" /* sizeof(CONTEXT) + space for %eax */ \ - "movl %eax,-4(%ebp)\n\t" \ + "leal -0x2cc(%esp),%esp\n\t" /* sizeof(CONTEXT) */ \ "pushl %esp\n\t" /* context */ \ "call " __ASM_STDCALL("RtlCaptureContext",4) "\n\t" \ - "movl -4(%ebp),%eax\n\t" \ - "movl %eax,0xb0(%esp)\n\t" /* context->Eax */ \ + "movl %esp,%esi\n\t" \ "pushl %esp\n\t" /* context */ \ "call " __ASM_STDCALL("__regs_" #name,4) "\n\t" \ - "pushl %esp\n\t" /* context */ \ - "pushl $-2\n\t" /* GetCurrentThread() */ \ - "call " __ASM_STDCALL("NtSetContextThread",8) "\n\t" \ + "pushl $0\n\t" /* alertable */ \ + "pushl %esi\n\t" /* context */ \ + "call " __ASM_STDCALL("NtContinue",8) "\n\t" \ "ret" ) /* fake ret to make copy protections happy */
#endif /* __WINE_KERNEL16_PRIVATE_H */