Mac OS X : TEB Support
Pierre d'Herbemont
stegefin at free.fr
Sun Jul 13 13:38:33 CDT 2003
Hey!
This patch add support for the TEB onto Mac OS X which should be in r13.
Cheers,
Pierre
ChangeLog:
- Add Teb Support for Mac OS X
-------------- next part --------------
Index: dlls/ntdll/sysdeps.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/sysdeps.c,v
retrieving revision 1.2
diff -u -r1.2 sysdeps.c
--- dlls/ntdll/sysdeps.c 3 Jul 2003 18:12:38 -0000 1.2
+++ dlls/ntdll/sysdeps.c 13 Jul 2003 18:36:34 -0000
@@ -90,7 +90,11 @@
wine_ldt_init_fs( teb->teb_sel, &fs_entry );
#elif defined(__powerpc__)
/* On PowerPC, the current TEB is in the gpr13 register */
+# ifdef __APPLE__
+ __asm__ __volatile__("mr r13, %0" : : "r" (teb));
+# else
__asm__ __volatile__("mr 2, %0" : : "r" (teb));
+# endif
#elif defined(HAVE__LWP_CREATE)
/* On non-i386 Solaris, we use the LWP private pointer */
_lwp_setprivate( teb );
@@ -437,7 +441,11 @@
return (struct _TEB *)_lwp_getprivate();
}
#elif defined(__powerpc__)
+# ifdef __APPLE__
+__ASM_GLOBAL_FUNC( NtCurrentTeb, "\n\tmr r3,r13\n\tblr" );
+# else
__ASM_GLOBAL_FUNC( NtCurrentTeb, "\n\tmr 3,2\n\tblr" );
+# endif
#else
# error NtCurrentTeb not defined for this architecture
#endif /* __i386__ */
More information about the wine-patches
mailing list