77b7330dacfd1445d4635d64bb0c6ece1a87897c
[musl] / arch / mips / pthread_arch.h
1 static inline struct pthread *__pthread_self()
2 {
3         struct pthread *self;
4 #ifdef __clang__
5         __asm__ __volatile__ (".word 0x7c03e83b ; move %0, $3" : "=r" (self) : : "$3" );
6 #else
7         __asm__ __volatile__ (".word 0x7c03e83b" : "=v" (self) );
8 #endif
9         return self;
10 }
11
12 #define CANCEL_REG_IP (3-(union {int __i; char __b;}){1}.__b)