Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 387d9fc

Browse files
authored
Merge pull request #5931 from briansull/fix-crossgen-arm64
Fix for Arm64 crossgen break
2 parents e39a3ae + cacee58 commit 387d9fc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/jit/morph.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3621,6 +3621,24 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode)
36213621
fgArgTabEntryPtr newArgEntry;
36223622
if (lateArgsComputed)
36233623
{
3624+
// If 'expectRetBuffArg' is true then the next argument is the RetBufArg
3625+
// and we may need to change nextRegNum to the theFixedRetBuffReg
3626+
if (!argEntry->isNonStandard && expectRetBuffArg)
3627+
{
3628+
assert(passUsingFloatRegs == false);
3629+
3630+
if (hasFixedRetBuffReg())
3631+
{
3632+
// Change the register used to pass the next argument to the fixed return buffer register
3633+
nextRegNum = theFixedRetBuffReg();
3634+
// Note that later in this method we don't increment intArgRegNum when we
3635+
// have setup nextRegRun to be the fixed return buffer register
3636+
}
3637+
3638+
// We no longer are expecting the RetBufArg
3639+
expectRetBuffArg = false;
3640+
}
3641+
36243642
// This is a register argument - possibly update it in the table
36253643
newArgEntry = call->fgArgInfo->RemorphRegArg(argIndex, argx, args, nextRegNum, size, argAlign);
36263644
}

0 commit comments

Comments
 (0)