Commit df8d907f authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent de492f9a
......@@ -3303,7 +3303,6 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame,
{
const struct exception *except = *(const struct exception **)(dispatcher->HandlerData);
unsigned int i, parameter_count, entry = except - exceptions;
USHORT ds, es, fs, gs, ss;
got_exception++;
winetest_push_context( "%u: %lx", entry, rec->ExceptionCode );
......@@ -3317,6 +3316,9 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame,
(rec->ExceptionCode == STATUS_BREAKPOINT && rec->ExceptionAddress == (char*)context->Rip + 1),
"Unexpected exception address %p/%p\n", rec->ExceptionAddress, (char*)context->Rip );
#ifndef __arm64ec__
{
USHORT ds, es, fs, gs, ss;
__asm__ volatile( "movw %%ds,%0" : "=g" (ds) );
__asm__ volatile( "movw %%es,%0" : "=g" (es) );
__asm__ volatile( "movw %%fs,%0" : "=g" (fs) );
......@@ -3335,6 +3337,8 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame,
"gs %#x does not match ss %#x\n", context->SegGs, context->SegSs );
todo_wine ok( context->SegFs && context->SegFs != context->SegSs,
"got fs %#x\n", context->SegFs );
}
#endif
if (except->status == STATUS_BREAKPOINT && is_wow64)
parameter_count = 1;
......@@ -3604,7 +3608,6 @@ static void test_exceptions(void)
{
CONTEXT ctx;
NTSTATUS res;
USHORT ds, es, fs, gs, ss;
struct dbgreg_test dreg_test;
/* test handling of debug registers */
......@@ -3657,6 +3660,9 @@ static void test_exceptions(void)
/* test int3 handling */
run_exception_test(int3_handler, NULL, int3_code, sizeof(int3_code), 0);
#ifndef __arm64ec__
{
USHORT ds, es, fs, gs, ss;
/* test segment registers */
ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_SEGMENTS;
res = pNtGetContextThread( GetCurrentThread(), &ctx );
......@@ -3696,6 +3702,8 @@ static void test_exceptions(void)
ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs );
ok( ctx.SegFs != ctx.SegSs, "wrong fs %04x / %04x\n", ctx.SegFs, ctx.SegSs );
ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs );
}
#endif
}
static DWORD WINAPI simd_fault_handler( EXCEPTION_RECORD *rec, ULONG64 frame,
......@@ -4218,8 +4226,12 @@ static void test_debugger(DWORD cont_status, BOOL with_WaitForDebugEventEx)
}
else if (stage == STAGE_SEGMENTS)
{
#ifdef __arm64ec__
USHORT ss = 0x2b;
#else
USHORT ss;
__asm__( "movw %%ss,%0" : "=r" (ss) );
#endif
ok( ctx.SegSs == ss, "wrong ss %04x / %04x\n", ctx.SegSs, ss );
ok( ctx.SegDs == ctx.SegSs, "wrong ds %04x / %04x\n", ctx.SegDs, ctx.SegSs );
ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs );
......@@ -11519,6 +11531,7 @@ static void test_extended_context(void)
enabled_features = pRtlGetEnabledExtendedFeatures(~(ULONG64)0);
#ifndef __arm64ec__
if (enabled_features)
{
int regs[4];
......@@ -11527,6 +11540,7 @@ static void test_extended_context(void)
xsaveopt_enabled = regs[0] & 1;
compaction_enabled = regs[0] & 2;
}
#endif
/* Test context manipulation functions. */
length = 0xdeadbeef;
......
......@@ -125,7 +125,7 @@ static void test_NtQueryPerformanceCounter(void)
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", status);
}
#if defined(__i386__) || defined(__x86_64__)
#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arm64ec__)
struct hypervisor_shared_data
{
......@@ -494,7 +494,7 @@ START_TEST(time)
test_NtQueryPerformanceCounter();
test_RtlQueryTimeZoneInformation();
test_user_shared_data_time();
#if defined(__i386__) || defined(__x86_64__)
#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arm64ec__)
test_RtlQueryPerformanceCounter();
#endif
test_TimerResolution();
......
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