Skip to content

Commit 1a344dd

Browse files
"Load/StoreWithPush" -> "Load/StoreFullSlot"
The load variant in codegen now has double purpose.
1 parent 3dd54c0 commit 1a344dd

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/coreclr/jit/codegenxarch.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7959,19 +7959,19 @@ void CodeGen::genPutArgStkFieldList(GenTreePutArgStk* putArgStk)
79597959
}
79607960
}
79617961

7962-
bool canStoreWithPush = fieldIsSlot;
7963-
bool canLoadWithPush = genIsValidIntReg(argReg);
7962+
bool canStoreFullSlot = fieldIsSlot;
7963+
bool canLoadFullSlot = genIsValidIntReg(argReg);
79647964
if (argReg == REG_NA)
79657965
{
79667966
assert((genTypeSize(fieldNode) <= TARGET_POINTER_SIZE));
79677967
assert(genTypeSize(genActualType(fieldNode)) == genTypeSize(genActualType(fieldType)));
79687968

79697969
// We can widen local loads if the excess only affects padding bits.
7970-
canLoadWithPush = (genTypeSize(fieldNode) == TARGET_POINTER_SIZE) || fieldNode->isUsedFromSpillTemp() ||
7970+
canLoadFullSlot = (genTypeSize(fieldNode) == TARGET_POINTER_SIZE) || fieldNode->isUsedFromSpillTemp() ||
79717971
(fieldNode->OperIsLocalRead() && (genTypeSize(fieldNode) >= genTypeSize(fieldType)));
79727972
}
79737973

7974-
if (canStoreWithPush && canLoadWithPush)
7974+
if (canStoreFullSlot && canLoadFullSlot)
79757975
{
79767976
assert(m_pushStkArg);
79777977
assert(genTypeSize(fieldNode) <= TARGET_POINTER_SIZE);
@@ -7998,8 +7998,8 @@ void CodeGen::genPutArgStkFieldList(GenTreePutArgStk* putArgStk)
79987998
else
79997999
{
80008000
// Use the smaller "mov" instruction in case we do not need a sign/zero-extending load.
8001-
instruction loadIns = canLoadWithPush ? INS_mov : ins_Load(fieldNode->TypeGet());
8002-
emitAttr loadSize = canLoadWithPush ? EA_PTRSIZE : emitTypeSize(fieldNode);
8001+
instruction loadIns = canLoadFullSlot ? INS_mov : ins_Load(fieldNode->TypeGet());
8002+
emitAttr loadSize = canLoadFullSlot ? EA_PTRSIZE : emitTypeSize(fieldNode);
80038003
inst_RV_TT(loadIns, loadSize, intTmpReg, fieldNode);
80048004
}
80058005

src/coreclr/jit/lsraxarch.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,18 +1512,18 @@ int LinearScan::BuildPutArgStk(GenTreePutArgStk* putArgStk)
15121512

15131513
// We can treat as a slot any field that is stored at a slot boundary, where the previous
15141514
// field is not in the same slot. (Note that we store the fields in reverse order.)
1515-
const bool fieldIsSlot = ((fieldOffset % 4) == 0) && ((prevOffset - fieldOffset) >= 4);
1516-
const bool canStoreWithPush = fieldIsSlot;
1517-
const bool canLoadWithPush = (genTypeSize(fieldNode) == TARGET_POINTER_SIZE) ||
1515+
const bool canStoreFullSlot = ((fieldOffset % 4) == 0) && ((prevOffset - fieldOffset) >= 4);
1516+
const bool canLoadFullSlot =
1517+
(genTypeSize(fieldNode) == TARGET_POINTER_SIZE) ||
15181518
(fieldNode->OperIsLocalRead() && (genTypeSize(fieldNode) >= genTypeSize(fieldType)));
15191519

1520-
if ((!canStoreWithPush || !canLoadWithPush) && (intTemp == nullptr))
1520+
if ((!canStoreFullSlot || !canLoadFullSlot) && (intTemp == nullptr))
15211521
{
15221522
intTemp = buildInternalIntRegisterDefForNode(putArgStk);
15231523
}
15241524

15251525
// We can only store bytes using byteable registers.
1526-
if (!canStoreWithPush && varTypeIsByte(fieldType))
1526+
if (!canStoreFullSlot && varTypeIsByte(fieldType))
15271527
{
15281528
intTemp->registerAssignment &= allByteRegs();
15291529
}

0 commit comments

Comments
 (0)