Rebase against 21c4a25437969696cbf5ffecee191ba8302bb2dd.

This commit is contained in:
Zebediah Figura
2021-08-30 22:26:36 -05:00
parent 931daeffec
commit 24319dc308
8 changed files with 137 additions and 181 deletions

View File

@@ -1,4 +1,4 @@
From 30a823033f450475796b7d24a757ef3b00be46fa Mon Sep 17 00:00:00 2001
From 5199e9b66777ab4436b8d641dd8412da472d718d Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Jul 2020 15:00:34 +0300
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
@@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
3 files changed, 124 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4b03c869d5e0..477266b8ba80 100644
index 594794ed93c..38f6e76eae0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -487,6 +487,7 @@ AC_CHECK_HEADERS(\
@@ -479,6 +479,7 @@ AC_CHECK_HEADERS(\
linux/joystick.h \
linux/major.h \
linux/param.h \
@@ -22,7 +22,7 @@ index 4b03c869d5e0..477266b8ba80 100644
linux/types.h \
linux/ucdrom.h \
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index da548eb1a492..2fb3eab73594 100644
index a9bdbf62929..7d9ee03ffaf 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -28,6 +28,7 @@
@@ -166,7 +166,7 @@ index da548eb1a492..2fb3eab73594 100644
/***********************************************************************
* handle_interrupt
@@ -3004,6 +3124,7 @@ void signal_init_process(void)
@@ -2980,6 +3100,7 @@ void signal_init_process(void)
if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error;
if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error;
if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error;
@@ -174,7 +174,7 @@ index da548eb1a492..2fb3eab73594 100644
return;
error:
@@ -3222,6 +3343,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
@@ -3175,6 +3296,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"leaq 0x28(%rsp),%rsi\n\t" /* first argument */
"movq %rcx,%rsp\n\t"
"movq 0x00(%rcx),%rax\n\t"
@@ -183,7 +183,7 @@ index da548eb1a492..2fb3eab73594 100644
"movl %eax,%ebx\n\t"
"shrl $8,%ebx\n\t"
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 6a1585781431..dc04a3214749 100644
index fcd27117780..0da028d83e7 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1419,7 +1419,6 @@ static int cmp_link_name( const void *e1, const void *e2 )
@@ -194,15 +194,15 @@ index 6a1585781431..dc04a3214749 100644
/* output the functions for system calls */
void output_syscalls( DLLSPEC *spec )
{
@@ -1488,7 +1487,7 @@ void output_syscalls( DLLSPEC *spec )
@@ -1477,7 +1476,7 @@ void output_syscalls( DLLSPEC *spec )
* validate that instruction, we can just put a jmp there instead. */
output( "\t.byte 0x4c,0x8b,0xd1\n" ); /* movq %rcx,%r10 */
output( "\t.byte 0xb8\n" ); /* movl $i,%eax */
- output( "\t.long %u\n", i );
+ output( "\t.long %u\n", 0xf000 + i );
- output( "\t.long %u\n", id );
+ output( "\t.long %u\n", 0xf000 + id );
output( "\t.byte 0xf6,0x04,0x25,0x08,0x03,0xfe,0x7f,0x01\n" ); /* testb $1,0x7ffe0308 */
output( "\t.byte 0x75,0x03\n" ); /* jne 1f */
output( "\t.byte 0x0f,0x05\n" ); /* syscall */
--
2.31.1
2.33.0