Skip to content
Merged
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
18 changes: 2 additions & 16 deletions src/coreclr/jit/codegenarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2801,22 +2801,13 @@ void CodeGen::genCodeForCpBlkUnroll(GenTreeBlk* node)
CopyBlockUnrollHelper helper(srcOffset, dstOffset, size);
regNumber srcReg = srcAddrBaseReg;

#ifdef DEBUG
bool isSrcRegAddrAlignmentKnown = false;
bool isDstRegAddrAlignmentKnown = false;
#endif

if (srcLclNum != BAD_VAR_NUM)
{
bool fpBased;
const int baseAddr = compiler->lvaFrameAddress(srcLclNum, &fpBased);

srcReg = fpBased ? REG_FPBASE : REG_SPBASE;
helper.SetSrcOffset(baseAddr + srcOffset);

#ifdef DEBUG
isSrcRegAddrAlignmentKnown = true;
#endif
}

regNumber dstReg = dstAddrBaseReg;
Expand All @@ -2828,10 +2819,6 @@ void CodeGen::genCodeForCpBlkUnroll(GenTreeBlk* node)

dstReg = fpBased ? REG_FPBASE : REG_SPBASE;
helper.SetDstOffset(baseAddr + dstOffset);

#ifdef DEBUG
isDstRegAddrAlignmentKnown = true;
#endif
}

bool canEncodeAllLoads = true;
Expand Down Expand Up @@ -2945,8 +2932,8 @@ void CodeGen::genCodeForCpBlkUnroll(GenTreeBlk* node)
}
#endif

#ifndef JIT32_GCENCODER
if (!node->gtBlkOpGcUnsafe && ((srcOffsetAdjustment != 0) || (dstOffsetAdjustment != 0)))
if (!node->gtBlkOpGcUnsafe &&
((srcOffsetAdjustment != 0) || (dstOffsetAdjustment != 0) || (node->GetLayout()->HasGCPtr())))
{
// If node is not already marked as non-interruptible, and if are about to generate code
// that produce GC references in temporary registers not reported, then mark the block
Expand All @@ -2955,7 +2942,6 @@ void CodeGen::genCodeForCpBlkUnroll(GenTreeBlk* node)
node->gtBlkOpGcUnsafe = true;
GetEmitter()->emitDisableGC();
}
#endif

if ((srcOffsetAdjustment != 0) && (dstOffsetAdjustment != 0))
{
Expand Down