Jacek Caban : ntdll: Store eflags in x86_64 syscall frame.

Alexandre Julliard julliard at winehq.org
Wed Feb 17 16:23:33 CST 2021


Module: wine
Branch: master
Commit: 9bdd02de0c5cd370a48901ceede12ff946662295
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9bdd02de0c5cd370a48901ceede12ff946662295

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb 15 21:58:02 2021 +0100

ntdll: Store eflags in x86_64 syscall frame.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/unix/signal_x86_64.c | 2 +-
 tools/winebuild/import.c        | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 824cfb4febe..9366d8913c0 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -1947,7 +1947,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
             context->Rsp    = (ULONG64)&frame->ret_addr;
             context->Rbp    = frame->rbp;
             context->Rip    = frame->thunk_addr;
-            context->EFlags = 0x202;
+            context->EFlags = frame->eflags;
             __asm__( "movw %%cs,%0" : "=g" (context->SegCs) );
             __asm__( "movw %%ss,%0" : "=g" (context->SegSs) );
             context->ContextFlags |= CONTEXT_CONTROL;
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index c70470251a4..8c949a383e3 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1508,7 +1508,9 @@ void output_syscalls( DLLSPEC *spec )
             output_cfi( ".cfi_rel_offset %%rbp,0" );
             output( "\tmovq %%rsp,%%rbp\n" );
             output_cfi( ".cfi_def_cfa_register %%rbp" );
-            output( "\tleaq -0x2a8(%%rbp),%%rsp\n" );
+            output( "\tleaq -0x10(%%rbp),%%rsp\n" );
+            output( "\tpushfq\n" );
+            output( "\tsubq $0x280,%%rsp\n" );
             output( "\tandq $~63,%%rsp\n" );
             output( "\tmovq %%rbx,-0x90(%%rbp)\n" );
             output_cfi( ".cfi_rel_offset %%rbx,-144" );




More information about the wine-cvs mailing list