Fix for 130437#130534
Draft
dhartglassMSFT wants to merge 1 commit into
Draft
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts ARM64 JIT codegen for the “base + large imm” address materialization helper so the generated add is encodable when the base register is SP (which cannot appear as the third operand in the register form of add).
Changes:
- Swap the operand order of the register-form
addininstGen_Set_Reg_To_Base_Plus_ImmsoSP(when used) is placed in the encodable operand position. - Add an explanatory comment about the
SPoperand restriction for the encoding.
Comment on lines
2163
to
2167
| instGen_Set_Reg_To_Imm(size, dstReg, imm); | ||
| GetEmitter()->emitIns_R_R_R(INS_add, size, dstReg, dstReg, baseReg); | ||
| // baseReg might be SP, which must be reg2 | ||
| // an "add R0, R1, SP" is not encodable | ||
| GetEmitter()->emitIns_R_R_R(INS_add, size, dstReg, baseReg, dstReg); | ||
| } |
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.
Assertion failed 'isGeneralRegister(reg3)' in jitstress-random.
STRESS_SPLIT_TREES_RANDOMLYforced both a mask and a 4096b struct into locals that get spilled.Hit assertion when we try to spill the mask to [SP+4120]. 4120 isn't encodable for a predicate store, so we need
instGen_Set_Reg_To_Base_Plus_Imm. This tried to create an add where SP was the last operand - this is not allowed to be encoded.Fix to swap the order of the operands on the add. We get this now: