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

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedn committed Feb 5, 2019
1 parent 3d2cde6 commit 7a9b46a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/jit/codegenarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode)
// the xor ensures that only one of the two is setup, not both
assert((varNode != nullptr) ^ (addrNode != nullptr));

StructTypeLayout* layout = treeNode->gtLayout;
int structSize = layout->GetSize();
StructTypeLayout* layout;
int structSize;
bool isHfa;

// This is the varNum for our load operations,
Expand All @@ -720,14 +720,18 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode)
assert(varDsc->lvType == TYP_STRUCT);
assert(varDsc->lvOnFrame && !varDsc->lvRegister);

#ifdef _TARGET_ARM_
layout = treeNode->gtLayout;
#else // _TARGET_ARM64_
layout = varDsc->lvLayout;
#endif // _TARGET_ARM64_
structSize = layout->GetSize();

// This yields the roundUp size, but that is fine
// as that is how much stack is allocated for this LclVar
assert(structSize == varDsc->lvSize());

isHfa = varDsc->lvIsHfa();
#ifdef _TARGET_ARM64_
assert(layout == varDsc->lvLayout);
#endif // _TARGET_ARM_
}
else // addrNode is used
{
Expand All @@ -747,10 +751,9 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode)
}
#endif // _TARGET_ARM64_

isHfa = compiler->IsHfa(layout->GetClass());
#ifdef _TARGET_ARM64_
assert(layout == source->AsObj()->gtLayout);
#endif
layout = source->AsObj()->gtLayout;
structSize = layout->GetSize();
isHfa = compiler->IsHfa(layout->GetClass());
}

// If we have an HFA we can't have any GC pointers,
Expand Down

0 comments on commit 7a9b46a

Please sign in to comment.