Commit 4ef8e946 authored by Alexandre Julliard's avatar Alexandre Julliard

winebuild: Set Thumb bit in CPSR register on syscall entry.

parent 7905c316
......@@ -4233,7 +4233,8 @@ static void test_thread_context(void)
COMPARE( R9 );
COMPARE( R10 );
COMPARE( R11 );
COMPARE( Cpsr );
ok( (context.Cpsr & 0xff0f0000) == (expect.Cpsr & 0xff0f0000),
"wrong Cpsr %08x/%08x\n", context.Cpsr, expect.Cpsr );
ok( context.Sp == expect.Sp - 8,
"wrong Sp %08x/%08x\n", context.Sp, expect.Sp - 8 );
/* Pc is somewhere close to the NtGetContextThread implementation */
......
......@@ -1611,6 +1611,7 @@ static void output_syscall_dispatcher( int count, const char *variant )
output( "\tmrc p15, 0, r7, c13, c0, 2\n" ); /* NtCurrentTeb() */
output( "\tadd r7, #0x1d8\n" ); /* arm_thread_data()->syscall_frame */
output( "\tmrs ip, CPSR\n" );
output( "\tbfi ip, lr, #5, #1\n" ); /* set thumb bit */
output( "\tstr ip, [sp, #4]\n" );
output( "\tstr sp, [r7]\n" ); /* syscall frame */
output( "\tldr r5, 6f+4\n");
......
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