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

x64: rework new assembler rule priorities, remove old emission rules #10260

Merged
merged 5 commits into from
Feb 22, 2025

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Feb 20, 2025

See commit messages for details.

alexcrichton and others added 3 commits February 20, 2025 10:49
Use overlapping priorities when the only difference is in the type being
matched on, and otherwise use priorities to disambiguate the arms of
`GprMemImm` and the various possibilities of extraction.
In cases where an 8-bit immediate is used, x64 can emit a shorter
encoding and rely on the CPU to sign extend it. Several Cranelift tests
rely on this (as they should--this improves code size). The previous
commit breaks the previous priorities; this change restores them,
ensuring we use the smallest encoding when possible.
We expect the new assembler rules to prevent us from reaching the old
emission rules. This change removes the old rules completely.
@abrown abrown requested a review from a team as a code owner February 20, 2025 19:06
@abrown abrown requested review from cfallin and removed request for a team February 20, 2025 19:06
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.

Thanks! Some thoughts on ordering below but otherwise LGTM.

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels Feb 20, 2025
@abrown abrown enabled auto-merge February 22, 2025 01:38
@abrown abrown added this pull request to the merge queue Feb 22, 2025
Merged via the queue into bytecodealliance:main with commit 2e48fbc Feb 22, 2025
51 checks passed
@abrown abrown deleted the assembler-priorities branch February 22, 2025 02:15
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 Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants