AK: Add back ARCH(I386)

This now checks whether the platform is i386-based (but not x86_64).
This commit is contained in:
Sergey Bugaev 2023-09-03 20:44:26 +03:00 committed by Andrew Kaster
parent 35e3e3d483
commit 88a3b4da9e
Notes: sideshowbarker 2024-07-17 02:38:39 +09:00

View file

@ -17,6 +17,12 @@
# define AK_IS_ARCH_X86_64() 0
#endif
#if defined(__i386__) && !defined(__x86_64__)
# define AK_IS_ARCH_I386() 1
#else
# define AK_IS_ARCH_I386() 0
#endif
#ifdef __aarch64__
# define AK_IS_ARCH_AARCH64() 1
#else
@ -114,7 +120,7 @@
#define ARCH(arch) (AK_IS_ARCH_##arch())
#if ARCH(X86_64)
#if ARCH(X86_64) || ARCH(I386)
# define VALIDATE_IS_X86()
#else
# define VALIDATE_IS_X86() static_assert(false, "Trying to include x86 only header on non x86 platform");