tls-macros-alpha.h 922 B

12345678910111213141516171819202122232425
  1. register void *__gp __asm__("$29");
  2. # define TLS_LE(x) \
  3. ({ int *__l; \
  4. __asm__ ("call_pal 158\n\tlda $0," #x "($0)\t\t!tprel" : "=v"(__l)); \
  5. __l; })
  6. # define TLS_IE(x) \
  7. ({ char *__tp; unsigned long __o; \
  8. __asm__ ("call_pal 158\n\tldq %1," #x "($gp)\t\t!gottprel" \
  9. : "=v"(__tp), "=r"(__o) : "r"(__gp)); \
  10. (int *)(__tp + __o); })
  11. # define TLS_LD(x) \
  12. ({ extern void *__tls_get_addr(void *); int *__l; void *__i; \
  13. __asm__ ("lda %0," #x "($gp)\t\t!tlsldm" : "=r" (__i) : "r"(__gp)); \
  14. __i = __tls_get_addr(__i); \
  15. __asm__ ("lda %0, " #x "(%1)\t\t!dtprel" : "=r"(__l) : "r"(__i)); \
  16. __l; })
  17. # define TLS_GD(x) \
  18. ({ extern void *__tls_get_addr(void *); void *__i; \
  19. __asm__ ("lda %0," #x "($gp)\t\t!tlsgd" : "=r" (__i) : "r"(__gp)); \
  20. (int *) __tls_get_addr(__i); })