1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-28 15:33:37 +02:00

381 Commits

Author SHA1 Message Date
Corentin Le Molgat
440452e9a3 ci(travis): adapt it to the new run_integration.sh 2021-10-26 11:42:29 +00:00
Corentin Le Molgat
8971bf0b0e tools: Rework cross compilation scripts
- Use stderr for issues
- Add usage to run_integration.sh (-h or --help)
- deduce toolchain and qemu config from TARGET
- Bump QEMU from 2.11.1 to 5.2.0
  - fix qemu build on Archlinux
- Bump Linaro:
    toolchain 7.2-2017.11 -> 7.5-2019.12
    sysroot 2.25-2017.11 -> 2.25-2019.12
- Bump codescape from 2017.10-08 to 2020.06-01
  - migrate from mips-r2-hard to mips-r6-hard
2021-10-26 11:42:29 +00:00
Corentin Le Molgat
239c2e5660 ci(appveyor): Add VS 2019 job 2021-10-26 11:42:29 +00:00
Corentin Le Molgat
0f07e4b9eb .gitignore: Add build_cross/
note: Used by scripts/*.sh
2021-10-26 11:42:29 +00:00
Corentin Le Molgat
545b2e84ec cmake: Use of CMAKE_POSITION_INDEPENDENT_CODE instead of BUILD_PIC (Fix #143) 2021-10-25 12:01:38 +00:00
Guillaume Chatelet
769287c384
Fixes #185 (#187)
Missing `string_view` header and invalid `_Static_assert` statement
2021-10-25 09:48:46 +02:00
Guillaume Chatelet
cf589a2844
[NFC] Change implementation of FillX86BrandString (#181) 2021-10-21 10:51:00 +02:00
Guillaume Chatelet
32b49eb5e7
Fixes wrong cache detection of old processors (#183) 2021-10-20 17:02:52 +02:00
Guillaume Chatelet
4a81f3756e [NFC] encapsulate fake cpu instance in x86 test 2021-10-20 08:15:44 +00:00
Guillaume Chatelet
b324a7043c
Showcase community bindings (#180) 2021-10-18 15:53:02 +02:00
Nikolay Hohsadze
0925f6953c
Add cache info for new AMD CPUs (0x8000001D) (#171) 2021-10-18 14:14:29 +02:00
SpaceIm
2939ece4d2
add BUNDLE DESTINATION (#177)
required for installation of executable target if cross-build to iOS/tvOS/watchOS
see https://cmake.org/cmake/help/latest/policy/CMP0006.html
2021-10-18 13:29:39 +02:00
Guillaume Chatelet
f70dc46cd5
Add separator to CpuFeatures_StringView_HasWord (#174) 2021-10-18 12:52:14 +02:00
Mizux
628c50e92d
Update README.md (#176) 2021-07-07 16:25:58 +02:00
Nikolay Hohsadze
dcac7d3844
Update gitignore (#173) 2021-07-06 11:14:20 +02:00
Guillaume Chatelet
b003173331
Fix broken table in README.md 2021-07-02 17:33:54 +02:00
Guillaume Chatelet
119943707c
Add support for FreeBSD on x86 (#163) 2021-07-02 15:37:03 +02:00
Mizux
06fdc0aa1d
cmake: Use CTest default (Fix #169) (#170)
note: this is the default behaviour when using include(CTest)
2021-06-30 15:15:01 +02:00
Mizux
38213bd010
ci: Add FreeBSD GitHub workflows (#167)
First step to fixing #158 : add a CI for FreeBSD.
2021-06-30 15:02:23 +02:00
Nikolay Hohsadze
5492c4c561
CPU features for AMD (#165) 2021-06-30 12:38:56 +02:00
Guillaume Chatelet
b3ef4ef49d
Avoid leaking internal headers for ppc (#164) 2021-06-30 11:51:26 +02:00
Kris Kwiatkowski
001faefdc3
fix: Return default value from ‘GetCacheTypeString’ (#162)
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.
2021-06-25 10:28:26 +02:00
Guillaume Chatelet
646b80fa3a
[NFC] refactor the code so it's easier to understand the execution flow (#161) 2021-06-23 14:21:05 +00:00
Guillaume Chatelet
40ef93802f Remove leftover WORKSPACE file 2021-06-23 14:09:25 +00:00
Guillaume Chatelet
108f3d9eca
Fix #140 Atom processor detected as X86_UNKNOWN (#160) 2021-06-22 11:12:02 +02:00
Koichi Shiraishi
bc2846e78f
Detect AVX512 on Darwin use GetDarwinSysCtlByName("hw.optional.avx512f") (#153) 2021-05-21 11:14:50 +02:00
Kris Kwiatkowski
d35e2f38eb
Detect Intel's Multi-Precision Add-Carry Instruction Extensions (#157) 2021-05-21 10:47:32 +02:00
Guillaume Klein
3e8243b7d9 Fix C++ namespace in README
The correct namespace is `cpu_features` as defined in 3cc8f310d9/include/cpu_features_macros.h (L108).
2021-04-12 10:40:04 +02:00
Koichi Shiraishi
3c7149f22d github/workflows: fix install clang-format to use clang-extra-tools pkg 2021-04-07 08:47:46 +02:00
natanbc
7ed0b0e50e
Detect Zen 3 (K19) cpus (#152)
Co-authored-by: natanbc <natanbc@users.noreply.github.com>
2021-02-25 21:47:39 +01:00
Tamas Zsoldos
e2f6dea65f
Update AArch64 features to Linux 5.10 (#149)
Added feature: MTE.
2020-12-15 13:28:53 +01:00
Guillaume Chatelet
6d0767e0d9
Provides a release script (#142)
Fixes #141
2020-10-16 11:44:56 +00:00
Guillaume Chatelet
a8397ba459
Bump version to v0.6.0 v0.6.0 2020-10-15 11:09:51 +02:00
Guillaume Chatelet
cdab59af76
[NFC] Simplify build by removing inl files. (#139) 2020-10-13 13:05:04 +02:00
Guillaume Chatelet
9a8f04b24c
[NFC] Generate separate tables via macro (#137)
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.
2020-10-12 09:50:35 +00:00
Guillaume Chatelet
3cc8f310d9 [NFC] Update copyright from Google Inc. to Google LLC 2020-10-12 08:55:20 +00:00
Tim Gates
c0885fec9b
docs: fix simple typo, intented -> intended (#138)
There is a small typo in src/utils/list_cpu_features.c.

Should read `intended` rather than `intented`.
2020-10-12 07:20:05 +00:00
Guillaume Chatelet
7f62ff67c8
Excluding deleted files from clang-format Check 2020-10-12 07:18:05 +00:00
Guillaume Chatelet
e63405f118
Remove need for utsname (#136) 2020-10-09 20:40:06 +00:00
Guillaume Chatelet
4795373db2
Fix SSE detection on non-AVX CPUs (#135)
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
2020-10-09 15:20:25 +00:00
Guillaume Chatelet
22a5362e11
[NFC] clang-format codebase (#134)
* [NFC] clang-format codebase

* revert to 80 char columns at the price of uglier table init

* Specifically disabling clang-format for table initialization
2020-09-23 09:52:20 +00:00
Mizux
38f2a0274f
ci: Add clang-format check (#132)
* ci: Add Clang-format check

* ci: Only check file(s) in the commit list
2020-09-23 09:33:35 +00:00
Guillaume Chatelet
0d47deb9f1
Remove additional dot in README.md 2020-09-23 07:28:19 +00:00
Mizux
a7e0963508
Fix trailing spaces. (#133) 2020-09-23 07:27:23 +00:00
Jeff Hammond
17ffb65117
detect AVX-512 FMA count (#125)
* add Ice Lake Server and Sapphire Rapids models

The information contained in this commit was obtained from
"Intel® Architecture Instruction Set Extensions and Future Features Programming Reference" document 319433-040 from
https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html

Signed-off-by: Jeff Hammond <jeff.r.hammond@intel.com>

* Tiger Lake; Ice Lake NNP-I; SPR string

Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>

* second FMA features - incomplete and wrong

Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>

* oops: use T/F not 2/1

Signed-off-by: Jeff Hammond <jeff.r.hammond@intel.com>

* implement SKX lookup

Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>

* add Intel copyright

* cleanup AVX512 second FMA code

1) remove debug stuff
2) remove ICX - will add details when available

Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>

* fix CPX detection

Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>

* remove elses

Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>

* remove curly braces from single-line conditional bodies

Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>

* apply clang-format

Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>

Fixes #120
v0.5.0
2020-09-22 07:29:46 +00:00
Guillaume Chatelet
76dafc7e3b
[NFC] Remove unused max_cpuid_leaf variable (#131) 2020-09-21 14:54:13 +02:00
Mizux
91f525c74d
Fix ndk-compat include directory (Fix #106) (#130) 2020-09-21 11:42:21 +00:00
Guillaume Chatelet
c186ec5307 [doc] link quickstart within the sample code section 2020-09-21 10:05:16 +00:00
Mizux
4efc837a92
Bump version 0.1.0 -> 0.5.0 (Fix #118) (#129) 2020-09-21 09:59:55 +00:00
Guillaume Chatelet
68fa870479 [Doc] Add C++ namespace to docs
Fixes #117
2020-09-21 09:57:09 +00:00