35#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
39#ifndef __PRFCHWINTRIN_H
40#define __PRFCHWINTRIN_H
41static __inline__ void __attribute__((__always_inline__, __nodebug__))
44 __builtin_prefetch (__P, 0, 3 );
50#elif defined(__MINGW64_VERSION_MAJOR)
52#if defined(__ARM_NEON) && !defined(SDL_DISABLE_NEON)
53# define SDL_NEON_INTRINSICS 1
59#if defined(__ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC)
60#define SDL_ALTIVEC_INTRINSICS 1
63#ifndef SDL_DISABLE_NEON
65# define SDL_NEON_INTRINSICS 1
67# elif defined(__WINDOWS__) || defined(__WINRT__) || defined(__GDK__)
70# define SDL_NEON_INTRINSICS 1
75# if defined (_M_ARM64)
76# define SDL_NEON_INTRINSICS 1
77# include <arm64intr.h>
78# include <arm64_neon.h>
86#if defined(__clang__) && defined(__has_attribute)
87# if __has_attribute(target)
88# define SDL_HAS_TARGET_ATTRIBS
90#elif defined(__GNUC__) && (__GNUC__ + (__GNUC_MINOR__ >= 9) > 4)
91# define SDL_HAS_TARGET_ATTRIBS
92#elif defined(__ICC) && __ICC >= 1600
93# define SDL_HAS_TARGET_ATTRIBS
96#ifdef SDL_HAS_TARGET_ATTRIBS
97# define SDL_TARGETING(x) __attribute__((target(x)))
99# define SDL_TARGETING(x)
103# ifndef SDL_DISABLE_LSX
104# define SDL_LSX_INTRINSICS 1
105# include <lsxintrin.h>
107# ifndef SDL_DISABLE_LASX
108# define SDL_LASX_INTRINSICS 1
109# include <lasxintrin.h>
113#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
114# if ((defined(_MSC_VER) && !defined(_M_X64)) || defined(__MMX__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_MMX)
115# define SDL_MMX_INTRINSICS 1
116# include <mmintrin.h>
118# if (defined(_MSC_VER) || defined(__SSE__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE)
119# define SDL_SSE_INTRINSICS 1
120# include <xmmintrin.h>
122# if (defined(_MSC_VER) || defined(__SSE2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE2)
123# define SDL_SSE2_INTRINSICS 1
124# include <emmintrin.h>
126# if (defined(_MSC_VER) || defined(__SSE3__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE3)
127# define SDL_SSE3_INTRINSICS 1
128# include <pmmintrin.h>
130# if (defined(_MSC_VER) || defined(__SSE4_1__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE4_1)
131# define SDL_SSE4_1_INTRINSICS 1
132# include <smmintrin.h>
134# if (defined(_MSC_VER) || defined(__SSE4_2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE4_2)
135# define SDL_SSE4_2_INTRINSICS 1
136# include <nmmintrin.h>
138# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX__) && !defined(SDL_DISABLE_AVX)
139# define SDL_DISABLE_AVX
141# if (defined(_MSC_VER) || defined(__AVX__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_AVX)
142# define SDL_AVX_INTRINSICS 1
143# include <immintrin.h>
145# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX2__) && !defined(SDL_DISABLE_AVX2)
146# define SDL_DISABLE_AVX2
148# if (defined(_MSC_VER) || defined(__AVX2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_AVX2)
149# define SDL_AVX2_INTRINSICS 1
150# include <immintrin.h>
152# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX512F__) && !defined(SDL_DISABLE_AVX512F)
153# define SDL_DISABLE_AVX512F
155# if (defined(_MSC_VER) || defined(__AVX512F__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_AVX512F)
156# define SDL_AVX512F_INTRINSICS 1
157# include <immintrin.h>
This is a general header that includes C language support.