Module: wine Branch: master Commit: 6d931c271a9c9df332c0a9fe084f667919f7081a URL: https://gitlab.winehq.org/wine/wine/-/commit/6d931c271a9c9df332c0a9fe084f667...
Author: Alexandre Julliard julliard@winehq.org Date: Thu May 2 09:28:00 2024 +0200
ntdll: Build __chkstk as x86-64 code on ARM64EC.
Based on a patch by Jacek Caban.
---
dlls/ntdll/signal_arm64ec.c | 11 ----------- dlls/ntdll/signal_x86_64.c | 26 +++++++++++++++++--------- 2 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/dlls/ntdll/signal_arm64ec.c b/dlls/ntdll/signal_arm64ec.c index e9e9b2a6bb3..8caf4218ab9 100644 --- a/dlls/ntdll/signal_arm64ec.c +++ b/dlls/ntdll/signal_arm64ec.c @@ -2323,17 +2323,6 @@ static void __attribute__((naked)) arm64x_check_call(void) }
-/************************************************************************** - * __chkstk (NTDLL.@) - * - * Supposed to touch all the stack pages, but we shouldn't need that. - */ -void __attribute__((naked)) __chkstk(void) -{ - asm( "ret" ); -} - - /************************************************************************** * __chkstk_arm64ec (NTDLL.@) * diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 78afadbe387..d6218dc61b7 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -18,7 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#if defined(__x86_64__) && !defined(__arm64ec__) +#if 0 +#pragma makedep arm64ec_x64 +#endif + +#ifdef __x86_64__
#include <stdlib.h> #include <stdarg.h> @@ -34,6 +38,17 @@ #include "wine/debug.h" #include "ntsyscalls.h"
+ +/************************************************************************** + * __chkstk (NTDLL.@) + * + * Supposed to touch all the stack pages, but we shouldn't need that. + */ +__ASM_GLOBAL_FUNC( __chkstk, "ret" ); + + +#ifndef __arm64ec_x64__ + WINE_DEFAULT_DEBUG_CHANNEL(seh); WINE_DECLARE_DEBUG_CHANNEL(relay);
@@ -81,14 +96,6 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX }
-/************************************************************************** - * __chkstk (NTDLL.@) - * - * Supposed to touch all the stack pages, but we shouldn't need that. - */ -__ASM_GLOBAL_FUNC( __chkstk, "ret" ); - - /*********************************************************************** * RtlCaptureContext (NTDLL.@) */ @@ -1043,4 +1050,5 @@ __ASM_GLOBAL_FUNC( DbgUserBreakPoint, "int $3; ret" "\n\tnop; nop; nop; nop; nop; nop; nop; nop" "\n\tnop; nop; nop; nop; nop; nop" );
+#endif /* __arm64ec_x64__ */ #endif /* __x86_64__ */