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

Commit

Permalink
Merge pull request #5854 from dotnet/nmirror
Browse files Browse the repository at this point in the history
Merge nmirror to master
  • Loading branch information
jkotas authored May 25, 2018
2 parents 1df0710 + 12964a0 commit ece4ed1
Showing 1 changed file with 10 additions and 3 deletions.
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

0 comments on commit ece4ed1

Please sign in to comment.