Difference between revisions of "NuPlusFrameLowering class"

From NaplesPU Documentation
Jump to: navigation, search
(Created page with "The NuPlusFrameLowering class must handle all the operations concerning the stack frame. It implements the '''TargetFrameLowering''' interface. In nu+ the stack grows increme...")
 
Line 2: Line 2:
 
In nu+ the stack grows incrementing the address (i.e. the stack grows down) and it is 64-byte aligned.  
 
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:
 
The NuPlusFrameLowering implements the following functions:
*emitPrologue and emitEpilogue, which insert prolog and epilog code into the function.
+
*'''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.
+
*'''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.
+
*'''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.
+
*'''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.
+
*'''determineCalleeSaves''', determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() should actually get saved.

Revision as of 12:32, 13 October 2017

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.