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

cranelift-native flags detection: fix flags on SSE2-only systems. #4231

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

cfallin
Copy link
Member

@cfallin cfallin commented Jun 6, 2022

In #4224 we saw that an SSE2-only x86-64 system somehow was still
detecting SSE3/SSSE3/SSE4.1/SSE4.2. It turns out that we enabled these
in the baseline Flags in #3816, because without that, a ton of other
things break: default flags no longer produce a compiler backend that
works with default Wasmtime settings. However the logic to set them when
detected (via CPUID-using feature-test macros) only does an "if
detected then set bit" step per feature; the bits are never cleared.
This PR fixes that.

This should be relatively temporary: once we fix #3810, then we can
remove this hack by making the default Flags state all-zeroes again,
as a compiler with default flags will again support a default Wasmtime.

@cfallin cfallin requested a review from abrown June 6, 2022 23:11
 In bytecodealliance#4224 we saw that an SSE2-only x86-64 system somehow was still
 detecting SSE3/SSSE3/SSE4.1/SSE4.2. It turns out that we enabled these
 in the baseline `Flags` in bytecodealliance#3816, because without that, a ton of other
 things break: default flags no longer produce a compiler backend that
 works with default Wasmtime settings. However the logic to set them
 when detected (via `CPUID`-using feature-test macros) only does an "if
 detected then set bit" step per feature; the bits are never *cleared*.
 This PR fixes that.
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Jun 6, 2022
@cfallin cfallin merged commit 5033f99 into bytecodealliance:main Jun 8, 2022
Stebalien pushed a commit to filecoin-project/wasmtime that referenced this pull request Jun 9, 2022
…ytecodealliance#4231)

In bytecodealliance#4224 we saw that an SSE2-only x86-64 system somehow was still
 detecting SSE3/SSSE3/SSE4.1/SSE4.2. It turns out that we enabled these
 in the baseline `Flags` in bytecodealliance#3816, because without that, a ton of other
 things break: default flags no longer produce a compiler backend that
 works with default Wasmtime settings. However the logic to set them
 when detected (via `CPUID`-using feature-test macros) only does an "if
 detected then set bit" step per feature; the bits are never *cleared*.
 This PR fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cranelift: support vector instructions without optional ISA extensions
2 participants