Skip to content

Conversation

@mhandb
Copy link

@mhandb mhandb commented Dec 22, 2025

This pull request updates the initialization of AVX and AVX512 OS support detection in xsimd_cpuid.hpp. The change ensures that AVX and AVX512 are only considered enabled if the OS has explicitly enabled OSXSAVE.

Indeed, AVX and AVX512 strictly require the OS to enable OXSAVE otherwise we can face "illegal instruction"
https://wiki.osdev.org/SSE#AVX

For now I am using a local patch, but I would like to avoid to maintain it.

Let me know if this PR is good enough or if it needs any change.

AVX and AVX512 strictly require the OS to enable OXSAVE
otherwise we can face "illegal instruction" depending on the context state
@mhandb mhandb changed the title Fix default values for AVX and AVX512 depending on OSXSAVE Fix default values for AVX and AVX512 state depending on OSXSAVE Dec 22, 2025
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.

1 participant