Use r2 instead of r13 for TLS, since r13 is used in the ELF32 PPC
ABI.
This commit is contained in:
parent
4d54db752c
commit
2456149860
|
@ -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
|
||||
|
|
|
@ -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__ */
|
||||
|
|
Loading…
Reference in New Issue