* Add FreeBSD Arm64 detection
Getting all the features is handled by reading /var/run/dmesg.boot. Feature detections were taken from the freebsd kernel code sys/arm64/arm64/identcpu.c
* Add FreeBSD Arm64 tests
* Add flagm, flagm2 and rng detection
* Add HWCAP FreeBSD AArch64
* Update include to use linux hwcaps for powerpc
* Add FreeBSD aarch64 impl
* Separate Hwacps to freebsd and linux implementation
* Add aarch64 midr_el1 implementation
* Add detection hwcap cpuid to hwcaps.h
* Add MIDR_EL1 tests
* 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
* add windows ssse3,sse4_1,sse4_2 detection for non avx path
* remove special WESTMERE case
* move windows conditional redefinition to separate header
* fix minor issues
This is a non functional change, it allows:
- Getting rid of `unix_features_aggregator`
- Have a single blob describing the features
- Fix wrong mocking of `hwcaps`
Downside: abuse of macros makes the code slightly magical and harder to understand.
It think it's still an improvement over the current situation as there's less repetition and less chances to get something wrong.
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
* [NFC] clang-format codebase
* revert to 80 char columns at the price of uglier table init
* Specifically disabling clang-format for table initialization
This adds the following features: dcpodp, sve2, sveaes, svepmull,
svebitperm, svesha3, svesm4, flagm2, frint, svei8mm, svef32mm,
svef64mm, svebf16, i8mm, bf16, dgh and rng.
With these, all features used by Linux 5.8 on AArch64 is supported.
Fixes#126
* First implementation of ndk_compat
* Restrict building of linux_based_hardware_detection to UNIX
* Fix variable declaration and printf formatting
* Restrict ndk compat to UNIX style systems
* Restrict cpu_mask index to 32
* Fix values display in ndk-compat-test
* Addressing comments
Some PowerPC machines can operate in a mode that appears different
to a process than the actual hardware. AT_PLATFORM indicates the
supported instruction set and AT_BASE_PLATFORM indicates the
actual microarchitecture of the hardware.
Signed-off-by: Rashmica Gupta <rashmica.gupta@au1.ibm.com>
getauxval() returns an unsigned long which can be defined to be
more than 32 bits so don't force the result into a uint32_t.
Signed-off-by: Rashmica Gupta <rashmica.gupta@au1.ibm.com>