Module: wine Branch: master Commit: e2fac05854736e1d2b2a353af0f1382b7eda4fad URL: https://gitlab.winehq.org/wine/wine/-/commit/e2fac05854736e1d2b2a353af0f1382...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Jun 2 09:32:59 2023 +0200
ntdll: Use the sysv ABI for the %fs allocation function.
---
dlls/ntdll/unix/signal_x86_64.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 508a3a5b323..87ecec252e7 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -88,17 +88,17 @@ WINE_DECLARE_DEBUG_CHANNEL(seh); #include <asm/prctl.h> static inline int arch_prctl( int func, void *ptr ) { return syscall( __NR_arch_prctl, func, ptr ); }
-extern int CDECL alloc_fs_sel( int sel, void *base ) DECLSPEC_HIDDEN; +extern int alloc_fs_sel( int sel, void *base ) DECLSPEC_HIDDEN; __ASM_GLOBAL_FUNC( alloc_fs_sel, /* switch to 32-bit stack */ "pushq %rbx\n\t" - "pushq %rdi\n\t" - "movq %rsp,%rdi\n\t" - "movl 0x4(%rdx),%esp\n\t" /* Tib.StackBase */ + "pushq %r12\n\t" + "movq %rsp,%r12\n\t" + "movl 0x4(%rsi),%esp\n\t" /* Tib.StackBase */ "subl $0x20,%esp\n\t" /* setup modify_ldt struct on 32-bit stack */ - "movl %ecx,(%rsp)\n\t" /* entry_number */ - "movl %edx,4(%rsp)\n\t" /* base */ + "movl %edi,(%rsp)\n\t" /* entry_number */ + "movl %esi,4(%rsp)\n\t" /* base */ "movl $~0,8(%rsp)\n\t" /* limit */ "movl $0x41,12(%rsp)\n\t" /* seg_32bit | usable */ /* invoke 32-bit syscall */ @@ -107,8 +107,8 @@ __ASM_GLOBAL_FUNC( alloc_fs_sel, "int $0x80\n\t" /* restore stack */ "movl (%rsp),%eax\n\t" /* entry_number */ - "movq %rdi,%rsp\n\t" - "popq %rdi\n\t" + "movq %r12,%rsp\n\t" + "popq %r12\n\t" "popq %rbx\n\t" "ret" );