// GT_RELOAD/GT_COPY use the child node
argNode = argNode->gtSkipReloadOrCopy();
- if (curArgTabEntry->regNum == REG_STK)
+ if (curArgTabEntry->GetRegNum() == REG_STK)
continue;
// Deal with multi register passed struct args.
if (argNode->OperGet() == GT_FIELD_LIST)
{
- regNumber argReg = curArgTabEntry->regNum;
+ regNumber argReg = curArgTabEntry->GetRegNum();
for (GenTreeFieldList::Use& use : argNode->AsFieldList()->Uses())
{
GenTree* putArgRegNode = use.GetNode();
genConsumeArgSplitStruct(argNode->AsPutArgSplit());
for (unsigned idx = 0; idx < curArgTabEntry->numRegs; idx++)
{
- regNumber argReg = (regNumber)((unsigned)curArgTabEntry->regNum + idx);
+ regNumber argReg = (regNumber)((unsigned)curArgTabEntry->GetRegNum() + idx);
regNumber allocReg = argNode->AsPutArgSplit()->GetRegNumByIdx(idx);
if (argReg != allocReg)
{
#endif // FEATURE_ARG_SPLIT
else
{
- regNumber argReg = curArgTabEntry->regNum;
+ regNumber argReg = curArgTabEntry->GetRegNum();
genConsumeReg(argNode);
if (argNode->GetRegNum() != argReg)
{
fgArgTabEntry* curArgTabEntry = compiler->gtArgEntryByNode(call, argNode->gtSkipReloadOrCopy());
assert(curArgTabEntry);
- if (curArgTabEntry->regNum == REG_STK)
+ if (curArgTabEntry->GetRegNum() == REG_STK)
{
continue;
}
{
GenTree* putArgRegNode = use.GetNode();
assert(putArgRegNode->gtOper == GT_PUTARG_REG);
- regNumber argReg = curArgTabEntry->getRegNum(regIndex++);
+ regNumber argReg = curArgTabEntry->GetRegNum(regIndex++);
genConsumeReg(putArgRegNode);
else
#endif // UNIX_AMD64_ABI
{
- regNumber argReg = curArgTabEntry->regNum;
+ regNumber argReg = curArgTabEntry->GetRegNum();
genConsumeReg(argNode);
if (argNode->GetRegNum() != argReg)
{
{
_lateArgInx = inx;
}
- __declspec(property(get = getRegNum)) regNumber regNum;
- regNumber getRegNum()
+ regNumber GetRegNum()
{
return (regNumber)regNums[0];
}
assert(i < MAX_ARG_REG_COUNT);
regNums[i] = (regNumberSmall)regNum;
}
- regNumber getRegNum(unsigned int i)
+ regNumber GetRegNum(unsigned int i)
{
assert(i < MAX_ARG_REG_COUNT);
return (regNumber)regNums[i];
#ifdef _TARGET_X86
return false;
#else
- return isValidFloatArgReg(regNum);
+ return isValidFloatArgReg(GetRegNum());
#endif
}
assert(isPassedInRegisters());
assert(numRegs == 1);
}
- else if (regNum == REG_STK)
+ else if (GetRegNum() == REG_STK)
{
assert(!isPassedInRegisters());
assert(numRegs == 0);
return;
}
- regNumber argReg = getRegNum(0);
+ regNumber argReg = GetRegNum(0);
#ifdef _TARGET_ARM_
unsigned int regSize = (GetHfaType() == TYP_DOUBLE) ? 2 : 1;
#else
#ifdef _TARGET_ARM_
if (curArgTabEntry->IsSplit())
{
- regNumber firstReg = curArgTabEntry->regNum;
+ regNumber firstReg = curArgTabEntry->GetRegNum();
if (listCount == -1)
{
if (curArgTabEntry->numRegs == 1)
fgArgTabEntry* curArgTabEntry = gtArgEntryByLateArgIndex(call, lateArgIndex);
assert(curArgTabEntry);
- regNumber argReg = curArgTabEntry->regNum;
+ regNumber argReg = curArgTabEntry->GetRegNum();
#if !FEATURE_FIXED_OUT_ARGS
assert(lateArgIndex < call->regArgListCount);
#ifdef _TARGET_ARM_
else if (curArgTabEntry->IsSplit())
{
- regNumber firstReg = curArgTabEntry->regNum;
+ regNumber firstReg = curArgTabEntry->GetRegNum();
unsigned argNum = curArgTabEntry->argNum;
if (listCount == -1)
{
assert(listCount <= MAX_ARG_REG_COUNT);
char separator = (curArgTabEntry->numRegs == 2) ? ',' : '-';
sprintf_s(bufp, bufLength, "arg%d %s%c%s%c", curArgTabEntry->argNum, compRegVarName(argReg), separator,
- compRegVarName(curArgTabEntry->getRegNum(curArgTabEntry->numRegs - 1)), 0);
+ compRegVarName(curArgTabEntry->GetRegNum(curArgTabEntry->numRegs - 1)), 0);
}
else
#endif
GenTree* putArg = nullptr;
bool isOnStack = true;
- isOnStack = info->regNum == REG_STK;
+ isOnStack = info->GetRegNum() == REG_STK;
#ifdef _TARGET_ARMARCH_
// Mark contained when we pass struct
GenTreePutArgSplit* argSplit = putArg->AsPutArgSplit();
for (unsigned regIndex = 0; regIndex < info->numRegs; regIndex++)
{
- argSplit->SetRegNumByIdx(info->getRegNum(regIndex), regIndex);
+ argSplit->SetRegNumByIdx(info->GetRegNum(regIndex), regIndex);
}
if (arg->OperGet() == GT_OBJ)
unsigned int regIndex = 0;
for (GenTreeFieldList::Use& use : arg->AsFieldList()->Uses())
{
- regNumber argReg = info->getRegNum(regIndex);
+ regNumber argReg = info->GetRegNum(regIndex);
GenTree* curOp = use.GetNode();
var_types curTyp = curOp->TypeGet();
else
#endif // FEATURE_MULTIREG_ARGS
{
- putArg = comp->gtNewPutArgReg(type, arg, info->regNum);
+ putArg = comp->gtNewPutArgReg(type, arg, info->GetRegNum());
}
}
else
}
#elif defined(_TARGET_AMD64_)
// TYP_SIMD8 parameters that are passed as longs
- if (type == TYP_SIMD8 && genIsValidIntReg(info->regNum))
+ if (type == TYP_SIMD8 && genIsValidIntReg(info->GetRegNum()))
{
GenTreeUnOp* bitcast = new (comp, GT_BITCAST) GenTreeOp(GT_BITCAST, TYP_LONG, arg, nullptr);
BlockRange().InsertAfter(arg, bitcast);
fieldList->AddFieldLIR(comp, arg->AsOp()->gtGetOp2(), 4, TYP_INT);
GenTree* newArg = NewPutArg(call, fieldList, info, type);
- if (info->regNum != REG_STK)
+ if (info->GetRegNum() != REG_STK)
{
assert(info->numRegs == 2);
// In the register argument case, NewPutArg replaces the original field list args with new
GenTree* Lowering::LowerFloatArg(GenTree** pArg, fgArgTabEntry* info)
{
GenTree* arg = *pArg;
- if (info->regNum != REG_STK)
+ if (info->GetRegNum() != REG_STK)
{
if (arg->OperIs(GT_FIELD_LIST))
{
// Transform fields that are passed as registers in place.
- regNumber currRegNumber = info->regNum;
+ regNumber currRegNumber = info->GetRegNum();
unsigned regIndex = 0;
for (GenTreeFieldList::Use& use : arg->AsFieldList()->Uses())
{
}
else if (varTypeIsFloating(arg))
{
- GenTree* intNode = LowerFloatArgReg(arg, info->regNum);
+ GenTree* intNode = LowerFloatArgReg(arg, info->GetRegNum());
assert(intNode != nullptr);
ReplaceArgWithPutArgOrBitcast(pArg, intNode);
return *pArg;
// get a reference to the thisPtr being passed
fgArgTabEntry* argEntry = comp->gtArgEntryByArgNum(call, thisPtrArgNum);
- assert(argEntry->regNum == thisPtrArgReg);
+ assert(argEntry->GetRegNum() == thisPtrArgReg);
assert(argEntry->GetNode()->OperIs(GT_PUTARG_REG));
GenTree* thisPtr = argEntry->GetNode()->AsUnOp()->gtGetOp1();
// During Build, we only use the ArgTabEntry for validation,
// as getting it is rather expensive.
fgArgTabEntry* curArgTabEntry = compiler->gtArgEntryByNode(call, argNode);
- regNumber argReg = curArgTabEntry->regNum;
+ regNumber argReg = curArgTabEntry->GetRegNum();
assert(curArgTabEntry != nullptr);
#endif
if (argNode->gtOper == GT_PUTARG_STK)
{
// late arg that is not passed in a register
- assert(curArgTabEntry->regNum == REG_STK);
+ assert(curArgTabEntry->GetRegNum() == REG_STK);
// These should never be contained.
assert(!argNode->isContained());
continue;
#endif // FEATURE_ARG_SPLIT
if (arg->gtOper == GT_PUTARG_STK)
{
- assert(curArgTabEntry->regNum == REG_STK);
+ assert(curArgTabEntry->GetRegNum() == REG_STK);
}
else
{
fgArgTabEntry* curArgTabEntry = compiler->gtArgEntryByNode(call, argNode);
assert(curArgTabEntry);
- if (curArgTabEntry->regNum == REG_STK)
+ if (curArgTabEntry->GetRegNum() == REG_STK)
{
// late arg that is not passed in a register
assert(argNode->gtOper == GT_PUTARG_STK);
unsigned regIndex = 0;
for (GenTreeFieldList::Use& use : argNode->AsFieldList()->Uses())
{
- const regNumber argReg = curArgTabEntry->getRegNum(regIndex);
+ const regNumber argReg = curArgTabEntry->GetRegNum(regIndex);
assert(use.GetNode()->GetRegNum() == argReg);
regIndex++;
}
else
#endif // UNIX_AMD64_ABI
{
- const regNumber argReg = curArgTabEntry->regNum;
+ const regNumber argReg = curArgTabEntry->GetRegNum();
assert(argNode->GetRegNum() == argReg);
}
#endif // DEBUG
printf("fgArgTabEntry[arg %u", argNum);
printf(" %d.%s", GetNode()->gtTreeID, GenTree::OpName(GetNode()->OperGet()));
printf(" %s", varTypeName(argType));
- if (regNum != REG_STK)
+ if (GetRegNum() != REG_STK)
{
printf(", %u reg%s:", numRegs, numRegs == 1 ? "" : "s");
for (unsigned i = 0; i < numRegs; i++)
(!isLateArg && ((node->gtFlags & GTF_LATE_ARG) == 0)));
noway_assert(curArgTabEntry->use != callTree->gtCallThisArg);
- assert((curArgTabEntry->regNum == REG_STK) || curArgTabEntry->IsSplit());
+ assert((curArgTabEntry->GetRegNum() == REG_STK) || curArgTabEntry->IsSplit());
assert(curArgTabEntry->use->GetNode() == node);
nextSlotNum = (unsigned)roundUp(nextSlotNum, curArgTabEntry->alignment);
assert(curArgTabEntry->slotNum == nextSlotNum);
assert(curArgTabEntry != nullptr);
GenTree* argx = curArgTabEntry->GetNode();
- if (curArgTabEntry->regNum == REG_STK)
+ if (curArgTabEntry->GetRegNum() == REG_STK)
{
hasStackArgs = true;
#if !FEATURE_FIXED_OUT_ARGS
continue;
}
- if (argTable[otherInx]->regNum == REG_STK)
+ if (argTable[otherInx]->GetRegNum() == REG_STK)
{
treatLikeCall = true;
break;
// Or, if they are stored into the FIXED_OUT_ARG area
// we require that they be moved to the gtCallLateArgs
// and replaced with a placeholder node
- else if (prevArgTabEntry->regNum == REG_STK)
+ else if (prevArgTabEntry->GetRegNum() == REG_STK)
{
prevArgTabEntry->needPlace = true;
}
// Examine the register args that are currently not marked needTmp
//
- if (!curArgTabEntry->needTmp && (curArgTabEntry->regNum != REG_STK))
+ if (!curArgTabEntry->needTmp && (curArgTabEntry->GetRegNum() != REG_STK))
{
if (hasStackArgsWeCareAbout)
{
fgArgTabEntry* curArgTabEntry = argTable[curInx];
- if (curArgTabEntry->regNum != REG_STK)
+ if (curArgTabEntry->GetRegNum() != REG_STK)
{
regCount++;
}
{
fgArgTabEntry* curArgTabEntry = argTable[curInx];
- if (curArgTabEntry->regNum != REG_STK)
+ if (curArgTabEntry->GetRegNum() != REG_STK)
{
// Encode the argument register in the register mask
//
- callTree->gtCall.regArgList[regInx] = curArgTabEntry->regNum;
+ callTree->gtCall.regArgList[regInx] = curArgTabEntry->GetRegNum();
regInx++;
}
}
// and otherwise we'd have to either modify getPrimitiveTypeForStruct() to take
// a structDesc or call eeGetSystemVAmd64PassStructInRegisterDescriptor yet again.
//
- if (genIsValidFloatReg(curArgTabEntry->regNum))
+ if (genIsValidFloatReg(curArgTabEntry->GetRegNum()))
{
if (structBaseType == TYP_INT)
{
// Only the register arguments need to be replaced with placeholder nodes.
// Stacked arguments are evaluated and pushed (or stored into the stack) in order.
//
- if (curArgTabEntry->regNum == REG_STK)
+ if (curArgTabEntry->GetRegNum() == REG_STK)
continue;
#endif
// might have left holes in the used registers (see
// fgAddSkippedRegsInPromotedStructArg).
// Too bad we're not that smart for these intermediate temps...
- if (isValidIntArgReg(curArgTabEntry->regNum) && (curArgTabEntry->numRegs > 1))
+ if (isValidIntArgReg(curArgTabEntry->GetRegNum()) && (curArgTabEntry->numRegs > 1))
{
- regNumber argReg = curArgTabEntry->regNum;
- regMaskTP allUsedRegs = genRegMask(curArgTabEntry->regNum);
+ regNumber argReg = curArgTabEntry->GetRegNum();
+ regMaskTP allUsedRegs = genRegMask(curArgTabEntry->GetRegNum());
for (unsigned i = 1; i < curArgTabEntry->numRegs; i++)
{
argReg = genRegArgNext(argReg);
// this argument so we have to replace it in the gtCallArgs list
// (the initial argument evaluation list) with a placeholder.
//
- if ((curArgTabEntry->regNum == REG_STK) && (curArgTabEntry->needPlace == false))
+ if ((curArgTabEntry->GetRegNum() == REG_STK) && (curArgTabEntry->needPlace == false))
{
continue;
}
#ifdef DEBUG
if (compiler->verbose)
{
- if (curArgTabEntry->regNum == REG_STK)
+ if (curArgTabEntry->GetRegNum() == REG_STK)
{
printf("Deferred stack argument :\n");
}
else
{
- printf("Deferred argument ('%s'):\n", getRegName(curArgTabEntry->regNum));
+ printf("Deferred argument ('%s'):\n", getRegName(curArgTabEntry->GetRegNum()));
}
compiler->gtDispTree(argx);
{
fgArgTabEntry* curArgTabEntry = argTable[curInx];
- if (curArgTabEntry->regNum != REG_STK)
+ if (curArgTabEntry->GetRegNum() != REG_STK)
{
- printf("%s ", getRegName(curArgTabEntry->regNum));
+ printf("%s ", getRegName(curArgTabEntry->GetRegNum()));
}
}
printf("\n");
#ifdef _TARGET_ARM_
if ((fgEntryPtr->IsSplit() && fgEntryPtr->numSlots + fgEntryPtr->numRegs > 4) ||
- (!fgEntryPtr->IsSplit() && fgEntryPtr->regNum == REG_STK))
+ (!fgEntryPtr->IsSplit() && fgEntryPtr->GetRegNum() == REG_STK))
#else
- if (fgEntryPtr->regNum == REG_STK)
+ if (fgEntryPtr->GetRegNum() == REG_STK)
#endif
{
GenTreeLclVarCommon* lcl = nullptr;
//
if (newArg == nullptr)
{
- if (fgEntryPtr->regNum == REG_STK)
+ if (fgEntryPtr->GetRegNum() == REG_STK)
{
// We leave this stack passed argument alone
return arg;