switch (treeNode->gtOper)
{
+#ifndef JIT32_GCENCODER
case GT_START_NONGC:
getEmitter()->emitDisableGC();
break;
+#endif // !defined(JIT32_GCENCODER)
case GT_PROF_HOOK:
#ifdef PROFILING_SUPPORTED
void CodeGen::genCodeForStoreBlk(GenTreeBlk* storeBlkNode)
{
+#ifdef JIT32_GCENCODER
+ assert(!storeBlkNode->gtBlkOpGcUnsafe);
+#else
if (storeBlkNode->gtBlkOpGcUnsafe)
{
getEmitter()->emitDisableGC();
}
+#endif // JIT32_GCENCODER
+
bool isCopyBlk = storeBlkNode->OperIsCopyBlkOp();
switch (storeBlkNode->gtBlkOpKind)
default:
unreached();
}
+
+#ifndef JIT32_GCENCODER
if (storeBlkNode->gtBlkOpGcUnsafe)
{
getEmitter()->emitEnableGC();
}
+#endif // !defined(JIT32_GCENCODER)
}
// Generate code for InitBlk using rep stos.
void emitInsertIGAfter(insGroup* insertAfterIG, insGroup* ig);
void emitNewIG();
+
+#if !defined(JIT32_GCENCODER)
void emitDisableGC();
void emitEnableGC();
+#endif // !defined(JIT32_GCENCODER)
+
void emitGenIG(insGroup* ig);
insGroup* emitSavIG(bool emitAdd = false);
void emitNxtIG(bool emitAdd = false);
emitGenIG(ig);
}
+#if !defined(JIT32_GCENCODER)
// Start a new instruction group that is not interruptable
inline void emitter::emitDisableGC()
{
// instruction groups.
emitForceNewIG = true;
}
+#endif // !defined(JIT32_GCENCODER)
/*****************************************************************************/
#endif // _EMIT_H_
asg->gtOp.gtOp1 = dest;
hasGCPtrs = ((dest->OperGet() == GT_OBJ) && (dest->AsObj()->gtGcPtrCount != 0));
-#ifdef CPBLK_UNROLL_LIMIT
+#if defined(CPBLK_UNROLL_LIMIT) && !defined(JIT32_GCENCODER)
// Note that the unrolling of CopyBlk is only implemented on some platforms.
- // Currently that includes x64 and Arm64 but not x64 or Arm32.
+ // Currently that includes x64 and ARM but not x86: the code generation for this
+ // construct requires the ability to mark certain regions of the generated code
+ // as non-interruptible, and the GC encoding for the latter platform does not
+ // have this capability.
// If we have a CopyObj with a dest on the stack
// we will convert it into an GC Unsafe CopyBlk that is non-interruptible
tree->gtOp.gtOp1 = dest;
}
}
-#endif
+#endif // defined(CPBLK_UNROLL_LIMIT) && !defined(JIT32_GCENCODER)
+
// Eliminate the "OBJ or BLK" node on the rhs.
rhs = fgMorphBlockOperand(rhs, asgType, blockWidth, false /*!isDest*/);
asg->gtOp.gtOp2 = rhs;