1570af302Sopenharmony_cistatic inline uintptr_t __get_tp()
2570af302Sopenharmony_ci{
3570af302Sopenharmony_ci	uintptr_t tp;
4570af302Sopenharmony_ci	__asm__ ("stc gbr,%0" : "=r" (tp) );
5570af302Sopenharmony_ci	return tp;
6570af302Sopenharmony_ci}
7570af302Sopenharmony_ci
8570af302Sopenharmony_ci#define TLS_ABOVE_TP
9570af302Sopenharmony_ci#define GAP_ABOVE_TP 8
10570af302Sopenharmony_ci
11570af302Sopenharmony_ci#define MC_PC pc
12570af302Sopenharmony_ci
13570af302Sopenharmony_ci#ifdef __FDPIC__
14570af302Sopenharmony_ci#define MC_GOT gregs[12]
15570af302Sopenharmony_ci#define CANCEL_GOT (*(uintptr_t *)((char *)__syscall_cp_asm+sizeof(uintptr_t)))
16570af302Sopenharmony_ci#endif
17