tls-macros.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 __aarch64__
  17. #include <tls-macros-aarch64.h>
  18. #endif
  19. #ifdef __alpha__
  20. #include <tls-macros-alpha.h>
  21. #endif
  22. #if defined(__arc__) || defined(__ARC64_ARCH32__)
  23. #include <tls-macros-arc.h>
  24. #endif
  25. #ifdef __arm__
  26. #ifdef __thumb__
  27. #include <tls-macros-thumb.h>
  28. #else
  29. #include <tls-macros-arm.h>
  30. #endif
  31. #endif
  32. #ifdef __csky__
  33. #include <tls-macros-csky.h>
  34. #endif
  35. #ifdef __i386__
  36. #include <tls-macros-i386.h>
  37. #endif
  38. #ifdef __ia64__
  39. #include <tls-macros-ia64.h>
  40. #endif
  41. #ifdef __m68k__
  42. #include <tls-macros-m68k.h>
  43. #endif
  44. #ifdef __metag__
  45. #include <tls-macros-metag.h>
  46. #endif
  47. #ifdef __microblaze__
  48. #include <tls-macros-microblaze.h>
  49. #endif
  50. #ifdef __mips__
  51. #include <tls-macros-mips.h>
  52. #endif
  53. #ifdef __nios2__
  54. #include <tls-macros-nios2.h>
  55. #endif
  56. #if defined(__powerpc__) && !defined(__powerpc64__)
  57. #include <tls-macros-powerpc.h>
  58. #endif
  59. #if defined(__powerpc__) && defined(__powerpc64__)
  60. #include <tls-macros-powerpc64.h>
  61. #endif
  62. #ifdef __riscv
  63. #include <tls-macros-riscv.h>
  64. #endif
  65. #ifdef __sh__
  66. #include <tls-macros-sh.h>
  67. #endif
  68. #ifdef __sparc__
  69. #include <tls-macros-sparc.h>
  70. #endif
  71. #ifdef __x86_64__
  72. #include <tls-macros-x86_64.h>
  73. #endif
  74. #ifdef __xtensa__
  75. #include <tls-macros-xtensa.h>
  76. #endif
  77. #ifdef __or1k__
  78. #include <tls-macros-or1k.h>
  79. #endif
  80. #if !defined TLS_LE || !defined TLS_IE \
  81. || !defined TLS_LD || !defined TLS_GD
  82. # error "No support for this architecture so far."
  83. #endif