From 88a3b4da9e20c4a86cf6fbefb21e8a070d0731c9 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sun, 3 Sep 2023 20:44:26 +0300 Subject: [PATCH] AK: Add back ARCH(I386) This now checks whether the platform is i386-based (but not x86_64). --- AK/Platform.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AK/Platform.h b/AK/Platform.h index 0de3cfe8fdf..ae24859d7ac 100644 --- a/AK/Platform.h +++ b/AK/Platform.h @@ -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");