Commit 0aae4b05 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use ret instead of jmp to return from syscall dispatchers.

parent 3242676e
......@@ -2669,7 +2669,9 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
__ASM_CFI(".cfi_register %eip, %ecx\n\t")
"movl 0x0c(%esp),%esp\n\t" /* frame->esp */
__ASM_CFI(".cfi_same_value %esp\n\t")
"jmpl *%ecx\n"
"pushl %ecx\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
"ret\n"
__ASM_CFI("\t.cfi_restore_state\n")
"1:\ttestl $0x2 << 16,%ecx\n\t" /* CONTEXT_INTEGER */
"jz 1f\n\t"
......@@ -2770,7 +2772,9 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher,
__ASM_CFI(".cfi_register %eip, %ecx\n\t")
"movl 0x0c(%esp),%esp\n\t" /* frame->esp */
__ASM_CFI(".cfi_same_value %esp\n\t")
"jmpl *%ecx" )
"pushl %ecx\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
"ret" )
/***********************************************************************
......
......@@ -2798,7 +2798,9 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
__ASM_CFI(".cfi_same_value rsp\n\t")
"movq 0x70(%rcx),%rcx\n\t" /* frame->rip */
__ASM_CFI(".cfi_register rip, rcx\n\t")
"jmpq *%rcx\n\t"
"pushq %rcx\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset 8\n\t")
"ret\n\t"
/* $rcx is now pointing to "frame" again */
__ASM_CFI(".cfi_restore_state\n\t")
/* remember state when $rcx is pointing to "frame" */
......@@ -2938,7 +2940,9 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher,
"movq 0x88(%rcx),%rsp\n\t"
__ASM_CFI(".cfi_def_cfa rsp, 0\n\t")
__ASM_CFI(".cfi_same_value rsp\n\t")
"jmpq *0x70(%rcx)" ) /* frame->rip */
"pushq 0x70(%rcx)\n\t" /* frame->rip */
__ASM_CFI(".cfi_adjust_cfa_offset 8\n\t")
"ret" )
/***********************************************************************
......
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