-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fixes for AArch64 #338
Merged
Merged
Fixes for AArch64 #338
Conversation
This file contains 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
maximecb
pushed a commit
that referenced
this pull request
Jul 25, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
noahgibbs
pushed a commit
that referenced
this pull request
Aug 23, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
noahgibbs
pushed a commit
that referenced
this pull request
Aug 24, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
noahgibbs
pushed a commit
that referenced
this pull request
Aug 24, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow PR: #338
noahgibbs
pushed a commit
that referenced
this pull request
Aug 25, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow PR: #338
k0kubun
pushed a commit
that referenced
this pull request
Aug 25, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow PR: #338
k0kubun
pushed a commit
that referenced
this pull request
Aug 25, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
k0kubun
pushed a commit
that referenced
this pull request
Aug 25, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
k0kubun
pushed a commit
that referenced
this pull request
Aug 25, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
k0kubun
pushed a commit
that referenced
this pull request
Aug 25, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
11 tasks
k0kubun
pushed a commit
that referenced
this pull request
Aug 26, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
noahgibbs
pushed a commit
that referenced
this pull request
Aug 26, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
k0kubun
pushed a commit
that referenced
this pull request
Aug 26, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
k0kubun
pushed a commit
that referenced
this pull request
Aug 29, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
k0kubun
pushed a commit
that referenced
this pull request
Aug 29, 2022
* Better splitting for Op::Add, Op::Sub, and Op::Cmp * Split stores if the displacement is too large * Use a shifted immediate argument * Split all places where shifted immediates are used * Add more tests to the cirrus workflow
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.
ShiftedImmediate
struct implementing aTryFrom<u64>
. Now all of those instructions accept an instance of this struct and use that to encode instead of two different arguments (value + shift). This allows us to encode more immediate values. Believe it or not, this actually came up because of a bootstrap test failing, and it passed after this encoding was in place. Because we can now check if this will encode properly ahead of time, we now split on all places that accept aShiftedImmediate
. If it can be encoded, we use the value. Otherwise we split it into a load first. This applies to ADD, ADDS, CMP, SUB, and SUBS.Op::Lea
(lowers toADD
) and then replace it with a new memory operand with a 0 displacement. To use this we split on allOp::Store
instructions and theOp::Mov
instructions that would lower to a store.Op::Sub
instruction as if subtraction were commutative 😔. We now properly maintain ordering of the operands and lower them appropriately.Op::Add
instruction by moving around the operands as necessary. For example, if you were to add an immediate with a register (as opposed to a register with an immediate) we swap the order of the operands instead of loading the first into a register.