Skip to content

SystemStats: Make Windows+Clang callCPUID() clear ECX like __cpuid()#1640

Closed
why-trv wants to merge 1 commit into
juce-framework:developfrom
why-trv:develop
Closed

SystemStats: Make Windows+Clang callCPUID() clear ECX like __cpuid()#1640
why-trv wants to merge 1 commit into
juce-framework:developfrom
why-trv:develop

Conversation

@why-trv
Copy link
Copy Markdown

@why-trv why-trv commented Mar 28, 2026

This fixes AVX2 and AVX512 detection issues with clang-cl on Windows (https://forum.juce.com/t/bug-report-wrong-systemstats-hasavx2-result-with-clang-cl-64-bit/68580).
Previously, ECX could contain result from a previous callCPUID() call, so the result would be some other leaf, not EAX=7, ECX=0.

…intrinsic

Previously, ECX could contain result from a previous callCPUID() call,
breaking, for instance, AVX2 and AVX512 detection
@juce-push-bot
Copy link
Copy Markdown
Collaborator

This pull request has been mentioned on The JUCE Forum. There might be relevant details there:

https://forum.juce.com/t/bug-report-wrong-systemstats-hasavx2-result-with-clang-cl-64-bit/68580/2

@tpoole
Copy link
Copy Markdown
Member

tpoole commented Apr 1, 2026

Thank you for reporting. I've added a fix here: 28706b9

@tpoole tpoole closed this Apr 1, 2026
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.

3 participants