Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix detection of GFNI,VAES, and VPCLMULQDQ #154

Merged
merged 1 commit into from Jun 16, 2022

Conversation

Wunkolo
Copy link
Contributor

@Wunkolo Wunkolo commented Jun 15, 2022

Previously these CPUID flags were only tested when the host supported
AVX512.
Fixes #153 and fixes detection of GFNI and VAES:

% sde64 -adl -- ./test_util64
64bit
vendor intel
- mmx mmx2 cmov sse sse2 sse3 ssse3 sse41 sse42 popcnt aesni rdtscp osxsave(xgetvb) pclmulqdq avx fma avx2 bmi1 bmi2 lzcnt prefetchw enh_rep rdrand adx rdseed smap sha f16c movbe avx_vnni waitpkg clflushopt cldemote movdiri movdir64b
+ mmx mmx2 cmov sse sse2 sse3 ssse3 sse41 sse42 popcnt aesni rdtscp osxsave(xgetvb) pclmulqdq avx fma avx2 bmi1 bmi2 lzcnt prefetchw enh_rep rdrand adx rdseed smap sha f16c movbe gfni vaes vpclmulqdq avx_vnni waitpkg clflushopt cldemote movdiri movdir64b
popcnt ok
family=6, model=A, stepping=0, extFamily=0, extModel=9
display:family=6, model=9A
cache level=0 data cache size=32768 cores sharing data cache=1
cache level=1 data cache size=1048576 cores sharing data cache=1
cache level=2 data cache size=14417920 cores sharing data cache=1
SmtLevel =2
CoreLevel=1

Previously these CPUID flags were only tested when the host supported
AVX512.

Before:
```
% sde64 -adl -- ./test_util64
64bit
vendor intel
 mmx mmx2 cmov sse sse2 sse3 ssse3 sse41 sse42 popcnt aesni rdtscp osxsave(xgetvb) pclmulqdq avx fma avx2 bmi1 bmi2 lzcnt prefetchw enh_rep rdrand adx rdseed smap sha f16c movbe avx_vnni waitpkg clflushopt cldemote movdiri movdir64b
popcnt ok
family=6, model=A, stepping=0, extFamily=0, extModel=9
display:family=6, model=9A
cache level=0 data cache size=32768 cores sharing data cache=1
cache level=1 data cache size=1048576 cores sharing data cache=1
cache level=2 data cache size=14417920 cores sharing data cache=1
SmtLevel =2
CoreLevel=1
```

After:
```
% sde64 -adl -- ./test_util64
64bit
vendor intel
 mmx mmx2 cmov sse sse2 sse3 ssse3 sse41 sse42 popcnt aesni rdtscp osxsave(xgetvb) pclmulqdq avx fma avx2 bmi1 bmi2 lzcnt prefetchw enh_rep rdrand adx rdseed smap sha f16c movbe gfni vaes vpclmulqdq avx_vnni waitpkg clflushopt cldemote movdiri movdir64b
popcnt ok
family=6, model=A, stepping=0, extFamily=0, extModel=9
display:family=6, model=9A
cache level=0 data cache size=32768 cores sharing data cache=1
cache level=1 data cache size=1048576 cores sharing data cache=1
cache level=2 data cache size=14417920 cores sharing data cache=1
SmtLevel =2
CoreLevel=1
```
@herumi
Copy link
Owner

herumi commented Jun 16, 2022

Thanks for the nice patch. I've merged it.

@herumi herumi merged commit 2141972 into herumi:master Jun 16, 2022
@Wunkolo Wunkolo deleted the standalone-cpuid branch June 16, 2022 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standalone CPUID flags are coupled with AVX512F
2 participants