abiname_xcompile.c 1.5 KB

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