2020-08-25 02:23:08 +00:00
|
|
|
static inline uintptr_t __get_tp()
|
2016-05-01 00:18:17 +00:00
|
|
|
{
|
2020-08-25 02:23:08 +00:00
|
|
|
register uintptr_t tp __asm__("r13");
|
2018-10-16 18:08:01 +00:00
|
|
|
__asm__ ("" : "=r" (tp) );
|
2020-08-25 02:23:08 +00:00
|
|
|
return tp;
|
2016-05-01 00:18:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define TLS_ABOVE_TP
|
2018-06-01 23:52:01 +00:00
|
|
|
#define GAP_ABOVE_TP 0
|
2016-05-01 00:18:17 +00:00
|
|
|
|
2020-08-25 02:04:52 +00:00
|
|
|
#define TP_OFFSET 0x7000
|
2016-05-01 00:18:17 +00:00
|
|
|
#define DTP_OFFSET 0x8000
|
|
|
|
|
|
|
|
// the kernel calls the ip "nip", it's the first saved value after the 32
|
|
|
|
// GPRs.
|
|
|
|
#define MC_PC gp_regs[32]
|