x64: rework new assembler rule priorities, remove old emission rules#10260
Merged
abrown merged 5 commits intobytecodealliance:mainfrom Feb 22, 2025
Merged
x64: rework new assembler rule priorities, remove old emission rules#10260abrown merged 5 commits intobytecodealliance:mainfrom
abrown merged 5 commits intobytecodealliance:mainfrom
Conversation
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.
cfallin
approved these changes
Feb 20, 2025
Member
cfallin
left a comment
There was a problem hiding this comment.
Thanks! Some thoughts on ordering below but otherwise LGTM.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See commit messages for details.