deduplicate __pthread_self thread pointer adjustment out of each arch
[musl.git] / arch / s390x / pthread_arch.h
blobe54fec3fe64fa763ae5b0fbcae71ef62a953aa4f
1 static inline uintptr_t __get_tp()
3 uintptr_t tp;
4 __asm__ (
5 "ear %0, %%a0\n"
6 "sllg %0, %0, 32\n"
7 "ear %0, %%a1\n"
8 : "=r"(tp));
9 return tp;
12 #define MC_PC psw.addr