Skip to content
Snippets Groups Projects
Commit 419e4d69 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

wow64: In system calls always return the status from Wow64SystemServiceEx.

parent 972a1192
Branches
Tags
No related merge requests found
......@@ -143,6 +143,19 @@ static EXCEPTION_RECORD *exception_record_32to64( const EXCEPTION_RECORD32 *rec3
}
static NTSTATUS get_context_return_value( void *wow_context )
{
switch (current_machine)
{
case IMAGE_FILE_MACHINE_I386:
return ((I386_CONTEXT *)wow_context)->Eax;
case IMAGE_FILE_MACHINE_ARMNT:
return ((ARM_CONTEXT *)wow_context)->R0;
}
return 0;
}
/**********************************************************************
* call_user_exception_dispatcher
*/
......@@ -400,9 +413,11 @@ NTSTATUS WINAPI wow64_NtContinue( UINT *args )
void *context = get_ptr( &args );
BOOLEAN alertable = get_ulong( &args );
NTSTATUS status = get_context_return_value( context );
pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, context );
if (alertable) NtTestAlert();
return STATUS_SUCCESS;
return status;
}
......
......@@ -192,6 +192,7 @@ __ASM_GLOBAL_FUNC( syscall_32to64,
"movq %rax,%rcx\n\t" /* syscall number */
"leaq 8(%r14),%rdx\n\t" /* parameters */
"call " __ASM_NAME("Wow64SystemServiceEx") "\n\t"
"movl %eax,0xb0(%r13)\n\t" /* context->Eax */
"syscall_32to64_return:\n\t"
"movl 0x9c(%r13),%edi\n\t" /* context->Edi */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment