LLVM  6.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::MCCFIInstruction Class Reference

#include "llvm/MC/MCDwarf.h"

Collaboration diagram for llvm::MCCFIInstruction:
Collaboration graph
[legend]

Public Types

enum  OpType {
  OpSameValue, OpRememberState, OpRestoreState, OpOffset,
  OpDefCfaRegister, OpDefCfaOffset, OpDefCfa, OpRelOffset,
  OpAdjustCfaOffset, OpEscape, OpRestore, OpUndefined,
  OpRegister, OpWindowSave, OpGnuArgsSize
}
 

Public Member Functions

OpType getOperation () const
 
MCSymbolgetLabel () const
 
unsigned getRegister () const
 
unsigned getRegister2 () const
 
int getOffset () const
 
StringRef getValues () const
 

Static Public Member Functions

static MCCFIInstruction createDefCfa (MCSymbol *L, unsigned Register, int Offset)
 .cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it. More...
 
static MCCFIInstruction createDefCfaRegister (MCSymbol *L, unsigned Register)
 .cfi_def_cfa_register modifies a rule for computing CFA. More...
 
static MCCFIInstruction createDefCfaOffset (MCSymbol *L, int Offset)
 .cfi_def_cfa_offset modifies a rule for computing CFA. More...
 
static MCCFIInstruction createAdjustCfaOffset (MCSymbol *L, int Adjustment)
 .cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but Offset is a relative value that is added/subtracted from the previous offset. More...
 
static MCCFIInstruction createOffset (MCSymbol *L, unsigned Register, int Offset)
 .cfi_offset Previous value of Register is saved at offset Offset from CFA. More...
 
static MCCFIInstruction createRelOffset (MCSymbol *L, unsigned Register, int Offset)
 .cfi_rel_offset Previous value of Register is saved at offset Offset from the current CFA register. More...
 
static MCCFIInstruction createRegister (MCSymbol *L, unsigned Register1, unsigned Register2)
 .cfi_register Previous value of Register1 is saved in register Register2. More...
 
static MCCFIInstruction createWindowSave (MCSymbol *L)
 .cfi_window_save SPARC register window is saved. More...
 
static MCCFIInstruction createRestore (MCSymbol *L, unsigned Register)
 .cfi_restore says that the rule for Register is now the same as it was at the beginning of the function, after all initial instructions added by .cfi_startproc were executed. More...
 
static MCCFIInstruction createUndefined (MCSymbol *L, unsigned Register)
 .cfi_undefined From now on the previous value of Register can't be restored anymore. More...
 
static MCCFIInstruction createSameValue (MCSymbol *L, unsigned Register)
 .cfi_same_value Current value of Register is the same as in the previous frame. More...
 
static MCCFIInstruction createRememberState (MCSymbol *L)
 .cfi_remember_state Save all current rules for all registers. More...
 
static MCCFIInstruction createRestoreState (MCSymbol *L)
 .cfi_restore_state Restore the previously saved state. More...
 
static MCCFIInstruction createEscape (MCSymbol *L, StringRef Vals)
 .cfi_escape Allows the user to add arbitrary bytes to the unwind info. More...
 
static MCCFIInstruction createGnuArgsSize (MCSymbol *L, int Size)
 A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE. More...
 

Detailed Description

Definition at line 333 of file MCDwarf.h.

Member Enumeration Documentation

◆ OpType

Enumerator
OpSameValue 
OpRememberState 
OpRestoreState 
OpOffset 
OpDefCfaRegister 
OpDefCfaOffset 
OpDefCfa 
OpRelOffset 
OpAdjustCfaOffset 
OpEscape 
OpRestore 
OpUndefined 
OpRegister 
OpWindowSave 
OpGnuArgsSize 

Definition at line 335 of file MCDwarf.h.

Member Function Documentation

◆ createAdjustCfaOffset()

static MCCFIInstruction llvm::MCCFIInstruction::createAdjustCfaOffset ( MCSymbol L,
int  Adjustment 
)
inlinestatic

.cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but Offset is a relative value that is added/subtracted from the previous offset.

Definition at line 398 of file MCDwarf.h.

Referenced by llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::MCStreamer::EmitCFIAdjustCfaOffset(), and ExpandMOVImmSExti8().

◆ createDefCfa()

static MCCFIInstruction llvm::MCCFIInstruction::createDefCfa ( MCSymbol L,
unsigned  Register,
int  Offset 
)
inlinestatic

◆ createDefCfaOffset()

static MCCFIInstruction llvm::MCCFIInstruction::createDefCfaOffset ( MCSymbol L,
int  Offset 
)
inlinestatic

◆ createDefCfaRegister()

static MCCFIInstruction llvm::MCCFIInstruction::createDefCfaRegister ( MCSymbol L,
unsigned  Register 
)
inlinestatic

◆ createEscape()

static MCCFIInstruction llvm::MCCFIInstruction::createEscape ( MCSymbol L,
StringRef  Vals 
)
inlinestatic

.cfi_escape Allows the user to add arbitrary bytes to the unwind info.

Definition at line 460 of file MCDwarf.h.

Referenced by llvm::MCStreamer::EmitCFIEscape().

◆ createGnuArgsSize()

static MCCFIInstruction llvm::MCCFIInstruction::createGnuArgsSize ( MCSymbol L,
int  Size 
)
inlinestatic

A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE.

Definition at line 465 of file MCDwarf.h.

Referenced by llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), and llvm::MCStreamer::EmitCFIGnuArgsSize().

◆ createOffset()

static MCCFIInstruction llvm::MCCFIInstruction::createOffset ( MCSymbol L,
unsigned  Register,
int  Offset 
)
inlinestatic

◆ createRegister()

static MCCFIInstruction llvm::MCCFIInstruction::createRegister ( MCSymbol L,
unsigned  Register1,
unsigned  Register2 
)
inlinestatic

.cfi_register Previous value of Register1 is saved in register Register2.

Definition at line 419 of file MCDwarf.h.

Referenced by llvm::MCStreamer::EmitCFIRegister(), and llvm::SparcFrameLowering::emitPrologue().

◆ createRelOffset()

static MCCFIInstruction llvm::MCCFIInstruction::createRelOffset ( MCSymbol L,
unsigned  Register,
int  Offset 
)
inlinestatic

.cfi_rel_offset Previous value of Register is saved at offset Offset from the current CFA register.

This is transformed to .cfi_offset using the known displacement of the CFA register from the CFA.

Definition at line 412 of file MCDwarf.h.

Referenced by llvm::MCStreamer::EmitCFIRelOffset().

◆ createRememberState()

static MCCFIInstruction llvm::MCCFIInstruction::createRememberState ( MCSymbol L)
inlinestatic

.cfi_remember_state Save all current rules for all registers.

Definition at line 449 of file MCDwarf.h.

Referenced by llvm::MCStreamer::EmitCFIRememberState().

◆ createRestore()

static MCCFIInstruction llvm::MCCFIInstruction::createRestore ( MCSymbol L,
unsigned  Register 
)
inlinestatic

.cfi_restore says that the rule for Register is now the same as it was at the beginning of the function, after all initial instructions added by .cfi_startproc were executed.

Definition at line 432 of file MCDwarf.h.

Referenced by llvm::MCStreamer::EmitCFIRestore().

◆ createRestoreState()

static MCCFIInstruction llvm::MCCFIInstruction::createRestoreState ( MCSymbol L)
inlinestatic

.cfi_restore_state Restore the previously saved state.

Definition at line 454 of file MCDwarf.h.

Referenced by llvm::MCStreamer::EmitCFIRestoreState().

◆ createSameValue()

static MCCFIInstruction llvm::MCCFIInstruction::createSameValue ( MCSymbol L,
unsigned  Register 
)
inlinestatic

.cfi_same_value Current value of Register is the same as in the previous frame.

I.e., no restoration is needed.

Definition at line 444 of file MCDwarf.h.

Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::MCStreamer::EmitCFISameValue(), and isImplicitOperandIn().

◆ createUndefined()

static MCCFIInstruction llvm::MCCFIInstruction::createUndefined ( MCSymbol L,
unsigned  Register 
)
inlinestatic

.cfi_undefined From now on the previous value of Register can't be restored anymore.

Definition at line 438 of file MCDwarf.h.

Referenced by llvm::MCStreamer::EmitCFIUndefined().

◆ createWindowSave()

static MCCFIInstruction llvm::MCCFIInstruction::createWindowSave ( MCSymbol L)
inlinestatic

.cfi_window_save SPARC register window is saved.

Definition at line 425 of file MCDwarf.h.

Referenced by llvm::MCStreamer::EmitCFIWindowSave(), and llvm::SparcFrameLowering::emitPrologue().

◆ getLabel()

MCSymbol* llvm::MCCFIInstruction::getLabel ( ) const
inline

Definition at line 470 of file MCDwarf.h.

Referenced by emitEncodingByte(), and llvm::MIPrinter::print().

◆ getOffset()

int llvm::MCCFIInstruction::getOffset ( ) const
inline

◆ getOperation()

OpType llvm::MCCFIInstruction::getOperation ( ) const
inline

◆ getRegister()

unsigned llvm::MCCFIInstruction::getRegister ( ) const
inline

◆ getRegister2()

unsigned llvm::MCCFIInstruction::getRegister2 ( ) const
inline

Definition at line 480 of file MCDwarf.h.

References assert().

Referenced by llvm::AsmPrinter::emitCFIInstruction(), and emitEncodingByte().

◆ getValues()

StringRef llvm::MCCFIInstruction::getValues ( ) const
inline

Definition at line 492 of file MCDwarf.h.

References assert().

Referenced by llvm::AsmPrinter::emitCFIInstruction(), and emitEncodingByte().

Member Data Documentation

◆ Offset

int llvm::MCCFIInstruction::Offset

Definition at line 358 of file MCDwarf.h.

◆ Register2

unsigned llvm::MCCFIInstruction::Register2

Definition at line 359 of file MCDwarf.h.


The documentation for this class was generated from the following file: