ntdll: Set TPIDRURW inline on ARM.

This commit is contained in:
André Hentschel 2015-06-16 22:10:43 +02:00 committed by Alexandre Julliard
parent aa139d3e86
commit 1133295267
1 changed files with 6 additions and 16 deletions

View File

@ -912,21 +912,6 @@ void signal_free_thread( TEB *teb )
NtFreeVirtualMemory( NtCurrentProcess(), (void **)&teb, &size, MEM_RELEASE );
}
/**********************************************************************
* set_tpidrurw
*
* Win32/ARM applications expect the TEB pointer to be in the TPIDRURW register.
*/
#ifdef __ARM_ARCH_7A__
extern void set_tpidrurw( TEB *teb );
__ASM_GLOBAL_FUNC( set_tpidrurw,
"mcr p15, 0, r0, c13, c0, 2\n\t" /* TEB -> TPIDRURW */
"bx lr" )
#else
void set_tpidrurw( TEB *teb )
{
}
#endif
/**********************************************************************
* signal_init_thread
@ -940,7 +925,12 @@ void signal_init_thread( TEB *teb )
pthread_key_create( &teb_key, NULL );
init_done = TRUE;
}
set_tpidrurw( teb );
#ifdef __ARM_ARCH_7A__
/* Win32/ARM applications expect the TEB pointer to be in the TPIDRURW register. */
__asm__ __volatile__( "mcr p15, 0, %0, c13, c0, 2" : : "r" (teb) );
#endif
pthread_setspecific( teb_key, teb );
}