diff --git a/include/winnt.h b/include/winnt.h index dd495a4c02d..7808dbff345 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2332,7 +2332,7 @@ extern inline struct _TEB * WINAPI NtCurrentTeb(void); extern inline struct _TEB * WINAPI NtCurrentTeb(void) { struct _TEB *teb; - __asm__("\tmr %0, 13" : "=r" (teb)); + __asm__("\tmr %0, 2" : "=r" (teb)); return teb; } #else diff --git a/scheduler/sysdeps.c b/scheduler/sysdeps.c index f00b4fd9f12..5101dd3a568 100644 --- a/scheduler/sysdeps.c +++ b/scheduler/sysdeps.c @@ -91,7 +91,7 @@ void SYSDEPS_SetCurThread( TEB *teb ) wine_set_fs( teb->teb_sel ); #elif defined(__powerpc__) /* On PowerPC, the current TEB is in the gpr13 register */ - __asm__ __volatile__("mr 13, %0" : : "r" (teb)); + __asm__ __volatile__("mr 2, %0" : : "r" (teb)); #elif defined(HAVE__LWP_CREATE) /* On non-i386 Solaris, we use the LWP private pointer */ _lwp_setprivate( teb ); @@ -343,7 +343,7 @@ struct _TEB * WINAPI NtCurrentTeb(void) return (struct _TEB *)_lwp_getprivate(); } #elif defined(__powerpc__) -__ASM_GLOBAL_FUNC( NtCurrentTeb, "\n\tmr 3,13\n\tblr" ); +__ASM_GLOBAL_FUNC( NtCurrentTeb, "\n\tmr 3,2\n\tblr" ); #else # error NtCurrentTeb not defined for this architecture #endif /* __i386__ */