Commit 11332952 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

ntdll: Set TPIDRURW inline on ARM.

parent aa139d3e
...@@ -912,21 +912,6 @@ void signal_free_thread( TEB *teb ) ...@@ -912,21 +912,6 @@ void signal_free_thread( TEB *teb )
NtFreeVirtualMemory( NtCurrentProcess(), (void **)&teb, &size, MEM_RELEASE ); 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 * signal_init_thread
...@@ -940,7 +925,12 @@ void signal_init_thread( TEB *teb ) ...@@ -940,7 +925,12 @@ void signal_init_thread( TEB *teb )
pthread_key_create( &teb_key, NULL ); pthread_key_create( &teb_key, NULL );
init_done = TRUE; 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 ); pthread_setspecific( teb_key, teb );
} }
......
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