Skip to content

qsimd: Add CPUID leaf 7 sub-leaf 1 detection#130

Open
amanwalksdownthestreet wants to merge 1 commit intoqt:devfrom
amanwalksdownthestreet:fix-cpuid-leaf7-subleaf1
Open

qsimd: Add CPUID leaf 7 sub-leaf 1 detection#130
amanwalksdownthestreet wants to merge 1 commit intoqt:devfrom
amanwalksdownthestreet:fix-cpuid-leaf7-subleaf1

Conversation

@amanwalksdownthestreet
Copy link

Building Qt with -march=native on CPUs with CPUID leaf 7 sub-leaf 1 features (Intel Lunar Lake, Arrow Lake, etc.) fails at runtime:

Incompatible processor. This Qt build requires the following features:
    cmpccxadd avxifma

detectProcessorFeatures() only queries sub-leaf 0, so features in sub-leaf 1 are never detected. The compiler sets CMPCCXADD and AVXIFMA macros, but runtime returns 0 for those bits, failing the compatibility check.

This adds cpuidFeatures07_01() to query sub-leaf 1 and populate Leaf07_01EAX/Leaf07_01EDX.

@cla-assistant
Copy link

cla-assistant bot commented Jan 5, 2026

CLA assistant check
All committers have signed the CLA.

detectProcessorFeatures() only queries CPUID leaf 7 sub-leaf 0,
missing features in sub-leaf 1. When compiled with -march=native
on CPUs with these features, the compiler sets __CMPCCXADD__ and
__AVXIFMA__ macros, but runtime detection returns 0, failing the
compatibility check at startup.

Add cpuidFeatures07_01() to query sub-leaf 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant