Commit 9ececeeaa4013950fe59563e4eb315c5b7a9c7ca

Ryan C. Gordon 2019-10-20T22:17:59

cpuinfo: Use a better default alignment value (thanks, Simon!). Fixes Bugzilla #4835.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index 1e020f4..0067040 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -620,7 +620,7 @@ SDL_GetCPUFeatures(void)
     if (SDL_CPUFeatures == 0xFFFFFFFF) {
         CPU_calcCPUIDFeatures();
         SDL_CPUFeatures = 0;
-        SDL_SIMDAlignment = 4;  /* a good safe base value */
+        SDL_SIMDAlignment = sizeof(void *);  /* a good safe base value */
         if (CPU_haveRDTSC()) {
             SDL_CPUFeatures |= CPU_HAS_RDTSC;
         }