tls-macros.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* Macros to support TLS testing in times of missing compiler support. */
  2. #define COMMON_INT_DEF(x) \
  3. __asm__ (".tls_common " #x ",4,4")
  4. /* XXX Until we get compiler support we don't need declarations. */
  5. #define COMMON_INT_DECL(x)
  6. /* XXX This definition will probably be machine specific, too. */
  7. #define VAR_INT_DEF(x) \
  8. __asm__ (".section .tdata\n\t" \
  9. ".globl " #x "\n" \
  10. ".balign 4\n" \
  11. #x ":\t.long 0\n\t" \
  12. ".size " #x ",4\n\t" \
  13. ".previous")
  14. /* XXX Until we get compiler support we don't need declarations. */
  15. #define VAR_INT_DECL(x)
  16. #ifdef __alpha__
  17. #include <tls-macros-alpha.h>
  18. #endif
  19. #ifdef __arc__
  20. #include <tls-macros-arc.h>
  21. #endif
  22. #ifdef __arm__
  23. #ifdef __thumb__
  24. #include <tls-macros-thumb.h>
  25. #else
  26. #include <tls-macros-arm.h>
  27. #endif
  28. #endif
  29. #ifdef __i386__
  30. #include <tls-macros-i386.h>
  31. #endif
  32. #ifdef __ia64__
  33. #include <tls-macros-ia64.h>
  34. #endif
  35. #ifdef __metag__
  36. #include <tls-macros-metag.h>
  37. #endif
  38. #ifdef __microblaze__
  39. #include <tls-macros-microblaze.h>
  40. #endif
  41. #ifdef __mips__
  42. #include <tls-macros-mips.h>
  43. #endif
  44. #ifdef __powerpc__
  45. #include <tls-macros-powerpc.h>
  46. #endif
  47. #ifdef __sh__
  48. #include <tls-macros-sh.h>
  49. #endif
  50. #ifdef __sparc__
  51. #include <tls-macros-sparc.h>
  52. #endif
  53. #ifdef __x86_64__
  54. #include <tls-macros-x86_64.h>
  55. #endif
  56. #ifdef __xtensa__
  57. #include <tls-macros-xtensa.h>
  58. #endif
  59. #if !defined TLS_LE || !defined TLS_IE \
  60. || !defined TLS_LD || !defined TLS_GD
  61. # error "No support for this architecture so far."
  62. #endif