Commit 220a70be authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Don't use x86-64 assembly on ARM64EC.

parent cbaa3d08
......@@ -304,7 +304,7 @@ __ASM_GLOBAL_FUNC(call_dll_entry_point,
__ASM_CFI(".cfi_def_cfa %esp,4\n\t")
__ASM_CFI(".cfi_same_value %ebp\n\t")
"ret" )
#elif defined(__x86_64__)
#elif defined(__x86_64__) && !defined(__arm64ec__)
extern BOOL CDECL call_dll_entry_point( DLLENTRYPROC proc, void *module, UINT reason, void *reserved );
/* Some apps modify rbx in TLS entry point. */
__ASM_GLOBAL_FUNC(call_dll_entry_point,
......@@ -379,7 +379,7 @@ struct stub
const char *name;
const void* entry;
};
#elif defined(__aarch64__)
#elif defined(__aarch64__) || defined(__arm64ec__)
struct stub
{
DWORD ldr_x0; /* ldr x0, $dll */
......@@ -443,7 +443,7 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name )
stub->dll = dll;
stub->name = name;
stub->entry = stub_entry_point;
#elif defined(__aarch64__)
#elif defined(__aarch64__) || defined(__arm64ec__)
stub->ldr_x0 = 0x580000a0; /* ldr x0, #20 ($dll) */
stub->ldr_x1 = 0x580000c1; /* ldr x1, #24 ($name) */
stub->mov_x2_lr = 0xaa1e03e2; /* mov x2, lr */
......
......@@ -249,7 +249,11 @@ NTSTATUS WINAPI RtlWow64GetThreadSelectorEntry( HANDLE handle, THREAD_DESCRIPTOR
if (RtlWow64GetThreadContext( handle, &context ))
{
/* hardcoded values */
#ifdef __x86_64__
#ifdef __arm64ec__
context.SegCs = 0x33;
context.SegSs = 0x2b;
context.SegFs = 0x53;
#elif defined(__x86_64__)
context.SegCs = 0x23;
__asm__( "movw %%fs,%0" : "=m" (context.SegFs) );
__asm__( "movw %%ss,%0" : "=m" (context.SegSs) );
......
......@@ -34,7 +34,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(relay);
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
#if (defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)) && !defined(__arm64ec__)
struct relay_descr /* descriptor for a module */
{
......
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