tls-macros.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 __m68k__
  36. #include <tls-macros-m68k.h>
  37. #endif
  38. #ifdef __metag__
  39. #include <tls-macros-metag.h>
  40. #endif
  41. #ifdef __microblaze__
  42. #include <tls-macros-microblaze.h>
  43. #endif
  44. #ifdef __mips__
  45. #include <tls-macros-mips.h>
  46. #endif
  47. #ifdef __powerpc__
  48. #include <tls-macros-powerpc.h>
  49. #endif
  50. #ifdef __sh__
  51. #include <tls-macros-sh.h>
  52. #endif
  53. #ifdef __sparc__
  54. #include <tls-macros-sparc.h>
  55. #endif
  56. #ifdef __x86_64__
  57. #include <tls-macros-x86_64.h>
  58. #endif
  59. #ifdef __xtensa__
  60. #include <tls-macros-xtensa.h>
  61. #endif
  62. #if !defined TLS_LE || !defined TLS_IE \
  63. || !defined TLS_LD || !defined TLS_GD
  64. # error "No support for this architecture so far."
  65. #endif