Skip to content

asm: notate instruction alignment, SSE feature flags#10446

Merged
abrown merged 2 commits intobytecodealliance:mainfrom
abrown:asm-alignment
Mar 24, 2025
Merged

asm: notate instruction alignment, SSE feature flags#10446
abrown merged 2 commits intobytecodealliance:mainfrom
abrown:asm-alignment

Conversation

@abrown
Copy link
Member

@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