projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add .text section directive to all crt_arch.h files missing it
[musl]
/
arch
/
powerpc
/
pthread_arch.h
diff --git
a/arch/powerpc/pthread_arch.h
b/arch/powerpc/pthread_arch.h
index
cb2a70b
..
4115ec8
100644
(file)
--- a/
arch/powerpc/pthread_arch.h
+++ b/
arch/powerpc/pthread_arch.h
@@
-1,6
+1,11
@@
static inline struct pthread *__pthread_self()
{
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));
}
return (pthread_t)(tp - 0x7000 - sizeof(struct pthread));
}
@@
-12,3
+17,4
@@
static inline struct pthread *__pthread_self()
// GPRs.
#define CANCEL_REG_IP 32
// GPRs.
#define CANCEL_REG_IP 32
+#define CANARY canary_at_end