Go to the documentation of this file.
22 #include "SDL_config.h"
24 #include "../SDL_internal.h"
27 #if defined(__WIN32__) || defined(__WINRT__)
28 #include "../core/windows/SDL_windows.h"
33 #ifndef QSV_NUMPROCESSORS
34 #define QSV_NUMPROCESSORS 26
46 #ifdef HAVE_SYSCTLBYNAME
47 #include <sys/types.h>
48 #include <sys/sysctl.h>
50 #if defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))
51 #include <sys/sysctl.h>
52 #elif defined(__OpenBSD__) && defined(__powerpc__)
53 #include <sys/param.h>
54 #include <sys/sysctl.h>
55 #include <machine/cpu.h>
56 #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
61 #if defined(__QNXNTO__)
62 #include <sys/syspage.h>
65 #if (defined(__LINUX__) || defined(__ANDROID__)) && defined(__ARM_ARCH)
71 #define AT_PLATFORM 15
78 #define HWCAP_NEON (1 << 12)
80 #if defined HAVE_GETAUXVAL
87 #if defined(__ANDROID__) && defined(__ARM_ARCH) && !defined(HAVE_GETAUXVAL)
89 #include <cpu-features.h>
98 #define CPU_HAS_RDTSC (1 << 0)
99 #define CPU_HAS_ALTIVEC (1 << 1)
100 #define CPU_HAS_MMX (1 << 2)
101 #define CPU_HAS_3DNOW (1 << 3)
102 #define CPU_HAS_SSE (1 << 4)
103 #define CPU_HAS_SSE2 (1 << 5)
104 #define CPU_HAS_SSE3 (1 << 6)
105 #define CPU_HAS_SSE41 (1 << 7)
106 #define CPU_HAS_SSE42 (1 << 8)
107 #define CPU_HAS_AVX (1 << 9)
108 #define CPU_HAS_AVX2 (1 << 10)
109 #define CPU_HAS_NEON (1 << 11)
110 #define CPU_HAS_AVX512F (1 << 12)
111 #define CPU_HAS_ARM_SIMD (1 << 13)
113 #if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__ && !__OpenBSD__
117 static jmp_buf jmpbuf;
119 illegal_instruction(
int sig)
131 #ifndef SDL_CPUINFO_DISABLED
132 #if defined(__GNUC__) && defined(i386)
134 " pushfl # Get original EFLAGS \n"
136 " movl %%eax,%%ecx \n"
137 " xorl $0x200000,%%eax # Flip ID bit in EFLAGS \n"
138 " pushl %%eax # Save new EFLAGS value on stack \n"
139 " popfl # Replace current EFLAGS value \n"
140 " pushfl # Get new EFLAGS \n"
141 " popl %%eax # Store new EFLAGS in EAX \n"
142 " xorl %%ecx,%%eax # Can not toggle ID bit, \n"
143 " jz 1f # Processor=80486 \n"
144 " movl $1,%0 # We have CPUID support \n"
150 #elif defined(__GNUC__) && defined(__x86_64__)
154 " pushfq # Get original EFLAGS \n"
156 " movq %%rax,%%rcx \n"
157 " xorl $0x200000,%%eax # Flip ID bit in EFLAGS \n"
158 " pushq %%rax # Save new EFLAGS value on stack \n"
159 " popfq # Replace current EFLAGS value \n"
160 " pushfq # Get new EFLAGS \n"
161 " popq %%rax # Store new EFLAGS in EAX \n"
162 " xorl %%ecx,%%eax # Can not toggle ID bit, \n"
163 " jz 1f # Processor=80486 \n"
164 " movl $1,%0 # We have CPUID support \n"
170 #elif (defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)
172 pushfd ; Get original EFLAGS
175 xor eax, 200000
h ; Flip ID bit
in EFLAGS
176 push eax ; Save
new EFLAGS
value on stack
177 popfd ; Replace current EFLAGS
value
178 pushfd ; Get
new EFLAGS
179 pop eax ; Store
new EFLAGS
in EAX
180 xor eax, ecx ; Can not toggle ID bit,
181 jz
done ; Processor=80486
182 mov has_CPUID,1 ; We have CPUID support
185 #elif defined(_MSC_VER) && defined(_M_X64)
187 #elif defined(__sun) && defined(__i386)
192 " xorl $0x200000,%eax \n"
199 " movl $1,-8(%ebp) \n"
202 #elif defined(__sun) && defined(__amd64)
207 " xorl $0x200000,%eax \n"
214 " movl $1,-8(%rbp) \n"
223 #if defined(__GNUC__) && defined(i386)
224 #define cpuid(func, a, b, c, d) \
225 __asm__ __volatile__ ( \
227 " xorl %%ecx,%%ecx \n" \
229 " movl %%ebx, %%esi \n" \
231 "=a" (a), "=S" (b), "=c" (c), "=d" (d) : "a" (func))
232 #elif defined(__GNUC__) && defined(__x86_64__)
233 #define cpuid(func, a, b, c, d) \
234 __asm__ __volatile__ ( \
236 " xorq %%rcx,%%rcx \n" \
238 " movq %%rbx, %%rsi \n" \
240 "=a" (a), "=S" (b), "=c" (c), "=d" (d) : "a" (func))
241 #elif (defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)
242 #define cpuid(func, a, b, c, d) \
244 __asm mov eax, func \
252 #elif defined(_MSC_VER) && defined(_M_X64)
253 #define cpuid(func, a, b, c, d) \
256 __cpuid(CPUInfo, func); \
263 #define cpuid(func, a, b, c, d) \
264 do { a = b = c = d = 0; (void) a; (void) b; (void) c; (void) d; } while (0)
290 if (
c & 0x08000000) {
292 #if defined(__GNUC__) && (defined(i386) || defined(__x86_64__))
293 __asm__(
".byte 0x0f, 0x01, 0xd0" :
"=a" (
a) :
"c" (0) :
"%edx");
294 #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) && (_MSC_FULL_VER >= 160040219)
296 #elif (defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)
300 _asm _emit 0x0f _asm _emit 0x01 _asm _emit 0xd0
315 volatile int altivec = 0;
316 #ifndef SDL_CPUINFO_DISABLED
317 #if (defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))) || (defined(__OpenBSD__) && defined(__powerpc__))
319 int selectors[2] = { CTL_MACHDEP, CPU_ALTIVEC };
321 int selectors[2] = { CTL_HW, HW_VECTORUNIT };
323 int hasVectorUnit = 0;
324 size_t length =
sizeof(hasVectorUnit);
325 int error = sysctl(selectors, 2, &hasVectorUnit, &
length,
NULL, 0);
327 altivec = (hasVectorUnit != 0);
328 #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
329 void (*handler) (
int sig);
330 handler = signal(SIGILL, illegal_instruction);
331 if (setjmp(jmpbuf) == 0) {
332 asm volatile (
"mtspr 256, %0\n\t" "vand %%v0, %%v0, %%v0"::
"r" (-1));
335 signal(SIGILL, handler);
341 #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6)
348 #elif !defined(__arm__)
355 #elif defined(__LINUX__)
357 #include <sys/types.h>
358 #include <sys/stat.h>
368 fd = open(
"/proc/self/auxv", O_RDONLY);
372 while (read(
fd, &aux,
sizeof aux) ==
sizeof aux)
374 if (aux.a_type == AT_PLATFORM)
376 const char *plat = (
const char *) aux.a_un.a_val;
378 arm_simd = strncmp(plat,
"v6l", 3) == 0 ||
379 strncmp(plat,
"v7l", 3) == 0;
388 #elif defined(__RISCOS__)
393 _kernel_swi_regs regs;
395 if (_kernel_swi(OS_PlatformFeatures, ®s, ®s) !=
NULL)
398 if (!(regs.r[0] & (1<<31)))
403 if (_kernel_swi(OS_PlatformFeatures, ®s, ®s) !=
NULL)
413 #warning SDL_HasARMSIMD is not implemented for this ARM platform. Write me.
418 #if defined(__LINUX__) && defined(__ARM_ARCH) && !defined(HAVE_GETAUXVAL)
420 readProcAuxvForNeon(
void)
424 const int fd = open(
"/proc/self/auxv", O_RDONLY);
426 while (read(
fd, kv,
sizeof (kv)) ==
sizeof (kv)) {
427 if (kv[0] == AT_HWCAP) {
428 neon = ((kv[1] & HWCAP_NEON) == HWCAP_NEON);
443 #if defined(SDL_CPUINFO_DISABLED)
445 #elif (defined(__WINDOWS__) || defined(__WINRT__)) && (defined(_M_ARM) || defined(_M_ARM64))
448 # if !defined(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE)
449 # define PF_ARM_NEON_INSTRUCTIONS_AVAILABLE 19
452 return IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) != 0;
453 #elif defined(__ARM_ARCH) && (__ARM_ARCH >= 8)
455 #elif defined(__APPLE__) && defined(__ARM_ARCH) && (__ARM_ARCH >= 7)
458 #elif defined(__APPLE__)
460 #elif !defined(__arm__)
462 #elif defined(__QNXNTO__)
463 return SYSPAGE_ENTRY(cpuinfo)->flags & ARM_CPU_FLAG_NEON;
464 #elif (defined(__LINUX__) || defined(__ANDROID__)) && defined(HAVE_GETAUXVAL)
465 return ((getauxval(AT_HWCAP) & HWCAP_NEON) == HWCAP_NEON);
466 #elif defined(__LINUX__)
467 return readProcAuxvForNeon();
468 #elif defined(__ANDROID__)
471 AndroidCpuFamily cpu_family = android_getCpuFamily();
472 if (cpu_family == ANDROID_CPU_FAMILY_ARM) {
473 uint64_t cpu_features = android_getCpuFeatures();
474 if ((cpu_features & ANDROID_CPU_ARM_FEATURE_NEON) != 0) {
480 #elif defined(__RISCOS__)
483 _kernel_swi_regs regs;
485 if (_kernel_swi(VFPSupport_Features, ®s, ®s) ==
NULL) {
486 if ((regs.r[2] & 0xFFF000) == 0x111000) {
493 #warning SDL_HasNEON is not implemented for this ARM platform. Write me.
504 if (
a >= 0x80000001) {
506 return (
d & 0x80000000);
512 #define CPU_haveRDTSC() (CPU_CPUIDFeatures[3] & 0x00000010)
513 #define CPU_haveMMX() (CPU_CPUIDFeatures[3] & 0x00800000)
514 #define CPU_haveSSE() (CPU_CPUIDFeatures[3] & 0x02000000)
515 #define CPU_haveSSE2() (CPU_CPUIDFeatures[3] & 0x04000000)
516 #define CPU_haveSSE3() (CPU_CPUIDFeatures[2] & 0x00000001)
517 #define CPU_haveSSE41() (CPU_CPUIDFeatures[2] & 0x00080000)
518 #define CPU_haveSSE42() (CPU_CPUIDFeatures[2] & 0x00100000)
519 #define CPU_haveAVX() (CPU_OSSavesYMM && (CPU_CPUIDFeatures[2] & 0x10000000))
528 return (
b & 0x00000020);
540 return (
b & 0x00010000);
551 #ifndef SDL_CPUINFO_DISABLED
552 #if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
557 #ifdef HAVE_SYSCTLBYNAME
566 GetSystemInfo(&info);
572 DosQuerySysInfo(QSV_NUMPROCESSORS, QSV_NUMPROCESSORS,
589 static char SDL_CPUType[13];
591 if (!SDL_CPUType[0]) {
599 SDL_CPUType[
i++] = (char)(
b & 0xff);
b >>= 8;
600 SDL_CPUType[
i++] = (char)(
b & 0xff);
b >>= 8;
601 SDL_CPUType[
i++] = (char)(
b & 0xff);
b >>= 8;
602 SDL_CPUType[
i++] = (char)(
b & 0xff);
604 SDL_CPUType[
i++] = (char)(
d & 0xff);
d >>= 8;
605 SDL_CPUType[
i++] = (char)(
d & 0xff);
d >>= 8;
606 SDL_CPUType[
i++] = (char)(
d & 0xff);
d >>= 8;
607 SDL_CPUType[
i++] = (char)(
d & 0xff);
609 SDL_CPUType[
i++] = (char)(
c & 0xff);
c >>= 8;
610 SDL_CPUType[
i++] = (char)(
c & 0xff);
c >>= 8;
611 SDL_CPUType[
i++] = (char)(
c & 0xff);
c >>= 8;
612 SDL_CPUType[
i++] = (char)(
c & 0xff);
614 if (!SDL_CPUType[0]) {
615 SDL_strlcpy(SDL_CPUType,
"Unknown",
sizeof(SDL_CPUType));
626 static char SDL_CPUName[48];
628 if (!SDL_CPUName[0]) {
635 if (
a >= 0x80000004) {
637 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
638 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
639 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
640 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
641 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
642 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
643 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
644 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
645 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
646 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
647 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
648 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
649 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
650 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
651 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
652 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
654 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
655 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
656 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
657 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
658 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
659 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
660 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
661 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
662 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
663 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
664 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
665 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
666 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
667 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
668 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
669 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
671 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
672 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
673 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
674 SDL_CPUName[
i++] = (char)(
a & 0xff);
a >>= 8;
675 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
676 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
677 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
678 SDL_CPUName[
i++] = (char)(
b & 0xff);
b >>= 8;
679 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
680 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
681 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
682 SDL_CPUName[
i++] = (char)(
c & 0xff);
c >>= 8;
683 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
684 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
685 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
686 SDL_CPUName[
i++] = (char)(
d & 0xff);
d >>= 8;
689 if (!SDL_CPUName[0]) {
690 SDL_strlcpy(SDL_CPUName,
"Unknown",
sizeof(SDL_CPUName));
703 if (
SDL_strcmp(cpuType,
"GenuineIntel") == 0) {
705 return (((
b >> 8) & 0xff) * 8);
706 }
else if (
SDL_strcmp(cpuType,
"AuthenticAMD") == 0 ||
SDL_strcmp(cpuType,
"HygonGenuine") == 0) {
784 #define CPU_FEATURE_AVAILABLE(f) ((SDL_GetCPUFeatures() & f) ? SDL_TRUE : SDL_FALSE)
875 #ifndef SDL_CPUINFO_DISABLED
876 #if defined(HAVE_SYSCONF) && defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE)
878 SDL_SystemRAM = (int)((
Sint64)sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE) / (1024*1024));
881 #ifdef HAVE_SYSCTLBYNAME
883 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
885 int mib[2] = {CTL_HW, HW_REALMEM};
888 int mib[2] = {CTL_HW, HW_PHYSMEM};
891 int mib[2] = {CTL_HW, HW_MEMSIZE};
894 size_t len =
sizeof(memsize);
896 if (sysctl(mib, 2, &memsize, &
len,
NULL, 0) == 0) {
904 stat.dwLength =
sizeof(stat);
905 if (GlobalMemoryStatusEx(&stat)) {
913 DosQuerySysInfo(QSV_TOTPHYSMEM, QSV_TOTPHYSMEM, &sysram, 4);
919 _kernel_swi_regs regs;
921 if (_kernel_swi(OS_Memory, ®s, ®s) ==
NULL) {
922 SDL_SystemRAM = (int)(regs.r[1] * regs.r[2] / (1024 * 1024));
946 const size_t padding = alignment - (
len % alignment);
947 const size_t padded = (padding != alignment) ? (
len + padding) :
len;
963 void **realptr = (
void **)
ptr;
979 printf(
"CPU name: %s\n", SDL_GetCPUName());
SDL_bool SDL_HasSSE42(void)
#define SDL_CACHELINE_SIZE
static SDL_bool CPU_OSSavesZMM
static int CPU_haveAltiVec(void)
static const char * SDL_GetCPUType(void)
SDL_bool SDL_HasAVX(void)
static Uint32 SDL_CPUFeatures
static Uint32 SDL_GetCPUFeatures(void)
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
GLboolean GLboolean GLboolean b
static int CPU_haveCPUID(void)
SDL_bool SDL_HasARMSIMD(void)
SDL_bool SDL_HasSSE2(void)
#define CPU_FEATURE_AVAILABLE(f)
GLboolean GLboolean GLboolean GLboolean a
GLfloat GLfloat GLfloat GLfloat h
GLuint GLsizei GLsizei * length
static Uint32 SDL_SIMDAlignment
int SDL_GetCPUCount(void)
int SDL_GetCPUCacheLineSize(void)
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF PF else if bpp lsl PF PF lsl PF PF lsl PF PF PF else PF mov
int SDL_GetSystemRAM(void)
static int CPU_haveNEON(void)
size_t SDL_SIMDGetAlignment(void)
Report the alignment this system needs for SIMD allocations.
SDL_bool SDL_HasSSE3(void)
SDL_bool SDL_HasRDTSC(void)
void * SDL_SIMDAlloc(const size_t len)
Allocate memory in a SIMD-friendly way.
#define SDL_assert(condition)
SDL_bool SDL_Has3DNow(void)
static void CPU_calcCPUIDFeatures(void)
SDL_bool SDL_HasAVX512F(void)
GLsizei const GLfloat * value
static int CPU_CPUIDFeatures[4]
static SDL_bool CPU_OSSavesYMM
static int CPU_have3DNow(void)
SDL_bool SDL_HasSSE41(void)
SDL_bool SDL_HasAltiVec(void)
SDL_bool SDL_HasMMX(void)
SDL_bool SDL_HasNEON(void)
SDL_bool SDL_HasAVX2(void)
#define cpuid(func, a, b, c, d)
static int CPU_haveAVX512F(void)
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
SDL_bool SDL_HasSSE(void)
static int CPU_haveARMSIMD(void)
void SDL_SIMDFree(void *ptr)
Deallocate memory obtained from SDL_SIMDAlloc.
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF ptr
static int CPU_haveAVX2(void)
unsigned long long uint64_t
static int CPU_CPUIDMaxFunction
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 SDL_AssertionHandler void SDL_SpinLock SDL_atomic_t int int return SDL_atomic_t return void void void return void return int return SDL_AudioSpec SDL_AudioSpec return int int return return int SDL_RWops int SDL_AudioSpec Uint8 ** d