From f54014e173c33dc0cca63a534b1b82b28b69d9bc Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 3 Apr 2025 18:55:04 +0300 Subject: [PATCH] SDL_cpuinfo.h: only include immintrin.h for x86 targets. Reference issue: https://github.com/libsdl-org/SDL_image/issues/537 Reference issue: https://github.com/libsdl-org/SDL_mixer/issues/648 (cherry picked from commit bfab0a968fd54250377f65232df5982e46ecc712) --- include/SDL_cpuinfo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/SDL_cpuinfo.h b/include/SDL_cpuinfo.h index f303112351..696a03bf7b 100644 --- a/include/SDL_cpuinfo.h +++ b/include/SDL_cpuinfo.h @@ -115,7 +115,8 @@ _m_prefetch(void *__P) #include #define __LASX__ #endif -#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) +#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) && \ + (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)) #include #else #if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)