ntdll: Add implementation for RtlCaptureContext on ARM.

This commit is contained in:
André Hentschel 2011-04-15 19:32:55 +02:00 committed by Alexandre Julliard
parent 4055b7f2c3
commit c8c5b6e08f
1 changed files with 11 additions and 5 deletions

View File

@ -160,11 +160,17 @@ static inline void restore_fpu( CONTEXT *context, const ucontext_t *sigcontext )
/***********************************************************************
* RtlCaptureContext (NTDLL.@)
*/
void WINAPI RtlCaptureContext( CONTEXT *context )
{
FIXME("not implemented\n");
memset( context, 0, sizeof(*context) );
}
/* FIXME: Use the Stack instead of the actual register values */
__ASM_STDCALL_FUNC( RtlCaptureContext, 4,
"stmfd SP!, {r1}\n\t"
"mov r1, #0x40\n\t" /* CONTEXT_ARM */
"add r1, r1, #0x3\n\t" /* CONTEXT_FULL */
"str r1, [r0]\n\t" /* context->ContextFlags */
"ldmfd SP!, {r1}\n\t"
"stmib r0, {r0-pc}\n\t" /* Push registers to pointer */
"mrs r1, CPSR\n\t"
"stmib r0, {r1}\n\t" /* context->Cpsr */
)
/***********************************************************************