From: Jinoh Kang jinoh.kang.kr@gmail.com
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/ntdll/tests/exception.c | 1 - dlls/ntdll/unix/signal_x86_64.c | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 006da0336be..9f4477a4da1 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -5010,7 +5010,6 @@ static void test_syscall_clobbered_regs(void) ok(status == STATUS_INVALID_PARAMETER_1, "Got unexpected status %#lx.\n", status); ok((BYTE *)regs.rcx > (BYTE *)pNtWaitForMultipleObjects && (BYTE *)regs.rcx < (BYTE *)pNtWaitForMultipleObjects + 0x20, "Got unexpected rcx %s, pNtWaitForMultipleObjects %p.\n", wine_dbgstr_longlong(regs.rcx), pNtWaitForMultipleObjects); - todo_wine ok((regs.eflags & 0x400) != 0, "Expected direction flag to be set in EFLAGS (%#x).\n", regs.eflags);
context.ContextFlags = CONTEXT_CONTROL; diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 6c87e347eac..87ff148a628 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -3415,13 +3415,15 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "movq 0x28(%rcx),%rdi\n\t" "movq 0x20(%rcx),%rsi\n\t" "movq 0x08(%rcx),%rbx\n\t" + "leaq 0x70(%rcx),%rsp\n\t" "testl $0x3,%edx\n\t" /* CONTEXT_CONTROL | CONTEXT_INTEGER */ "jnz 1f\n\t" - "movq 0x88(%rcx),%rsp\n\t" - "movq 0x70(%rcx),%rcx\n\t" /* frame->rip */ + "pop %rcx\n\t" /* frame->rip */ + "add $8,%rsp\n\t" + "popfq\n\t" + "pop %rsp\n\t" "jmpq *%rcx\n\t" - "1:\tleaq 0x70(%rcx),%rsp\n\t" - "testl $0x2,%edx\n\t" /* CONTEXT_INTEGER */ + "1:\ttestl $0x2,%edx\n\t" /* CONTEXT_INTEGER */ "jnz 1f\n\t" "movq (%rsp),%rcx\n\t" /* frame->rip */ "iretq\n"