abiname_xcompile.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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(__sparcv9__) || defined(__sparcv9)
  24. #error ABI_IS_sparcv9__
  25. #elif defined(__sparc_v8__)
  26. #error ABI_IS_sparcv8__
  27. #elif defined(__sparc__) || defined(__sparc)
  28. // if false then: error: zero width for bit-field ‘ABI_IS_sparcv9__’
  29. struct isItV9 { int ABI_IS_sparcv9__ : (sizeof(long) == 4); };
  30. struct isItV8 { int ABI_IS_sparcv8__ : (sizeof(long) != 4); };
  31. #elif defined(__aarch64__)
  32. #error ABI_IS_arm64__
  33. #elif defined(__ARM_EABI__)
  34. #if defined(__ARM_NEON__)
  35. #error ABI_IS_armeabi_neon__
  36. #else
  37. #error ABI_IS_armeabi__
  38. #endif
  39. #elif defined(__arm__)
  40. #error ABI_IS_arm__
  41. #elif defined(__mips__) || defined(__mips) || defined(__MIPS__)
  42. #if defined(_ABIO32)
  43. #if defined(_MIPS_ARCH_MIPS32R2)
  44. #error ABI_IS_mipso32_r2__
  45. #else
  46. #error ABI_IS_mipso32__
  47. #endif
  48. #elif defined(_ABIN32)
  49. #error ABI_IS_mips32__
  50. #else
  51. #error ABI_IS_mips64__
  52. #endif
  53. #else
  54. #error ABI_IS_default__
  55. #endif