This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[RyuJIT/armel] Make RefPosition arg regs fixed #13023
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e5b4c7b
[RyuJIT/armel] Make RefPosition arg regs fixed
wateret 0e0e60d
[RyuJIT/armel] Each reg gets own SpillFlag for MultiRegOp
wateret 45a2404
[RyuJIT/armel] Allocate one more temp for call address
wateret e36d674
[RyuJIT/armel] arg regs are always TYP_INT
wateret 99e4b01
[RyuJIT/armel] Fix ifdef condition and Formatting Error
wateret File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3985,6 +3985,15 @@ void LinearScan::buildRefPositionsForNode(GenTree* tree, | |
#endif // DEBUG | ||
|
||
regMaskTP candidates = getUseCandidates(useNode); | ||
#ifdef ARM_SOFTFP | ||
// If oper is GT_PUTARG_REG, set bits in useCandidates must be in sequential order. | ||
if (useNode->OperIsMultiRegOp()) | ||
{ | ||
regMaskTP candidate = genFindLowestReg(candidates); | ||
useNode->gtLsraInfo.setSrcCandidates(this, candidates & ~candidate); | ||
candidates = candidate; | ||
} | ||
#endif // ARM_SOFTFP | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should more generally handle the case of |
||
assert((candidates & allRegs(i->registerType)) != 0); | ||
|
||
// For non-localVar uses we record nothing, as nothing needs to be written back to the tree. | ||
|
@@ -8907,6 +8916,15 @@ void LinearScan::updateMaxSpill(RefPosition* refPosition) | |
ReturnTypeDesc* retTypeDesc = treeNode->AsCall()->GetReturnTypeDesc(); | ||
typ = retTypeDesc->GetReturnRegType(refPosition->getMultiRegIdx()); | ||
} | ||
#ifdef ARM_SOFTFP | ||
else if (treeNode->OperIsPutArgReg()) | ||
{ | ||
// For double arg regs, the type is changed to long since they must be passed via `r0-r3`. | ||
// However when they get spilled, they should be treated as separated int registers. | ||
var_types typNode = treeNode->TypeGet(); | ||
typ = (typNode == TYP_LONG) ? TYP_INT : typNode; | ||
} | ||
#endif // ARM_SOFTFP | ||
else | ||
{ | ||
typ = treeNode->TypeGet(); | ||
|
@@ -9230,6 +9248,11 @@ void LinearScan::resolveRegisters() | |
GenTreePutArgSplit* splitArg = treeNode->AsPutArgSplit(); | ||
splitArg->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx()); | ||
} | ||
else if (treeNode->OperIsMultiRegOp()) | ||
{ | ||
GenTreeMultiRegOp* multiReg = treeNode->AsMultiRegOp(); | ||
multiReg->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx()); | ||
} | ||
#endif | ||
} | ||
|
||
|
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should merge these cases, and unify the handling of all the different multi-reg ops on the various targets. I'll open a separate issue for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CarolEidt Definitely I agree with that.