Skip to content

Commit

Permalink
revert IsSplitAcrossRegistersAndStack().
Browse files Browse the repository at this point in the history
  • Loading branch information
shushanhf committed Apr 29, 2024
1 parent 6bf9d17 commit 78c4e25
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 11 additions & 2 deletions src/coreclr/jit/abi.cpp
Expand Up @@ -258,12 +258,21 @@ bool ABIPassingInformation::HasExactlyOneStackSegment() const
//
bool ABIPassingInformation::IsSplitAcrossRegistersAndStack() const
{
if (NumSegments != 2)
if (NumSegments < 2)
{
return false;
}

return Segments[0].IsPassedInRegister() && Segments[1].IsPassedOnStack();
bool isFirstInReg = Segments[0].IsPassedInRegister();
for (unsigned i = 1; i < NumSegments; i++)
{
if (isFirstInReg != Segments[i].IsPassedInRegister())
{
return true;
}
return false;
}
return false;
}

//-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/jit/codegencommon.cpp
Expand Up @@ -4282,9 +4282,9 @@ void CodeGen::genHomeStackPartOfSplitParameter(regNumber initReg, bool* initRegS
#ifdef DEBUG
for (lclNum += 1; lclNum < compiler->info.compArgsCount; lclNum++)
{
abiInfo = compiler->lvaGetParameterABIInfo(lclNum);
const ABIPassingInformation& abiInfo2 = compiler->lvaGetParameterABIInfo(lclNum);
// There should be only one split parameter
assert(!abiInfo.IsSplitAcrossRegistersAndStack());
assert(!abiInfo2.IsSplitAcrossRegistersAndStack());
}
#endif
break;
Expand Down

0 comments on commit 78c4e25

Please sign in to comment.