[3/3] ntdll: Set TPIDRURW inline on ARM
André Hentschel
nerv at dawncrow.de
Tue Jun 16 15:10:43 CDT 2015
---
dlls/ntdll/signal_arm.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c
index 6509046..1f6da96 100644
--- a/dlls/ntdll/signal_arm.c
+++ b/dlls/ntdll/signal_arm.c
@@ -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 );
}
--
1.9.1
More information about the wine-patches
mailing list