Commit 931292f1 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use the sysv ABI for __wine_syscall_dispatcher_return().

Missing from b337c5b1, spotted by Fan WenJie.
parent 3b541194
......@@ -1861,8 +1861,8 @@ static BOOL handle_syscall_fault( ucontext_t *sigcontext, EXCEPTION_RECORD *rec,
else
{
TRACE_(seh)( "returning to user mode ip=%016lx ret=%08x\n", frame->rip, rec->ExceptionCode );
RCX_sig(sigcontext) = (ULONG_PTR)frame;
RDX_sig(sigcontext) = rec->ExceptionCode;
RDI_sig(sigcontext) = (ULONG_PTR)frame;
RSI_sig(sigcontext) = rec->ExceptionCode;
RIP_sig(sigcontext) = (ULONG_PTR)__wine_syscall_dispatcher_return;
}
return TRUE;
......@@ -2824,14 +2824,16 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
__ASM_CFI_REG_IS_AT1(r14, rbp, 0x48)
__ASM_CFI_REG_IS_AT1(r15, rbp, 0x50)
__ASM_CFI_REG_IS_AT1(rbp, rbp, 0x00)
"5:\tmovl $0xc000000d,%edx\n\t" /* STATUS_INVALID_PARAMETER */
"5:\tmovl $0xc000000d,%eax\n\t" /* STATUS_INVALID_PARAMETER */
"movq %rsp,%rcx\n\t"
/* $rcx is now pointing to "frame" again */
__ASM_CFI(".cfi_restore_state\n\t")
"jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t"
".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n"
__ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t"
"movq %rdi,%rcx\n\t"
"movl 0xb0(%rcx),%r14d\n\t" /* frame->syscall_flags */
"movq %rdx,%rax\n\t"
"movq %rsi,%rax\n\t"
"jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
......
......@@ -266,7 +266,7 @@ extern void DECLSPEC_NORETURN signal_start_thread( PRTL_THREAD_START_ROUTINE ent
extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int), TEB *teb ) DECLSPEC_HIDDEN;
extern SYSTEM_SERVICE_TABLE KeServiceDescriptorTable[4] DECLSPEC_HIDDEN;
extern void __wine_syscall_dispatcher(void) DECLSPEC_HIDDEN;
extern void WINAPI DECLSPEC_NORETURN __wine_syscall_dispatcher_return( void *frame, ULONG_PTR retval ) DECLSPEC_HIDDEN;
extern void DECLSPEC_NORETURN __wine_syscall_dispatcher_return( void *frame, ULONG_PTR retval ) DECLSPEC_HIDDEN;
extern void __wine_unix_call_dispatcher(void) DECLSPEC_HIDDEN;
extern NTSTATUS signal_set_full_context( CONTEXT *context ) DECLSPEC_HIDDEN;
extern NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment