musl/arch/s390x/pthread_arch.h

13 lines
178 B
C
Raw Permalink Normal View History

static inline uintptr_t __get_tp()
2016-11-12 03:52:05 +00:00
{
uintptr_t tp;
__asm__ (
2016-11-12 03:52:05 +00:00
"ear %0, %%a0\n"
"sllg %0, %0, 32\n"
"ear %0, %%a1\n"
: "=r"(tp));
return tp;
2016-11-12 03:52:05 +00:00
}
#define MC_PC psw.addr