abiname_xcompile.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #if defined(__amd64__) || defined(__x86_64__) || defined(__AMD64__) || defined(_M_X64) || defined(__amd64)
  2. #ifdef __AVX__
  3. #error ABI_IS_amd64_AVX__
  4. #else
  5. #error ABI_IS_amd64__
  6. #endif
  7. #elif defined(__i386__) || defined(__x86__) || defined(__X86__) || defined(_M_IX86) || defined(__i386)
  8. #if defined(__AVX__)
  9. #error ABI_IS_x86_AVX__
  10. #elif defined(__SSE2__)
  11. #error ABI_IS_x86_SSE2__
  12. #else
  13. #error ABI_IS_x86__
  14. #endif
  15. #elif defined(__ia64__) || defined(__IA64__) || defined(__M_IA64)
  16. #error ABI_IS_ia64__
  17. #elif defined(__SPU__)
  18. #error ABI_IS_cellspu__
  19. #elif defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || defined(_ARCH_PPC64)
  20. #error ABI_IS_ppc64__
  21. #elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) || defined(_ARCH_PPC)
  22. #error ABI_IS_ppc32__
  23. #elif defined(__s390x__)
  24. #error ABI_IS_s390x__
  25. #elif defined(__sparcv9__) || defined(__sparcv9)
  26. #error ABI_IS_sparcv9__
  27. #elif defined(__sparc_v8__)
  28. #error ABI_IS_sparcv8__
  29. #elif defined(__sparc__) || defined(__sparc)
  30. // if false then: error: zero width for bit-field ‘ABI_IS_sparcv9__’
  31. struct isItV9 { int ABI_IS_sparcv9__ : (sizeof(long) == 4); };
  32. struct isItV8 { int ABI_IS_sparcv8__ : (sizeof(long) != 4); };
  33. #elif defined(__aarch64__)
  34. #error ABI_IS_arm64__
  35. #elif defined(__ARM_EABI__)
  36. #if defined(__ARM_NEON__)
  37. #error ABI_IS_armeabi_neon__
  38. #else
  39. #error ABI_IS_armeabi__
  40. #endif
  41. #elif defined(__arm__)
  42. #error ABI_IS_arm__
  43. #elif defined(__mips__) || defined(__mips) || defined(__MIPS__)
  44. #if defined(_ABIO32)
  45. #if defined(_MIPS_ARCH_MIPS32R2)
  46. #error ABI_IS_mipso32_r2__
  47. #else
  48. #error ABI_IS_mipso32__
  49. #endif
  50. #elif defined(_ABIN32)
  51. #error ABI_IS_mips32__
  52. #else
  53. #error ABI_IS_mips64__
  54. #endif
  55. #else
  56. #error ABI_IS_default__
  57. #endif