#ifdef _TARGET_ARM64_
virtual void SetSaveFpLrWithAllCalleeSavedRegisters(bool value);
- virtual bool IsSaveFpLrWithAllCalleeSavedRegisters();
+ virtual bool IsSaveFpLrWithAllCalleeSavedRegisters() const;
bool genSaveFpLrWithAllCalleeSavedRegisters;
#endif // _TARGET_ARM64_
// genSPtoFPdelta - return offset from the stack pointer (Initial-SP) to the frame pointer. The frame pointer
// will point to the saved frame pointer slot (i.e., there will be frame pointer chaining).
//
-int CodeGenInterface::genSPtoFPdelta()
+int CodeGenInterface::genSPtoFPdelta() const
{
assert(isFramePointerUsed());
int delta = -1; // initialization to illegal value
// Total frame size
//
-int CodeGenInterface::genTotalFrameSize()
+int CodeGenInterface::genTotalFrameSize() const
{
// For varargs functions, we home all the incoming register arguments. They are not
// included in the compCalleeRegsPushed count. This is like prespill on ARM32, but
//
// There must be a frame pointer to call this function!
-int CodeGenInterface::genCallerSPtoFPdelta()
+int CodeGenInterface::genCallerSPtoFPdelta() const
{
assert(isFramePointerUsed());
int callerSPtoFPdelta;
//
// This number will be negative.
-int CodeGenInterface::genCallerSPtoInitialSPdelta()
+int CodeGenInterface::genCallerSPtoInitialSPdelta() const
{
int callerSPtoSPdelta = 0;
// IsSaveFpLrWithAllCalleeSavedRegisters - Return the value that indicates where FP/LR registers
// are stored in the prolog.
//
-bool CodeGen::IsSaveFpLrWithAllCalleeSavedRegisters()
+bool CodeGen::IsSaveFpLrWithAllCalleeSavedRegisters() const
{
return genSaveFpLrWithAllCalleeSavedRegisters;
}
// Return value:
// Frame size
-int CodeGenInterface::genTotalFrameSize()
+int CodeGenInterface::genTotalFrameSize() const
{
assert(!IsUninitialized(compiler->compCalleeRegsPushed));
//
// There must be a frame pointer to call this function!
-int CodeGenInterface::genSPtoFPdelta()
+int CodeGenInterface::genSPtoFPdelta() const
{
assert(isFramePointerUsed());
//
// There must be a frame pointer to call this function!
-int CodeGenInterface::genCallerSPtoFPdelta()
+int CodeGenInterface::genCallerSPtoFPdelta() const
{
assert(isFramePointerUsed());
int callerSPtoFPdelta = 0;
//
// This number will be negative.
-int CodeGenInterface::genCallerSPtoInitialSPdelta()
+int CodeGenInterface::genCallerSPtoInitialSPdelta() const
{
int callerSPtoSPdelta = 0;
}
public:
- int genCallerSPtoFPdelta();
- int genCallerSPtoInitialSPdelta();
- int genSPtoFPdelta();
- int genTotalFrameSize();
+ int genCallerSPtoFPdelta() const;
+ int genCallerSPtoInitialSPdelta() const;
+ int genSPtoFPdelta() const;
+ int genTotalFrameSize() const;
#ifdef _TARGET_ARM64_
virtual void SetSaveFpLrWithAllCalleeSavedRegisters(bool value) = 0;
- virtual bool IsSaveFpLrWithAllCalleeSavedRegisters() = 0;
+ virtual bool IsSaveFpLrWithAllCalleeSavedRegisters() const = 0;
#endif // _TARGET_ARM64_
regNumber genGetThisArgReg(GenTreeCall* call) const;
TempDsc* getSpillTempDsc(GenTree* tree);
public:
- emitter* getEmitter()
+ emitter* getEmitter() const
{
return m_cgEmitter;
}
// Helper functions
- bool vlIsInReg(regNumber reg);
- bool vlIsOnStk(regNumber reg, signed offset);
+ bool vlIsInReg(regNumber reg) const;
+ bool vlIsOnStk(regNumber reg, signed offset) const;
siVarLoc(const LclVarDsc* varDsc, regNumber baseReg, int offset, bool isFramePointerUsed);
siVarLoc(){};
}
#ifdef _TARGET_AMD64_
-int CodeGenInterface::genSPtoFPdelta()
+int CodeGenInterface::genSPtoFPdelta() const
{
int delta;
// Total frame size
//
-int CodeGenInterface::genTotalFrameSize()
+int CodeGenInterface::genTotalFrameSize() const
{
assert(!IsUninitialized(compiler->compCalleeRegsPushed));
// is based on a maximum delta from Initial-SP, so first we find SP, then
// compute the FP offset.
-int CodeGenInterface::genCallerSPtoFPdelta()
+int CodeGenInterface::genCallerSPtoFPdelta() const
{
assert(isFramePointerUsed());
int callerSPtoFPdelta;
//
// This number will be negative.
-int CodeGenInterface::genCallerSPtoInitialSPdelta()
+int CodeGenInterface::genCallerSPtoInitialSPdelta() const
{
int callerSPtoSPdelta = 0;
unsigned lvaFrameSize(FrameLayoutState curState);
// Returns the caller-SP-relative offset for the SP/FP relative offset determined by FP based.
- int lvaToCallerSPRelativeOffset(int offs, bool isFpBased);
+ int lvaToCallerSPRelativeOffset(int offs, bool isFpBased) const;
// Returns the caller-SP-relative offset for the local variable "varNum."
int lvaGetCallerSPRelativeOffset(unsigned varNum);
// the setter on CodeGenContext directly.
__declspec(property(get = getEmitter)) emitter* genEmitter;
- emitter* getEmitter()
+ emitter* getEmitter() const
{
return codeGen->getEmitter();
}
unsigned compArgSize; // total size of arguments in bytes (including register args (lvIsRegArg))
- unsigned compMapILargNum(unsigned ILargNum); // map accounting for hidden args
- unsigned compMapILvarNum(unsigned ILvarNum); // map accounting for hidden args
- unsigned compMap2ILvarNum(unsigned varNum); // map accounting for hidden args
+ unsigned compMapILargNum(unsigned ILargNum); // map accounting for hidden args
+ unsigned compMapILvarNum(unsigned ILvarNum); // map accounting for hidden args
+ unsigned compMap2ILvarNum(unsigned varNum) const; // map accounting for hidden args
//-------------------------------------------------------------------------
#endif // LOOP_HOIST_STATS
bool compIsForImportOnly();
- bool compIsForInlining();
+ bool compIsForInlining() const;
bool compDonotInline();
#ifdef DEBUG
* Returns true if the compiler instance is created for inlining.
*/
-inline bool Compiler::compIsForInlining()
+inline bool Compiler::compIsForInlining() const
{
return (impInlineInfo != nullptr);
}
* Returns UNKNOWN_ILNUM if it can't be mapped.
*/
-unsigned Compiler::compMap2ILvarNum(unsigned varNum)
+unsigned Compiler::compMap2ILvarNum(unsigned varNum) const
{
if (compIsForInlining())
{
return lvaToCallerSPRelativeOffset(varDsc->lvStkOffs, varDsc->lvFramePointerBased);
}
-int Compiler::lvaToCallerSPRelativeOffset(int offset, bool isFpBased)
+int Compiler::lvaToCallerSPRelativeOffset(int offset, bool isFpBased) const
{
assert(lvaDoneFrameLayout == FINAL_FRAME_LAYOUT);
RegSet(Compiler* compiler, GCInfo& gcInfo);
#ifdef _TARGET_ARM_
- regMaskTP rsMaskPreSpillRegs(bool includeAlignment)
+ regMaskTP rsMaskPreSpillRegs(bool includeAlignment) const
{
return includeAlignment ? (rsMaskPreSpillRegArg | rsMaskPreSpillAlign) : rsMaskPreSpillRegArg;
}
#include "emit.h"
#include "codegen.h"
-bool CodeGenInterface::siVarLoc::vlIsInReg(regNumber reg)
+bool CodeGenInterface::siVarLoc::vlIsInReg(regNumber reg) const
{
switch (vlType)
{
}
}
-bool CodeGenInterface::siVarLoc::vlIsOnStk(regNumber reg, signed offset)
+bool CodeGenInterface::siVarLoc::vlIsOnStk(regNumber reg, signed offset) const
{
regNumber actualReg;