Skip to content

SSE detection fix on non-AVX CPUs #115

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

Closed
wants to merge 3 commits into from

Conversation

gadoofou87-zz
Copy link

@gadoofou87-zz gadoofou87-zz commented Mar 17, 2020

Fixes #4. Tested on Ubuntu 18.04, macOS Mojave, Visual Studio 2019.

@gadoofou87-zz gadoofou87-zz force-pushed the patch-4 branch 3 times, most recently from b2cfb12 to 39339a4 Compare March 20, 2020 22:08
@gadoofou87-zz gadoofou87-zz marked this pull request as ready for review March 20, 2020 22:32
@gadoofou87-zz
Copy link
Author

@gchatelet @Mizux Any comments? :)

@gadoofou87-zz
Copy link
Author

@Mizux Is it okay now?

@Mizux Mizux self-requested a review April 14, 2020 11:14
@mbrcic
Copy link

mbrcic commented Jun 2, 2020

Is this PR going to be merged soon?

@gchatelet
Copy link
Collaborator

@gadoofou87 thx a lot for you PR and my apologies for the delayed answer.
Can I ask you to:

  • rebase you patch
  • decompose the code in several functions (at least one for parsing /proc/cpu_info)
  • clang-format the patch

Let me know if you're not able to work on it right now and I'll take over.

gchatelet added a commit that referenced this pull request Oct 9, 2020
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
@gchatelet
Copy link
Collaborator

This is now fixed by #135

@gchatelet gchatelet closed this Oct 9, 2020
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
4 participants