Commit 5b384245 authored by Martin Storsjo's avatar Martin Storsjo Committed by Alexandre Julliard

include: Update ARM64 context flag definitions to match current SDKs.

CONTEXT_FLOATING_POINT should be included in CONTEXT_FULL, and there's a new flag CONTEXT_ARM64_X18 (not available without the arch specific prefix) that only is part of CONTEXT_ALL. Signed-off-by: 's avatarMartin Storsjo <martin@martin.st> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent af685327
...@@ -97,7 +97,7 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 8, ...@@ -97,7 +97,7 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 8,
"mov x1, sp\n\t" "mov x1, sp\n\t"
"stp x1, x30, [x0, #0x100]\n\t" /* context->Sp,Pc */ "stp x1, x30, [x0, #0x100]\n\t" /* context->Sp,Pc */
"mov w1, #0x400000\n\t" /* CONTEXT_ARM64 */ "mov w1, #0x400000\n\t" /* CONTEXT_ARM64 */
"add w1, w1, #0x3\n\t" /* CONTEXT_FULL */ "movk w1, #0x7\n\t" /* CONTEXT_FULL */
"str w1, [x0]\n\t" /* context->ContextFlags */ "str w1, [x0]\n\t" /* context->ContextFlags */
"mrs x1, NZCV\n\t" "mrs x1, NZCV\n\t"
"str w1, [x0, #0x4]\n\t" /* context->Cpsr */ "str w1, [x0, #0x4]\n\t" /* context->Cpsr */
......
...@@ -311,7 +311,8 @@ static void save_context( CONTEXT *context, const ucontext_t *sigcontext ) ...@@ -311,7 +311,8 @@ static void save_context( CONTEXT *context, const ucontext_t *sigcontext )
{ {
DWORD i; DWORD i;
context->ContextFlags = CONTEXT_FULL; context->ContextFlags = (CONTEXT_FULL & ~CONTEXT_FLOATING_POINT) |
CONTEXT_ARM64;
context->u.s.Fp = FP_sig(sigcontext); /* Frame pointer */ context->u.s.Fp = FP_sig(sigcontext); /* Frame pointer */
context->u.s.Lr = LR_sig(sigcontext); /* Link register */ context->u.s.Lr = LR_sig(sigcontext); /* Link register */
context->Sp = SP_sig(sigcontext); /* Stack pointer */ context->Sp = SP_sig(sigcontext); /* Stack pointer */
...@@ -664,7 +665,7 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher, ...@@ -664,7 +665,7 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"csel x0, x19, x0, lo\n\t" "csel x0, x19, x0, lo\n\t"
"mov sp, x0\n\t" "mov sp, x0\n\t"
"mov w2, #0x400000\n\t" /* context.ContextFlags = CONTEXT_FULL */ "mov w2, #0x400000\n\t" /* context.ContextFlags = CONTEXT_FULL */
"movk w2, #3\n\t" "movk w2, #7\n\t"
"mov x1, x19\n\t" "mov x1, x19\n\t"
"str w2, [x19]\n\t" "str w2, [x19]\n\t"
"mov x0, #~1\n\t" "mov x0, #~1\n\t"
...@@ -1039,7 +1040,7 @@ PCONTEXT DECLSPEC_HIDDEN get_initial_context( LPTHREAD_START_ROUTINE entry, void ...@@ -1039,7 +1040,7 @@ PCONTEXT DECLSPEC_HIDDEN get_initial_context( LPTHREAD_START_ROUTINE entry, void
init_thread_context( ctx, entry, arg, relay ); init_thread_context( ctx, entry, arg, relay );
} }
pthread_sigmask( SIG_UNBLOCK, &server_block_set, NULL ); pthread_sigmask( SIG_UNBLOCK, &server_block_set, NULL );
ctx->ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT; ctx->ContextFlags = CONTEXT_FULL;
return ctx; return ctx;
} }
......
...@@ -1928,11 +1928,12 @@ NTSYSAPI PVOID WINAPI RtlVirtualUnwind(DWORD,DWORD,DWORD,RUNTIME_FUNCTION*,CONTE ...@@ -1928,11 +1928,12 @@ NTSYSAPI PVOID WINAPI RtlVirtualUnwind(DWORD,DWORD,DWORD,RUNTIME_FUNCTION*,CONTE
#define CONTEXT_INTEGER (CONTEXT_ARM64 | 0x00000002) #define CONTEXT_INTEGER (CONTEXT_ARM64 | 0x00000002)
#define CONTEXT_FLOATING_POINT (CONTEXT_ARM64 | 0x00000004) #define CONTEXT_FLOATING_POINT (CONTEXT_ARM64 | 0x00000004)
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM64 | 0x00000008) #define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM64 | 0x00000008)
#define CONTEXT_ARM64_X18 (CONTEXT_ARM64 | 0x00000010)
#define CONTEXT_UNWOUND_TO_CALL 0x20000000 #define CONTEXT_UNWOUND_TO_CALL 0x20000000
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) #define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_ARM64_X18)
#define EXCEPTION_READ_FAULT 0 #define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1 #define EXCEPTION_WRITE_FAULT 1
......
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