1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-27 15:12:30 +02:00

372 Commits

Author SHA1 Message Date
Guillaume Chatelet
8cfb520efb [NFC] clang-format the code base 2023-09-25 07:35:53 +00:00
Guillaume Chatelet
ec7d390a90
Remove unused function (#343)
This is causing the build to fail with stricter warnings.
`error: no previous prototype for function 'CpuFeatures_IsHwCapCpuidSupported' [-Werror,-Wmissing-prototypes]`
2023-09-21 15:11:28 +02:00
Corentin Le Molgat
77d27cb108 fix -Wstrict-prototypes error
note: tested using: `add_compile_options("-Werror" "-Wstrict-prototypes")`
2023-09-21 14:25:01 +02:00
Mykola Hohsadze
89a3f0358a
Add FreeBSD Arm64 support (#295)
* 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
2023-09-19 11:02:25 +02:00
Mykola Hohsadze
494d9657ef
clang-format: hwcaps.h (#340) 2023-09-19 10:36:05 +02:00
Guillaume Chatelet
089f34635f
[misc] Update release script (#339) 2023-09-14 15:20:27 +02:00
Guillaume Chatelet
ba4bffa86c Release v0.9.0 v0.9.0 2023-09-14 12:15:33 +00:00
Mizux
af6fb5f0d4
ci: Fix clang-format (#336)
Fix #311
2023-09-14 11:54:10 +02:00
Mykola Hohsadze
312e990c6f
Add Intel AMX-FP16 detection (#332) 2023-09-14 10:22:16 +02:00
Mizux
688decfc80
cmake: Use CpuFeatures:: as TARGET namespace (Fix #333) (#334) 2023-09-14 10:19:28 +02:00
Mykola Hohsadze
b960bcf0f5
Add ZEN2 4800S 0880F40 (#331) 2023-09-05 14:14:53 +02:00
Mykola Hohsadze
aeaa84ecf4
Add Intel Alder Lake N detection (#330) 2023-09-05 14:14:21 +02:00
Mykola Hohsadze
248aa1b938
Add AMD ZEN4 Genoa detection (#329) 2023-09-05 14:13:54 +02:00
Mykola Hohsadze
199d299ce5
Add ZEN4 Phoenix detection (#328) 2023-09-05 14:13:27 +02:00
Guillaume Chatelet
fd4ffc1632
Fix badge shebang and enable badges from workflow files (#327)
* Fix badge shebang and enable badges from workflow files

* Remove chmod +x from documentation
2023-08-31 14:11:42 +02:00
Mizux
b39a27d694
fix generate_badges.d (#326) 2023-08-31 13:18:44 +02:00
Guillaume Chatelet
586ec599b2 Add hover text to badges 2023-08-31 09:32:48 +00:00
Alexander Mitin
52874f0ced
Add BUILD_INSTALL option to manage 'install' target (#325) 2023-08-31 10:58:45 +02:00
Mizux
2a3ef54701
ci: Add amd64 macos bazel workflow (#324)
* ci: Add amd64 MacOS Bazel job

* bazel: Fix MacOS build

* add amd64_macos_bazel badge
2023-08-30 17:17:34 +02:00
Guillaume Chatelet
e2d0f2ca21 Bumping CMake minimum version to 3.13
Following gtest minimum version https://github.com/google/googletest/blob/v1.14.0/CMakeLists.txt#L4
2023-08-30 13:55:44 +00:00
Guillaume Chatelet
f2e02cd86e Transpose badge table for better display 2023-08-30 13:35:54 +00:00
Guillaume Chatelet
63cc2980df Update badges 2023-08-30 13:29:50 +00:00
Corentin Le Molgat
60aa4e343a Update badges generator. 2023-08-30 13:19:47 +02:00
Corentin Le Molgat
c57960579b ci: rework bazel workflows to use a docker container 2023-08-30 13:19:47 +02:00
Mizux Seiha
468426e7c7 ci: add bazel docker for amd64 and arm64 2023-08-30 13:19:47 +02:00
Mizux Seiha
5e105a29f5 update .dockerignore 2023-08-30 13:19:47 +02:00
Guillaume Chatelet
810eb5b10e Use bazelisk instead on bazel 2023-08-30 13:19:47 +02:00
Guillaume Chatelet
5d97a14add Add aarch64 ubuntu bot 2023-08-30 13:19:47 +02:00
Guillaume Chatelet
be65a3d148
Fix bazel - use textual_hdrs for inl files (#322) 2023-08-29 10:44:07 +02:00
Weihang Ding
bd580370ee
Fix windows x86 and arm64 build and add an option to enable/disable target list_cpu_features (#317)
* Add an option to enable/disable target list_cpu_features

* Fix windows x86 and arm64
2023-08-28 16:29:00 +02:00
Tomahawkd
b5cb91b35c
Add Intel LAM/AMD UAI feature detection in X86_64 (#315)
* Add Intel LAM/AMD UAI features in X86

* Add AMD UAI test for AMD_K19_ZEN4_RAPHAEL

* Add separate UAI for AMD
2023-08-28 16:25:24 +02:00
Wang Xiang
a89e3b5569
Add LoongArch to supported list (#316)
* Add LoongArch to supported list

* Add badges and use same column order for supported archs

---------

Co-authored-by: Guillaume Chatelet <gchatelet@google.com>
2023-08-28 15:25:43 +02:00
Guillaume Chatelet
f8e3af9843
Fix bazel for aarch64 (#320)
* Remove unused function

* Fix bazel build for aarch64
2023-08-28 15:14:27 +02:00
arkivm
c5ece5e8cc
Add support for Apple M1 AArch64 SoCs (#204)
* Add support for Apple M1 AArch64 SoCs

Completely based on #150. Thanks to @sbehnke!
+ Refactoring to accomodate the new source tree
+ Adding more feature flags

* revert minimum version to 3.0

* Update introspection table

* Simplify logic for Apple HAVE_SYSCTLBYNAME

---------

Co-authored-by: Guillaume Chatelet <gchatelet@google.com>
2023-08-28 11:16:41 +02:00
Wang Xiang
0d5f398c58
Add loongarch64 Support (#314)
* Add macros for LOONGARCH hwcaps

* Update hwcaps.h

* LoongArch Support

* Remove unused definitions.

* Add ignored feature in test.
2023-08-23 20:35:29 +02:00
Guillaume Chatelet
804eaa075a
Use macos-latest for Freebsd
macos-10.15 does not exist anymore
2023-08-23 20:24:07 +02:00
Prashanth Swaminathan
de1b9e6fe7
Add Riscv32 and Riscv64 Bazel build rules. (#312)
* Add Riscv64 Bazel build rules.

* Add Riscv32 Bazel build rules.
2023-06-15 09:03:16 +02:00
Tamas Zsoldos
b0913b4197
Update AArch64 features to Linux 6.4. (#310) 2023-06-09 16:47:44 +02:00
Prashanth Swaminathan
6fe75d22ab
Add 'ndk_compat' include directory to 'ndk_compat' target (#309)
Add 'ndk_compat' to the 'includes' directive of the 'ndk_compat' target, so that targets that include this library can directly reference 'cpu-features.h' like they did with the legacy Android NDK library.
2023-06-02 23:41:23 +02:00
Guillaume Chatelet
c672eb403c Add ndk_compat target to BUILD.bazel 2023-06-02 06:16:15 +00:00
damageboy
41e206e435
cmake: make default test building dependent on being a main project build vs. being included into other projects (#290) 2023-05-04 08:54:03 +02:00
Guillaume Chatelet
936b9ab551 Release v0.8.0 v0.8.0 2023-04-27 07:44:32 +00:00
Mykola Hohsadze
0e9da93fac
Add Mendocino ZEN2 detection (#305) 2023-04-25 10:11:23 +02:00
michael-roe
75ec988188
Add RISCV vector extension (#289)
Co-authored-by: Michael Roe <michael-roe@users.noreply.github.com>
2023-04-24 15:36:22 +02:00
Mykola Hohsadze
5607a689e0
Add Raptor Lake-P and Raptor Lake-HX/S detection (#300) 2023-03-06 15:04:00 +01:00
aecsocket
79c0d7d24e
Add cpu-features-jni Java bindings to README (#297)
* Add cpu-features-jni Java bindings

* Update Java bindings URL
2023-03-06 15:03:12 +01:00
Mykola Hohsadze
a6bf4f9031
Add Windows Arm64 support (#291)
* 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
2023-02-23 11:41:33 +01:00
Ben Beasley
273af56a15
Update C++ standard for tests from C++11 to C++14 (#293)
Since 1.13.0, gtest requires at least C++14. When it is automatically
downloaded and compiled, gtest’s CMake scripts override the C++
standard, so the tests are compiled in C++14 mode already. Changing the
C++ standard in cpu_features will make it easier for users such as Linux
distribution packagers who are linking against an external or
system-wide copy of gtest 1.13.0 or later.
2023-02-22 15:13:23 +01:00
Mykola Hohsadze
c74a85d64a
Add documentation on current behavior for X86 (#212)
* Add documentation for X86 OS support

* Update X86 documentation

* Remove outdated cache info comment

* Update x86 documentation according to comments

* Update Internal structures documentation
2023-01-24 20:27:10 +01:00
Guillaume Chatelet
4590768e53 Fix badges in README.md 2023-01-13 09:57:59 +00:00