Commit 2a5191a7 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use a separate function pointer for the TEB hack on ARM64.

parent d3a68e43
......@@ -1696,6 +1696,7 @@
@ stdcall __wine_ctrl_routine(ptr)
@ extern __wine_syscall_dispatcher
@ extern -arch=i386 __wine_ldt_copy
@ extern -arch=arm64 __wine_current_teb
# Debugging
@ stdcall -syscall -norelay __wine_dbg_write(ptr long)
......
......@@ -40,6 +40,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(seh);
WINE_DECLARE_DEBUG_CHANNEL(threadname);
TEB * (* WINAPI __wine_current_teb)(void) = NULL;
typedef struct _SCOPE_TABLE
{
ULONG Count;
......@@ -1528,7 +1530,7 @@ __ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "brk #0xf000; ret"
*/
TEB * WINAPI NtCurrentTeb(void)
{
return unix_funcs->NtCurrentTeb();
return __wine_current_teb();
}
#endif /* __aarch64__ */
......@@ -1071,6 +1071,13 @@ static void load_ntdll_functions( HMODULE module )
*p__wine_ldt_copy = &__wine_ldt_copy;
}
#endif
#ifdef __aarch64__
{
void **p__wine_current_teb;
GET_FUNC( __wine_current_teb );
*p__wine_current_teb = NtCurrentTeb;
}
#endif
#undef GET_FUNC
}
......@@ -2149,9 +2156,6 @@ static struct unix_funcs unix_funcs =
init_builtin_dll,
unwind_builtin_dll,
RtlGetSystemTimePrecise,
#ifdef __aarch64__
NtCurrentTeb,
#endif
};
......
......@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 134
#define NTDLL_UNIXLIB_VERSION 135
struct unix_funcs
{
......@@ -37,9 +37,6 @@ struct unix_funcs
CONTEXT *context );
/* other Win32 API functions */
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
#ifdef __aarch64__
TEB * (WINAPI *NtCurrentTeb)(void);
#endif
};
#endif /* __NTDLL_UNIXLIB_H */
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