genConsumeOperands(initBlkNode);
+ if (initBlkNode->gtFlags & GTF_BLK_VOLATILE)
+ {
+ // issue a full memory barrier before volatile an initBlockUnroll operation
+ instGen_MemoryBarrier();
+ }
+
regNumber valReg = initVal->IsIntegralConst(0) ? REG_ZR : initVal->gtRegNum;
assert(!initVal->IsIntegralConst(0) || (valReg == REG_ZR));
emitter* emit = getEmitter();
- if (cpBlkNode->gtFlags & GTF_IND_VOLATILE)
+ if (cpBlkNode->gtFlags & GTF_BLK_VOLATILE)
{
+ // issue a full memory barrier before & after a volatile CpBlkUnroll operation
instGen_MemoryBarrier();
}
}
}
- if (cpBlkNode->gtFlags & GTF_IND_VOLATILE)
+ if (cpBlkNode->gtFlags & GTF_BLK_VOLATILE)
{
+ // issue a full memory barrier before & after a volatile CpBlkUnroll operation
instGen_MemoryBarrier();
}
}
assert(tmpReg2 != REG_WRITE_BARRIER_SRC_BYREF);
}
- if (cpObjNode->gtFlags & GTF_IND_VOLATILE)
+ if (cpObjNode->gtFlags & GTF_BLK_VOLATILE)
{
+ // issue a full memory barrier before & after a volatile CpObj operation
instGen_MemoryBarrier();
}
assert(gcPtrCount == 0);
}
+ if (cpObjNode->gtFlags & GTF_BLK_VOLATILE)
+ {
+ // issue a full memory barrier before & after a volatile CpObj operation
+ instGen_MemoryBarrier();
+ }
+
// Clear the gcInfo for REG_WRITE_BARRIER_SRC_BYREF and REG_WRITE_BARRIER_DST_BYREF.
// While we normally update GC info prior to the last instruction that uses them,
// these actually live into the helper call.
gcInfo.gcMarkRegSetNpt(RBM_WRITE_BARRIER_SRC_BYREF | RBM_WRITE_BARRIER_DST_BYREF);
-
- if (cpObjNode->gtFlags & GTF_IND_VOLATILE)
- {
- instGen_MemoryBarrier();
- }
}
// generate code do a switch statement based on a table of ip-relative offsets
if (tree->gtFlags & GTF_IND_VOLATILE)
{
+ // issue a full memory barrier a before volatile StInd
instGen_MemoryBarrier();
}
if (tree->gtFlags & GTF_IND_VOLATILE)
{
+ // issue a full memory barrier after a volatile LdInd operation
instGen_MemoryBarrier();
}
}
}
#endif // _TARGET_ARM64_
- if (cpBlkNode->gtFlags & GTF_IND_VOLATILE)
+ if (cpBlkNode->gtFlags & GTF_BLK_VOLATILE)
{
+ // issue a full memory barrier before & after a volatile CpBlkUnroll operation
instGen_MemoryBarrier();
}
genEmitHelperCall(CORINFO_HELP_MEMCPY, 0, EA_UNKNOWN);
- if (cpBlkNode->gtFlags & GTF_IND_VOLATILE)
+ if (cpBlkNode->gtFlags & GTF_BLK_VOLATILE)
{
+ // issue a full memory barrier before & after a volatile CpBlkUnroll operation
instGen_MemoryBarrier();
}
}
genConsumeBlockOp(initBlkNode, REG_ARG_0, REG_ARG_1, REG_ARG_2);
- if (initBlkNode->gtFlags & GTF_IND_VOLATILE)
+ if (initBlkNode->gtFlags & GTF_BLK_VOLATILE)
{
+ // issue a full memory barrier before a volatile initBlock Operation
instGen_MemoryBarrier();
}