Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions src/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1446,16 +1446,15 @@ struct fgArgTabEntry
#endif
}

__declspec(property(get = getIsVararg, put = setIsVararg)) bool isVararg;
bool getIsVararg()
bool GetIsVararg()
{
#ifdef FEATURE_VARARG
return _isVararg;
#else
return false;
#endif
}
void setIsVararg(bool value)
void SetIsVararg(bool value)
{
#ifdef FEATURE_VARARG
_isVararg = value;
Expand Down
22 changes: 11 additions & 11 deletions src/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ fgArgTabEntry* fgArgInfo::AddRegArg(unsigned argNum,
curArgTabEntry->isBackFilled = false;
curArgTabEntry->isNonStandard = false;
curArgTabEntry->isStruct = isStruct;
curArgTabEntry->isVararg = isVararg;
curArgTabEntry->SetIsVararg(isVararg);

hasRegArgs = true;
AddArg(curArgTabEntry);
Expand Down Expand Up @@ -1213,7 +1213,7 @@ fgArgTabEntry* fgArgInfo::AddStkArg(unsigned argNum,
curArgTabEntry->isBackFilled = false;
curArgTabEntry->isNonStandard = false;
curArgTabEntry->isStruct = isStruct;
curArgTabEntry->isVararg = isVararg;
curArgTabEntry->SetIsVararg(isVararg);

hasStackArgs = true;
AddArg(curArgTabEntry);
Expand Down Expand Up @@ -2080,7 +2080,7 @@ GenTree* Compiler::fgMakeTmpArgNode(fgArgTabEntry* curArgTabEntry)
{
CORINFO_CLASS_HANDLE clsHnd = varDsc->lvVerTypeInfo.GetClassHandle();
var_types structBaseType =
getPrimitiveTypeForStruct(lvaLclExactSize(tmpVarNum), clsHnd, curArgTabEntry->isVararg);
getPrimitiveTypeForStruct(lvaLclExactSize(tmpVarNum), clsHnd, curArgTabEntry->GetIsVararg());

if (structBaseType != TYP_UNKNOWN)
{
Expand Down Expand Up @@ -2123,7 +2123,7 @@ GenTree* Compiler::fgMakeTmpArgNode(fgArgTabEntry* curArgTabEntry)
#if FEATURE_MULTIREG_ARGS
#ifdef _TARGET_ARM64_
assert(varTypeIsStruct(type));
if (lvaIsMultiregStruct(varDsc, curArgTabEntry->isVararg))
if (lvaIsMultiregStruct(varDsc, curArgTabEntry->GetIsVararg()))
{
// ToDo-ARM64: Consider using: arg->ChangeOper(GT_LCL_FLD);
// as that is how UNIX_AMD64_ABI works.
Expand Down Expand Up @@ -2288,7 +2288,7 @@ void fgArgInfo::EvalArgsToTemps()
unsigned structSize = varDsc->lvExactSize;

scalarType =
compiler->getPrimitiveTypeForStruct(structSize, clsHnd, curArgTabEntry->isVararg);
compiler->getPrimitiveTypeForStruct(structSize, clsHnd, curArgTabEntry->GetIsVararg());
}
#endif // _TARGET_ARMARCH_ || defined (UNIX_AMD64_ABI)
}
Expand Down Expand Up @@ -4529,9 +4529,9 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry
hfaType = fgEntryPtr->hfaType;
if (varTypeIsValidHfaType(hfaType)
#if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_)
&& !fgEntryPtr->isVararg
&& !fgEntryPtr->GetIsVararg()
#endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_)
)
)
{
elemType = hfaType;
elemSize = genTypeSize(elemType);
Expand Down Expand Up @@ -4641,9 +4641,9 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry
// This local variable must match the layout of the 'objClass' type exactly
if (varDsc->lvIsHfa()
#if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_)
&& !fgEntryPtr->isVararg
&& !fgEntryPtr->GetIsVararg()
#endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_)
)
)
{
// We have a HFA struct.
// Note that GetHfaType may not be the same as elemType, since TYP_SIMD8 is handled the same as TYP_DOUBLE.
Expand Down Expand Up @@ -4696,9 +4696,9 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry
// TODO-ARM64-CQ: Support struct promoted HFA types here
if (varDsc->lvPromoted && (varDsc->lvFieldCnt == 2) && (!varDsc->lvIsHfa()
#if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_)
&& !fgEntryPtr->isVararg
&& !fgEntryPtr->GetIsVararg()
#endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_)
))
))
{
// See if we have two promoted fields that start at offset 0 and 8?
unsigned loVarNum = lvaGetFieldLocal(varDsc, 0);
Expand Down