=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ntdll: Set TPIDRURW inline on ARM.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 17 10:18:10 CDT 2015


Module: wine
Branch: master
Commit: 113329526717eb71b913fdfa8ca9cc702918b6a4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=113329526717eb71b913fdfa8ca9cc702918b6a4

Author: André Hentschel <nerv at dawncrow.de>
Date:   Tue Jun 16 22:10:43 2015 +0200

ntdll: Set TPIDRURW inline on ARM.

---

 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 );
 }
 




More information about the wine-cvs mailing list