Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Merge nmirror to master #5854

Merged
merged 2 commits into from
May 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -935,9 +935,14 @@ public unsafe int GetNextOffset()
#if _TARGET_ARM64_
// NOT DESKTOP BEHAVIOR: The S and D registers overlap, and the UniversalTransitionThunk copies D registers to the transition blocks. We'll need
// to work with the D registers here as well.
bool processingFloatsAsDoublesFromTransitionBlock = false;
if (argType == CorElementType.ELEMENT_TYPE_VALUETYPE && _argTypeHandle.IsHFA() && _argTypeHandle.GetHFAType() == CorElementType.ELEMENT_TYPE_R4)
{
argSize *= 2;
if ((argSize / sizeof(float)) + _idxFPReg <= 8)
{
argSize *= 2;
processingFloatsAsDoublesFromTransitionBlock = true;
}
}
#endif

Expand Down Expand Up @@ -1239,8 +1244,10 @@ public unsafe int GetNextOffset()
if (_argTypeHandle.IsHFA())
{
CorElementType type = _argTypeHandle.GetHFAType();
// DESKTOP BEHAVIOR cFPRegs = (type == CorElementType.ELEMENT_TYPE_R4) ? (argSize / sizeof(float)) : (argSize / sizeof(double));
cFPRegs = argSize / sizeof(double);
if (processingFloatsAsDoublesFromTransitionBlock)
cFPRegs = argSize / sizeof(double);
else
cFPRegs = (type == CorElementType.ELEMENT_TYPE_R4) ? (argSize / sizeof(float)) : (argSize / sizeof(double));
}
else
{
Expand Down