abi.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef __CXXCALL_ABI_HPP__
  2. #define __CXXCALL_ABI_HPP__ 1
  3. #if defined (__i386) || defined (__i386__) || defined (_M_IX86)
  4. # define CXXCALL_I386
  5. #endif
  6. #if defined (__amd64) || defined (__amd64__) || \
  7. defined (__x86_64) || defined (__x86_64__) || \
  8. defined (_M_X64) || defined (_M_AMD64)
  9. # define CXXCALL_AMD64
  10. #endif
  11. #if defined (__arm__) || defined (__thumb__) || defined (_M_ARM)
  12. # define CXXCALL_ARM32
  13. #endif
  14. #if defined (__aarch64__) || defined (_M_ARM64)
  15. # define CXXCALL_ARM64
  16. #endif
  17. #if defined (__mips__) || defined (__mips)
  18. # define CXXCALL_MIPS
  19. # if _MIPS_SIM == _ABIN32
  20. # undef __mipsn32__
  21. # define __mipsn32__
  22. # endif
  23. # if defined (_MIPS_SZLONG) && _MIPS_SZLONG == 64
  24. # define CXXCALL_MIPS64
  25. # else
  26. # define CXXCALL_MIPS32
  27. # endif
  28. #endif // mips.
  29. #if defined (__powerpc) || defined (__ppc__) || defined (_ARCH_PPC)
  30. # define CXXCALL_PPC32
  31. #endif
  32. #if defined (__powerpc64__) || defined (__ppc64__)
  33. # define CXXCALL_PPC64
  34. #endif
  35. #if defined (__ILP32__) || defined (_ILP32)
  36. # define CXXCALL_ILP32
  37. #endif
  38. #if defined (CXXCALL_AMD64) || defined (CXXCALL_ARM64) || \
  39. defined (CXXCALL_MIPS64) || defined (CXXCALL_PPC64)
  40. # define CXXCALL_WIDE
  41. #endif
  42. #if defined (CXXCALL_ARM32) && !defined (__armhf__) && defined (__ARM_PCS_VFP)
  43. # define __armhf__
  44. #endif
  45. #endif