diff --git a/include/SDL3/SDL_intrin.h b/include/SDL3/SDL_intrin.h index 914a4a3177..e054a5ed5d 100644 --- a/include/SDL3/SDL_intrin.h +++ b/include/SDL3/SDL_intrin.h @@ -88,7 +88,8 @@ /** * Defined if (and only if) the compiler supports ARM SVE2 intrinsics. * - * Even if this macro is defined, SDL will NOT included `` globally. + * If this macro is defined, SDL will only included `` when + * the compiler defines __ARM_FEATURE_SVE. * * \since This macro is available since SDL 3.6.0. */ @@ -286,18 +287,16 @@ _m_prefetch(void *__P) # define __ARM_FEATURE_SVE2 1 /* Set __ARM_FEATURE_SVE2 so that it can be used elsewhere, at compile time */ # define __ARM_FEATURE_SVE 1 /* Set __ARM_FEATURE_SVE so that it can be used elsewhere, at compile time */ # define __ARM_ARCH 8 +# include # endif # elif defined(SDL_PLATFORM_APPLE) /* Apple has no AArch64 device supporting SVE2 */ # elif defined(__ARM_ARCH) && (__ARM_ARCH >= 8) && (defined(__aarch64__) || defined(_M_ARM64)) && \ defined(__has_include) && __has_include() # define SDL_SVE2_INTRINSICS 1 -/* - * IMPORTANT: Please do NOT put #include here. Some versions of LLVM compilers provide arm_sve.h that - * raise error when failling in checking the existance of __ARM_FEATURE_SVE, while others are not. To - * improve the portability, we only include arm_sve.h in the source files that are dedicated to SVE - * accelerations. - */ +# if defined(__ARM_FEATURE_SVE) +# include +# endif # endif #endif #endif /* compiler version */