1
0

pthread_arch.h 325 B

12345678910111213141516
  1. static inline uintptr_t __get_tp()
  2. {
  3. register uintptr_t tp __asm__("r13");
  4. __asm__ ("" : "=r" (tp) );
  5. return tp;
  6. }
  7. #define TLS_ABOVE_TP
  8. #define GAP_ABOVE_TP 0
  9. #define TP_OFFSET 0x7000
  10. #define DTP_OFFSET 0x8000
  11. // the kernel calls the ip "nip", it's the first saved value after the 32
  12. // GPRs.
  13. #define MC_PC gp_regs[32]