NaplesPUFrameLowering.cpp

From NaplesPU Documentation
Revision as of 13:47, 9 June 2018 by Edo (talk | contribs) (Created page with "Category:C++ Classes The NuPlusFrameLowering class must handle all the operations concerning the stack frame. It implements the '''TargetFrameLowering''' interface. In nu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The NuPlusFrameLowering class must handle all the operations concerning the stack frame. It implements the TargetFrameLowering interface. In nu+ the stack grows incrementing the address (i.e. the stack grows down) and it is 64-byte aligned. The NuPlusFrameLowering implements the following functions:

  • emitPrologue and emitEpilogue, which insert prolog and epilog code into the function.
  • eliminateCallFramePseudoInstr, responsible for eliminating call frame setup and destroy pseudo instructions, replacing them with concrete instructions.
  • hasReservedCallFrame, returns true if the prologue inserter should reserve space for outgoing arguments.
  • hasFP, returns true if the specified function should have a dedicated frame pointer register. This is true if the function has variable sized allocas or if frame pointer elimination is disabled.
  • determineCalleeSaves, determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() should actually get saved.