winebuild: Set Thumb bit in CPSR register on syscall entry.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7905c31642
commit
4ef8e946f1
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue