bool genUseBlockInit; // true if we plan to block-initialize the local stack frame
unsigned genInitStkLclCnt; // The count of local variables that we need to zero init
- // Keeps track of how many bytes we've pushed on the processor's stack.
- //
- unsigned genStackLevel;
-
void SubtractStackLevel(unsigned adjustment)
{
assert(genStackLevel >= adjustment);
}
#endif // defined(DEBUG) && defined(_TARGET_XARCH_)
+
+unsigned CodeGenInterface::getCurrentStackLevel() const
+{
+ return genStackLevel;
+}
const LclVarDsc* varDsc, var_types type, regNumber baseReg, int offset, bool isFramePointerUsed);
};
+public:
+ unsigned getCurrentStackLevel() const;
+
+protected:
+ // Keeps track of how many bytes we've pushed on the processor's stack.
+ unsigned genStackLevel;
+
#ifdef LATE_DISASM
public:
virtual const char* siRegVarName(size_t offs, size_t size, unsigned reg) = 0;
// Make sure a set is allocated for compiler->compCurLife (in the long case), so we can set it to empty without
// allocation at the start of each basic block.
VarSetOps::AssignNoCopy(compiler, compiler->compCurLife, VarSetOps::MakeEmpty(compiler));
+
+ // We initialize the stack level before first "BasicBlock" code is generated in case we need to report stack
+ // variable needs home and so its stack offset.
+ SetStackLevel(0);
}
//------------------------------------------------------------------------