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

asm: notate instruction alignment, SSE feature flags #10446

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Mar 21, 2025

This change improves the definitions of the assembler's SSE instructions in two ways:

  • vector instructions that require aligned memory accesses (i.e., most everything pre-AVX) are now noted with an align attribute in the AST. This is used for generating the expected XmmMemAligned types in cranelift-codegen-meta the "right way," resolving the temporary fix introduced in x64: fix misaligned load fault with sunk load when AVX is disabled #10417.
  • previously-added vector instructions did not have the correct feature flags; this change adds the sse feature and also tags the applicable instructions with the compat feature to allow their use in some future 32-bit target.

This change improves the definitions of the assembler's SSE instructions
in two ways:
- vector instructions that require aligned memory accesses (i.e., most
  everything pre-AVX) are now noted with an `align` attribute in the
  AST. This is used for generating the expected `XmmMemAligned` types in
  `cranelift-codegen-meta` the "right way," resolving the temporary fix
  introduced in bytecodealliance#10417.
- previously-added vector instructions did not have the correct feature
  flags; this change adds the `sse` feature and also tags the applicable
  instructions with the `compat` feature to allow their use in some future
  32-bit target.
@abrown abrown requested a review from a team as a code owner March 21, 2025 01:49
@abrown abrown requested review from cfallin and removed request for a team March 21, 2025 01:49
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen cranelift:meta Everything related to the meta-language. labels Mar 21, 2025
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@abrown abrown enabled auto-merge March 24, 2025 20:32
@abrown abrown added this pull request to the merge queue Mar 24, 2025
Merged via the queue into bytecodealliance:main with commit 6a8d3d5 Mar 24, 2025
53 checks passed
@abrown abrown deleted the asm-alignment branch March 24, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:x64 Issues related to x64 codegen cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants