Visual Studio doesn't define __ARM_ARCH nor _ARM_NEON, but _M_ARM and _M_ARM64,
so SDL_HasNEON() was bypassed.
PF_ARM_NEON_INSTRUCTIONS_AVAILABLE doesn't see to be defined (but still works
when defined as 19).
Only __ARM_NEON is defined with Android NDK and arm64-v8a
Tested on ndk-r18, ndk-r13 and also Xcode.
(Visual Studio needs a different fix).
Fixes Bugzilla #4409.
Luke Dashjr
Bug 3993 was "fixed" by #undef'ing bool. But this breaks C99's stdbool.h bool too.
For example, mpv's build fails with:
../audio/out/ao_sdl.c:35:5: error: unknown type name ‘bool’
It seems ill-advised to be #undef'ing *anything* here - what if the code including SDL_cpuinfo.h actually wants to use altivec?
These are _much_ faster than the scalar equivalents on the Raspberry Pi that
I tested on. Often 3x to 4x as fast!
--HG--
extra : rebase_source : a9f90ef5bfdd309d6a3c8e9220ee235d7413cb5d
extra : histedit_source : 61c5ad731eed96f7bb46da40261ed8b14d474624
This checks for the "foundation" AVX-512 instructions (that all AVX-512
compatible CPUs support).
--HG--
extra : rebase_source : 2857dd04072e2f897e18665d0a4fe2837c06ed9b
extra : histedit_source : 67d0b925bceb2ed2a8f37b5783f2b755e796031f
Felix Geyer
Forwarding from https://bugs.debian.org/892087 quoting verbatim:
The SDL2 header SDL_cpuinfo.h generates gcc warnings if the program using
it compiles with the -Wundef warning. (In particular, this means that QEMU
builds using it fail on at least sparc hosts, since QEMU dev builds
use both -Wundef and -Werror.).
/usr/include/SDL2/SDL_cpuinfo.h:63:5: warning: "HAVE_IMMINTRIN_H" is not defined, evaluates to 0 [-Wundef]
#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
bastien.bouclet
According to this GCC bug report, altivec.h requires building with the gnu extensions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78263.
As an application developer, I don't want SDL to force me to enable the gnu extensions.
Haneef Mubarak
AVX is the successor to SSE* and is fairly widely available. As such, it really ought to be detectable.
This functionality ought to be trivial to implement, and not having it means being forced to write an ugly workaround to check for AVX (so that normal SSE can be used if AVX is not available).
Here is an example on detecting AVX from SO (it actually shows ways to cehck for all of teh fancy instructions):
http://stackoverflow.com/questions/6121792/how-to-check-if-a-cpu-supports-the-sse3-instruction-set
It's a long-dead platform, and we don't have any way to build for, test, or
maintain it, so there's no sense in doing acrobatics to support it.
If you need Windows CE support, use SDL 1.2. If you need Windows Phone support,
send SDL 2.0 patches for the newer Windows Mobile platform.