#ifdef _TARGET_ARM_
case GT_CLS_VAR_ADDR:
- emit->emitIns_R_C(INS_lea, EA_PTRSIZE, targetReg, treeNode->gtClsVar.gtClsVarHnd, 0);
+ emit->emitIns_R_C(INS_lea, EA_PTRSIZE, targetReg, treeNode->AsClsVar()->gtClsVarHnd, 0);
genProduceReg(treeNode);
break;
break;
case GT_CLS_VAR_ADDR:
- emit->emitIns_R_C(INS_lea, EA_PTRSIZE, targetReg, treeNode->gtClsVar.gtClsVarHnd, 0);
+ emit->emitIns_R_C(INS_lea, EA_PTRSIZE, targetReg, treeNode->AsClsVar()->gtClsVarHnd, 0);
genProduceReg(treeNode);
break;
case GT_CLS_VAR_ADDR:
{
- emit->emitIns_R_C_I(ins, size, dstReg, memBase->gtClsVar.gtClsVarHnd, 0, ival);
+ emit->emitIns_R_C_I(ins, size, dstReg, memBase->AsClsVar()->gtClsVarHnd, 0, ival);
return;
}
if ((memBase != nullptr) && memBase->isContained() && (memBase->OperGet() == GT_CLS_VAR_ADDR))
{
- CORINFO_FIELD_HANDLE fldHnd = memBase->gtClsVar.gtClsVarHnd;
+ CORINFO_FIELD_HANDLE fldHnd = memBase->AsClsVar()->gtClsVarHnd;
// Static always need relocs
if (!jitStaticFldIsGlobAddr(fldHnd))
if (addr->OperGet() == GT_CLS_VAR_ADDR)
{
- emitIns_R_C(ins, attr, dstReg, addr->gtClsVar.gtClsVarHnd, 0);
+ emitIns_R_C(ins, attr, dstReg, addr->AsClsVar()->gtClsVarHnd, 0);
return;
}
{
if (data->isContainedIntOrIImmed())
{
- emitIns_C_I(ins, attr, addr->gtClsVar.gtClsVarHnd, 0, (int)data->AsIntConCommon()->IconValue());
+ emitIns_C_I(ins, attr, addr->AsClsVar()->gtClsVarHnd, 0, (int)data->AsIntConCommon()->IconValue());
}
else
{
assert(!data->isContained());
- emitIns_C_R(ins, attr, addr->gtClsVar.gtClsVarHnd, data->GetRegNum(), 0);
+ emitIns_C_R(ins, attr, addr->AsClsVar()->gtClsVarHnd, data->GetRegNum(), 0);
}
return;
}
{
// src is a class static variable
// dst is implicit - RDX:RAX
- emitIns_C(ins, attr, memBase->gtClsVar.gtClsVarHnd, 0);
+ emitIns_C(ins, attr, memBase->AsClsVar()->gtClsVarHnd, 0);
}
else
{
// src is a class static variable
// dst is a register
- emitIns_R_C(ins, attr, dst->GetRegNum(), memBase->gtClsVar.gtClsVarHnd, 0);
+ emitIns_R_C(ins, attr, dst->GetRegNum(), memBase->AsClsVar()->gtClsVarHnd, 0);
}
}
else
// src is an contained immediate
// dst is a class static variable
- emitIns_C_I(ins, attr, memBase->gtClsVar.gtClsVarHnd, 0,
+ emitIns_C_I(ins, attr, memBase->AsClsVar()->gtClsVarHnd, 0,
(int)src->AsIntConCommon()->IconValue());
}
else
// src is a register
// dst is a class static variable
- emitIns_C_R(ins, attr, memBase->gtClsVar.gtClsVarHnd, src->GetRegNum(), 0);
+ emitIns_C_R(ins, attr, memBase->AsClsVar()->gtClsVarHnd, src->GetRegNum(), 0);
}
}
return true;
case GT_CLS_VAR:
- if (op1->gtClsVar.gtClsVarHnd != op2->gtClsVar.gtClsVarHnd)
+ if (op1->AsClsVar()->gtClsVarHnd != op2->AsClsVar()->gtClsVarHnd)
{
break;
}
case GT_CLS_VAR:
copy = new (this, GT_CLS_VAR)
- GenTreeClsVar(tree->gtType, tree->gtClsVar.gtClsVarHnd, tree->gtClsVar.gtFieldSeq);
+ GenTreeClsVar(tree->gtType, tree->AsClsVar()->gtClsVarHnd, tree->AsClsVar()->gtFieldSeq);
break;
default:
case GT_CLS_VAR:
copy = new (this, GT_CLS_VAR)
- GenTreeClsVar(tree->TypeGet(), tree->gtClsVar.gtClsVarHnd, tree->gtClsVar.gtFieldSeq);
+ GenTreeClsVar(tree->TypeGet(), tree->AsClsVar()->gtClsVarHnd, tree->AsClsVar()->gtFieldSeq);
goto DONE;
case GT_RET_EXPR:
break;
case GT_CLS_VAR:
- if (op1->gtClsVar.gtClsVarHnd == op2->gtClsVar.gtClsVarHnd)
+ if (op1->AsClsVar()->gtClsVarHnd == op2->AsClsVar()->gtClsVarHnd)
{
return true;
}
break;
case GT_CLS_VAR:
- printf(" Hnd=%#x", dspPtr(tree->gtClsVar.gtClsVarHnd));
- gtDispFieldSeq(tree->gtClsVar.gtFieldSeq);
+ printf(" Hnd=%#x", dspPtr(tree->AsClsVar()->gtClsVarHnd));
+ gtDispFieldSeq(tree->AsClsVar()->gtFieldSeq);
break;
case GT_CLS_VAR_ADDR:
- printf(" Hnd=%#x", dspPtr(tree->gtClsVar.gtClsVarHnd));
+ printf(" Hnd=%#x", dspPtr(tree->AsClsVar()->gtClsVarHnd));
break;
case GT_LABEL:
}
else if (Addr()->gtOper == GT_CLS_VAR_ADDR)
{
- return static_cast<ssize_t>(reinterpret_cast<intptr_t>(Addr()->gtClsVar.gtClsVarHnd));
+ return static_cast<ssize_t>(reinterpret_cast<intptr_t>(Addr()->AsClsVar()->gtClsVarHnd));
}
else if (Addr()->IsCnsIntOrI() && Addr()->isContained())
{
pointers) must be flagged as 'large' in GenTree::InitNodeSize().
*/
-/* gtClsVar -- 'static data member' (GT_CLS_VAR) */
+/* AsClsVar() -- 'static data member' (GT_CLS_VAR) */
struct GenTreeClsVar : public GenTree
{
case GT_CLS_VAR_ADDR:
{
- emit->emitIns_SIMD_R_R_C(ins, attr, targetReg, op1Reg, addr->gtClsVar.gtClsVarHnd, 0);
+ emit->emitIns_SIMD_R_R_C(ins, attr, targetReg, op1Reg, addr->AsClsVar()->gtClsVarHnd, 0);
return;
}
case GT_CLS_VAR_ADDR:
{
- emit->emitIns_SIMD_R_R_C_I(ins, simdSize, targetReg, op1Reg, addr->gtClsVar.gtClsVarHnd, 0, ival);
+ emit->emitIns_SIMD_R_R_C_I(ins, simdSize, targetReg, op1Reg, addr->AsClsVar()->gtClsVarHnd, 0,
+ ival);
return;
}
case GT_CLS_VAR_ADDR:
{
- emit->emitIns_SIMD_R_R_C_R(ins, simdSize, targetReg, op1Reg, op3Reg, addr->gtClsVar.gtClsVarHnd, 0);
+ emit->emitIns_SIMD_R_R_C_R(ins, simdSize, targetReg, op1Reg, op3Reg, addr->AsClsVar()->gtClsVarHnd,
+ 0);
return;
}
if (shfv)
{
- GetEmitter()->emitIns_C_I(ins, size, tree->gtClsVar.gtClsVarHnd, offs, shfv);
+ GetEmitter()->emitIns_C_I(ins, size, tree->AsClsVar()->gtClsVarHnd, offs, shfv);
}
else
{
- GetEmitter()->emitIns_C(ins, size, tree->gtClsVar.gtClsVarHnd, offs);
+ GetEmitter()->emitIns_C(ins, size, tree->AsClsVar()->gtClsVarHnd, offs);
}
return;
else
#endif // CPU_LOAD_STORE_ARCH
{
- GetEmitter()->emitIns_C_R(ins, size, tree->gtClsVar.gtClsVarHnd, reg, offs);
+ GetEmitter()->emitIns_C_R(ins, size, tree->AsClsVar()->gtClsVarHnd, reg, offs);
}
return;
#if CPU_LOAD_STORE_ARCH
assert(!"GT_CLS_VAR not supported in ARM backend");
-#else // CPU_LOAD_STORE_ARCH
- GetEmitter()->emitIns_R_C(ins, size, reg, tree->gtClsVar.gtClsVarHnd, offs);
+#else // CPU_LOAD_STORE_ARCH
+ GetEmitter()->emitIns_R_C(ins, size, reg, tree->AsClsVar()->gtClsVarHnd, offs);
#endif // CPU_LOAD_STORE_ARCH
return;
case GT_CLS_VAR_ADDR:
{
- GetEmitter()->emitIns_R_C_I(ins, attr, reg1, addr->gtClsVar.gtClsVarHnd, 0, ival);
+ GetEmitter()->emitIns_R_C_I(ins, attr, reg1, addr->AsClsVar()->gtClsVarHnd, 0, ival);
return;
}
case GT_LCL_VAR_ADDR:
return tree1->gtLclVarCommon.GetLclNum() == tree2->gtLclVarCommon.GetLclNum();
case GT_CLS_VAR_ADDR:
- return tree1->gtClsVar.gtClsVarHnd == tree2->gtClsVar.gtClsVarHnd;
+ return tree1->AsClsVar()->gtClsVarHnd == tree2->AsClsVar()->gtClsVarHnd;
default:
return false;
}
static_assert_no_msg(GTF_FLD_VOLATILE == GTF_CLS_VAR_VOLATILE);
static_assert_no_msg(GTF_FLD_INITCLASS == GTF_CLS_VAR_INITCLASS);
tree->SetOper(GT_CLS_VAR);
- tree->gtClsVar.gtClsVarHnd = symHnd;
+ tree->AsClsVar()->gtClsVarHnd = symHnd;
FieldSeqNode* fieldSeq =
fieldMayOverlap ? FieldSeqStore::NotAField() : GetFieldSeqStore()->CreateSingleton(symHnd);
- tree->gtClsVar.gtFieldSeq = fieldSeq;
+ tree->AsClsVar()->gtFieldSeq = fieldSeq;
}
return tree;
}
else if (lhs->OperGet() == GT_CLS_VAR)
{
- AddModifiedFieldAllContainingLoops(mostNestedLoop, lhs->gtClsVar.gtClsVarHnd);
+ AddModifiedFieldAllContainingLoops(mostNestedLoop, lhs->AsClsVar()->gtClsVarHnd);
// Conservatively assume byrefs may alias this static field
memoryHavoc |= memoryKindSet(ByrefExposed);
}
// We model statics as indices into GcHeap (which is a subset of ByrefExposed).
FieldSeqNode* fldSeqForStaticVar =
- GetFieldSeqStore()->CreateSingleton(tree->gtClsVar.gtClsVarHnd);
+ GetFieldSeqStore()->CreateSingleton(tree->AsClsVar()->gtClsVarHnd);
size_t structSize = 0;
selectedStaticVar = vnStore->VNApplySelectors(VNK_Liberal, fgCurMemoryVN[GcHeap],
fldSeqForStaticVar, &structSize);
}
// We model statics as indices into GcHeap (which is a subset of ByrefExposed).
- FieldSeqNode* fldSeqForStaticVar = GetFieldSeqStore()->CreateSingleton(lhs->gtClsVar.gtClsVarHnd);
+ FieldSeqNode* fldSeqForStaticVar =
+ GetFieldSeqStore()->CreateSingleton(lhs->AsClsVar()->gtClsVarHnd);
assert(fldSeqForStaticVar != FieldSeqStore::NotAField());
ValueNum storeVal = rhsVNPair.GetLiberal(); // The value number from the rhs of the assignment