LLVM  14.0.0git
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,
  OpLLVMDefAspaceCfa, OpDefCfaRegister, OpDefCfaOffset, OpDefCfa,
  OpRelOffset, OpAdjustCfaOffset, OpEscape, OpRestore,
  OpUndefined, OpRegister, OpWindowSave, OpNegateRAState,
  OpGnuArgsSize
}
 

Public Member Functions

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

Static Public Member Functions

static MCCFIInstruction cfiDefCfa (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 cfiDefCfaOffset (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 createLLVMDefAspaceCfa (MCSymbol *L, unsigned Register, int Offset, unsigned AddressSpace)
 .cfi_llvm_def_aspace_cfa defines the rule for computing the CFA to be the result of evaluating the DWARF operation expression DW_OP_constu AS; DW_OP_aspace_bregx R, B as a location description. 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 createNegateRAState (MCSymbol *L)
 .cfi_negate_ra_state AArch64 negate RA state. 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, StringRef Comment="")
 .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 434 of file MCDwarf.h.

Member Enumeration Documentation

◆ OpType

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

Definition at line 436 of file MCDwarf.h.

Member Function Documentation

◆ cfiDefCfa()

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

◆ cfiDefCfaOffset()

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

◆ 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 509 of file MCDwarf.h.

References OpAdjustCfaOffset.

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

◆ createDefCfaRegister()

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

◆ createEscape()

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

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

Definition at line 587 of file MCDwarf.h.

References OpEscape.

Referenced by llvm::MCStreamer::emitCFIEscape(), and llvm::AArch64FrameLowering::spillCalleeSavedRegisters().

◆ 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 593 of file MCDwarf.h.

References OpGnuArgsSize, and llvm::Check::Size.

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

◆ createLLVMDefAspaceCfa()

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

.cfi_llvm_def_aspace_cfa defines the rule for computing the CFA to be the result of evaluating the DWARF operation expression DW_OP_constu AS; DW_OP_aspace_bregx R, B as a location description.

Definition at line 517 of file MCDwarf.h.

References Offset, and OpLLVMDefAspaceCfa.

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

◆ createNegateRAState()

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

.cfi_negate_ra_state AArch64 negate RA state.

Definition at line 552 of file MCDwarf.h.

References OpNegateRAState.

Referenced by llvm::MCStreamer::emitCFINegateRAState(), llvm::AArch64FrameLowering::emitPrologue(), and signOutlinedFunction().

◆ 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 541 of file MCDwarf.h.

References OpRegister, and Register2.

Referenced by llvm::MCStreamer::emitCFIRegister(), llvm::SparcFrameLowering::emitPrologue(), and llvm::PPCFrameLowering::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 534 of file MCDwarf.h.

References Offset, and OpRelOffset.

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 576 of file MCDwarf.h.

References OpRememberState.

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 559 of file MCDwarf.h.

References OpRestore.

Referenced by llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::MCStreamer::emitCFIRestore(), and llvm::X86FrameLowering::emitEpilogue().

◆ createRestoreState()

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

.cfi_restore_state Restore the previously saved state.

Definition at line 581 of file MCDwarf.h.

References OpRestoreState.

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 571 of file MCDwarf.h.

References OpSameValue.

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

◆ 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 565 of file MCDwarf.h.

References OpUndefined.

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 547 of file MCDwarf.h.

References OpWindowSave.

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

◆ getAddressSpace()

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

Definition at line 614 of file MCDwarf.h.

References assert(), Operation, and OpLLVMDefAspaceCfa.

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

◆ getComment()

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

Definition at line 632 of file MCDwarf.h.

Referenced by llvm::AsmPrinter::emitCFIInstruction().

◆ getLabel()

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

Definition at line 598 of file MCDwarf.h.

Referenced by printCFI().

◆ 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 609 of file MCDwarf.h.

References assert(), Operation, OpRegister, and Register2.

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

◆ getValues()

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

Definition at line 627 of file MCDwarf.h.

References assert(), Operation, and OpEscape.

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

Member Data Documentation

◆ Offset

int llvm::MCCFIInstruction::Offset

◆ Register2

unsigned llvm::MCCFIInstruction::Register2

Definition at line 462 of file MCDwarf.h.

Referenced by createRegister(), and getRegister2().


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