* Windows does not define __ARM_NEON
However, Windows requires NEON to work, so assume it is there if build with MSVC
* Clarify NEON availability in MSVC targeting arm64
* Fix Formatting
* Add Windows Arm64 support
To add Windows Arm64 support was added detection of features via Windows API function IsProcessorFeaturePresent. Added _M_ARM64 to detect CPU_FEATURES_AARCH64 macro on Windows. Added initial code for Windows Arm64 testing and provided test for Raspberry PI 4. We can't use "define_introspection_and_hwcaps.inl" as a common file for all operating systems due to msvc compiler error C2099: initializer is not a constant, so as a workaround for Windows I used separate "define_introspection.inl"
See also: #268, #284, #186
* [CMake] Add windows_utils.h to PROCESSOR_IS_AARCH64
* Add detection of armv8.1 atomic instructions
* Update note on win-arm64 implementation and move to cpuinfo_aarch64.h
* Remove redundant #ifdef CPU_FEATURES_OS_WINDOWS
* Add note on FP/SIMD and Cryptographic Extension for win-arm64
* Add comments to Aarch64Info fields
Added comments to specify that implementer, part and variant we set 0 for Windows, since Win API does not provide a way to get information. For revision added comment that we use GetNativeSystemInfo
This commit helps with platform code separation (fixes#3). It should also help with the build as we can simply include all `impl_*.c` files regardless of OS / arch.
Note: this patch contains breaking changes in `include/cpu_features_macros.h`
- `CPU_FEATURES_OS_LINUX_OR_ANDROID` does not exist anymore
- `CPU_FEATURES_OS_FREEBSD`, `CPU_FEATURES_OS_ANDROID` and `CPU_FEATURES_OS_LINUX` are now mutually exclusive (i.e. `CPU_FEATURES_OS_ANDROID` does not imply `CPU_FEATURES_OS_LINUX`)
- `CPU_FEATURES_OS_DARWIN` has been renamed into `CPU_FEATURES_OS_MACOS` to be able to target non-Mac Apple products (IOS, TV, WATCH). They are now targetable with `CPU_FEATURES_OS_IPHONE`. This matches Apple naming convention described in [this stackoverflow](https://stackoverflow.com/a/49560690).
The build fails with following message when -Werror
and -Werror=return-type are enabled.
In function ‘GetCacheTypeString’:
error: control reaches end of non-void function [-Werror=return-type]
Simple fix is to return explicitly communicate to
the compiler that certain block is not reachable.
Fixes#4. This is based on #115 with a few modifications:
- Removed use of __builtin_cpu_supports since it relies on cpuid and doesn't improve on the current situation,
- Added detection for all of sse, sse2, sse3, ssse3, sse4_1 and sse4_2,
- Added tests for Atom, Nehalem, and P3 processors,
Thx to @gadoofou87 for providing the original PR.
It also removes the need for #92
* Fix SSE detection on non-AVX CPUs
* Fixes typo
* Mock OSX sysctlbyname in tests
* Also update other tests
* FakeCpu is reset between each tests
* Fix conflicting name on Windows
* Disable pre AVX cpu sse detection tests on Windows
* Guard OS specific code with macros
* Fix missing import for tests
* Fix wrong function prototype
* Fix wrong mocking of P3 on Windows
* Completely guard OS specific parts in x86 tests
* Store DWORD instead unsigned long for x86 tests