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 SSE detection on non-AVX CPUs #135

Merged
merged 13 commits into from
Oct 9, 2020

Conversation

gchatelet
Copy link
Collaborator

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

@Mizux Mizux self-requested a review October 8, 2020 17:35
@Mizux Mizux self-requested a review October 8, 2020 18:45
src/cpuinfo_x86.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@Mizux Mizux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@gchatelet gchatelet marked this pull request as ready for review October 9, 2020 12:32
@gchatelet gchatelet requested a review from Mizux October 9, 2020 12:32
test/cpuinfo_x86_test.cc Outdated Show resolved Hide resolved
test/cpuinfo_x86_test.cc Outdated Show resolved Hide resolved
test/cpuinfo_x86_test.cc Outdated Show resolved Hide resolved
@gchatelet
Copy link
Collaborator Author

Thx for the review @Mizux !

@gchatelet gchatelet merged commit 4795373 into master Oct 9, 2020
@gchatelet gchatelet deleted the fix_sse_detection_on_pre_avx_machines branch October 9, 2020 15:29
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.

SSSE3, SSE4.1, SSE4.2 not detected on non-AVX CPUs
2 participants