X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=inline;f=arch%2Fpowerpc%2Fpthread_arch.h;h=4115ec8c2357840af373a7aa1098a7e1fac1e61a;hb=63caf1d207d143fe405bbe0cda9aac8deca1171a;hp=cb2a70b83b7696ae97e992d8d98a687bd3c9b133;hpb=c6d441e3a246370d9c459396ec22b096db93850e;p=musl diff --git a/arch/powerpc/pthread_arch.h b/arch/powerpc/pthread_arch.h index cb2a70b8..4115ec8c 100644 --- a/arch/powerpc/pthread_arch.h +++ b/arch/powerpc/pthread_arch.h @@ -1,6 +1,11 @@ static inline struct pthread *__pthread_self() { - register char* tp __asm__("r2"); +#ifdef __clang__ + char *tp; + __asm__ __volatile__ ("mr %0, 2" : "=r"(tp) : : ); +#else + register char *tp __asm__("r2"); +#endif return (pthread_t)(tp - 0x7000 - sizeof(struct pthread)); } @@ -12,3 +17,4 @@ static inline struct pthread *__pthread_self() // GPRs. #define CANCEL_REG_IP 32 +#define CANARY canary_at_end