LLVM 20.0.0git
|
#include "llvm/MC/MCDwarf.h"
Public Types | |
enum | OpType : uint8_t { OpSameValue , OpRememberState , OpRestoreState , OpOffset , OpLLVMDefAspaceCfa , OpDefCfaRegister , OpDefCfaOffset , OpDefCfa , OpRelOffset , OpAdjustCfaOffset , OpEscape , OpRestore , OpUndefined , OpRegister , OpWindowSave , OpNegateRAState , OpNegateRAStateWithPC , OpGnuArgsSize , OpLabel , OpValOffset } |
Public Member Functions | |
OpType | getOperation () const |
MCSymbol * | getLabel () const |
unsigned | getRegister () const |
unsigned | getRegister2 () const |
unsigned | getAddressSpace () const |
int64_t | getOffset () const |
MCSymbol * | getCfiLabel () const |
StringRef | getValues () const |
StringRef | getComment () const |
SMLoc | getLoc () const |
Static Public Member Functions | |
static MCCFIInstruction | cfiDefCfa (MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={}) |
.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it. | |
static MCCFIInstruction | createDefCfaRegister (MCSymbol *L, unsigned Register, SMLoc Loc={}) |
.cfi_def_cfa_register modifies a rule for computing CFA. | |
static MCCFIInstruction | cfiDefCfaOffset (MCSymbol *L, int64_t Offset, SMLoc Loc={}) |
.cfi_def_cfa_offset modifies a rule for computing CFA. | |
static MCCFIInstruction | createAdjustCfaOffset (MCSymbol *L, int64_t Adjustment, SMLoc Loc={}) |
.cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but Offset is a relative value that is added/subtracted from the previous offset. | |
static MCCFIInstruction | createLLVMDefAspaceCfa (MCSymbol *L, unsigned Register, int64_t Offset, unsigned AddressSpace, SMLoc Loc) |
.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. | |
static MCCFIInstruction | createOffset (MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={}) |
.cfi_offset Previous value of Register is saved at offset Offset from CFA. | |
static MCCFIInstruction | createRelOffset (MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={}) |
.cfi_rel_offset Previous value of Register is saved at offset Offset from the current CFA register. | |
static MCCFIInstruction | createRegister (MCSymbol *L, unsigned Register1, unsigned Register2, SMLoc Loc={}) |
.cfi_register Previous value of Register1 is saved in register Register2. | |
static MCCFIInstruction | createWindowSave (MCSymbol *L, SMLoc Loc={}) |
.cfi_window_save SPARC register window is saved. | |
static MCCFIInstruction | createNegateRAState (MCSymbol *L, SMLoc Loc={}) |
.cfi_negate_ra_state AArch64 negate RA state. | |
static MCCFIInstruction | createNegateRAStateWithPC (MCSymbol *L, SMLoc Loc={}) |
.cfi_negate_ra_state_with_pc AArch64 negate RA state with PC. | |
static MCCFIInstruction | createRestore (MCSymbol *L, unsigned Register, SMLoc Loc={}) |
.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. | |
static MCCFIInstruction | createUndefined (MCSymbol *L, unsigned Register, SMLoc Loc={}) |
.cfi_undefined From now on the previous value of Register can't be restored anymore. | |
static MCCFIInstruction | createSameValue (MCSymbol *L, unsigned Register, SMLoc Loc={}) |
.cfi_same_value Current value of Register is the same as in the previous frame. | |
static MCCFIInstruction | createRememberState (MCSymbol *L, SMLoc Loc={}) |
.cfi_remember_state Save all current rules for all registers. | |
static MCCFIInstruction | createRestoreState (MCSymbol *L, SMLoc Loc={}) |
.cfi_restore_state Restore the previously saved state. | |
static MCCFIInstruction | createEscape (MCSymbol *L, StringRef Vals, SMLoc Loc={}, StringRef Comment="") |
.cfi_escape Allows the user to add arbitrary bytes to the unwind info. | |
static MCCFIInstruction | createGnuArgsSize (MCSymbol *L, int64_t Size, SMLoc Loc={}) |
A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE. | |
static MCCFIInstruction | createLabel (MCSymbol *L, MCSymbol *CfiLabel, SMLoc Loc) |
static MCCFIInstruction | createValOffset (MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={}) |
.cfi_val_offset Previous value of Register is offset Offset from the current CFA register. | |
|
inlinestatic |
.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it.
Definition at line 575 of file MCDwarf.h.
Referenced by llvm::RISCVFrameLowering::allocateStack(), createAArch64MCAsmInfo(), createARCMCAsmInfo(), createARMMCAsmInfo(), createCSKYMCAsmInfo(), llvm::createDefCFA(), createHexagonMCAsmInfo(), createLoongArchMCAsmInfo(), createM68kMCAsmInfo(), createMSP430MCAsmInfo(), createPPCMCAsmInfo(), createRISCVMCAsmInfo(), createSparcMCAsmInfo(), createSparcV9MCAsmInfo(), createSystemZMCAsmInfo(), createVEMCAsmInfo(), createX86MCAsmInfo(), createXCoreMCAsmInfo(), llvm::MCStreamer::emitCFIDefCfa(), emitDefineCFAWithFP(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::RISCVFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::LoongArchFrameLowering::emitPrologue(), llvm::RISCVFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::inlineStackProbe(), and llvm::AArch64FrameLowering::resetCFIToInitialState().
|
inlinestatic |
.cfi_def_cfa_offset modifies a rule for computing CFA.
Register remains the same, but offset is new. Note that it is the absolute offset that will be added to a defined register to the compute CFA address.
Definition at line 590 of file MCDwarf.h.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::RISCVFrameLowering::allocateStack(), buildCFAOffs(), llvm::AArch64InstrInfo::buildOutlinedFrame(), convertCalleeSaveRestoreToSPPrePostIncDec(), llvm::createDefCFA(), llvm::MCStreamer::emitCFIDefCfaOffset(), EmitDefCfaOffset(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::RISCVFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::XtensaFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::ARCFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::CSKYFrameLowering::emitPrologue(), llvm::LoongArchFrameLowering::emitPrologue(), llvm::M68kFrameLowering::emitPrologue(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::RISCVFrameLowering::emitPrologue(), and llvm::X86FrameLowering::emitPrologue().
|
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 598 of file MCDwarf.h.
Referenced by llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::M68kFrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::MCStreamer::emitCFIAdjustCfaOffset(), and ExpandMOVImmSExti8().
|
inlinestatic |
.cfi_def_cfa_register modifies a rule for computing CFA.
From now on Register will be used instead of the old one. Offset remains the same.
Definition at line 582 of file MCDwarf.h.
Referenced by llvm::RISCVFrameLowering::allocateStack(), buildDefCFAReg(), createMipsMCAsmInfo(), llvm::MCStreamer::emitCFIDefCfaRegister(), EmitDefCfaRegister(), llvm::XtensaFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::CSKYFrameLowering::emitPrologue(), llvm::M68kFrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), and llvm::PPCFrameLowering::inlineStackProbe().
|
inlinestatic |
.cfi_escape Allows the user to add arbitrary bytes to the unwind info.
Definition at line 687 of file MCDwarf.h.
Referenced by llvm::createCFAOffset(), createDefCFAExpression(), createDefCFAOffset(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::MCStreamer::emitCFIEscape(), llvm::X86FrameLowering::emitPrologue(), emitSCSPrologue(), and emitShadowCallStackPrologue().
|
inlinestatic |
A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE.
Definition at line 693 of file MCDwarf.h.
Referenced by llvm::M68kFrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), and llvm::MCStreamer::emitCFIGnuArgsSize().
|
inlinestatic |
Definition at line 698 of file MCDwarf.h.
References CfiLabel, and OpLabel.
Referenced by llvm::MCStreamer::emitCFILabelDirective().
|
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 607 of file MCDwarf.h.
References Offset, and OpLLVMDefAspaceCfa.
Referenced by llvm::MCStreamer::emitCFILLVMDefAspaceCfa().
|
inlinestatic |
.cfi_negate_ra_state AArch64 negate RA state.
Definition at line 643 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFINegateRAState(), emitPACCFI(), and llvm::AArch64FrameLowering::resetCFIToInitialState().
|
inlinestatic |
.cfi_negate_ra_state_with_pc AArch64 negate RA state with PC.
Definition at line 648 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFINegateRAStateWithPC(), emitPACCFI(), and llvm::AArch64FrameLowering::resetCFIToInitialState().
|
inlinestatic |
.cfi_offset Previous value of Register is saved at offset Offset from CFA.
Definition at line 617 of file MCDwarf.h.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::AArch64InstrInfo::buildOutlinedFrame(), llvm::createCFAOffset(), createM68kMCAsmInfo(), createMSP430MCAsmInfo(), createX86MCAsmInfo(), llvm::MSP430FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMovesFullCFA(), llvm::MCStreamer::emitCFIOffset(), EmitCfiOffset(), llvm::XtensaFrameLowering::emitPrologue(), llvm::ARCFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::CSKYFrameLowering::emitPrologue(), llvm::LoongArchFrameLowering::emitPrologue(), llvm::M68kFrameLowering::emitPrologue(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::SystemZELFFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), and emitVGSaveRestore().
|
inlinestatic |
.cfi_register Previous value of Register1 is saved in register Register2.
Definition at line 632 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFIRegister(), llvm::PPCFrameLowering::emitPrologue(), and llvm::SparcFrameLowering::emitPrologue().
|
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 625 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFIRelOffset().
|
inlinestatic |
.cfi_remember_state Save all current rules for all registers.
Definition at line 676 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFIRememberState(), and insertRememberRestorePair().
|
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 656 of file MCDwarf.h.
Referenced by llvm::MSP430FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), emitCalleeSavedRestores(), llvm::MCStreamer::emitCFIRestore(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), emitSCSEpilogue(), emitShadowCallStackEpilogue(), and emitVGSaveRestore().
|
inlinestatic |
.cfi_restore_state Restore the previously saved state.
Definition at line 681 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFIRestoreState(), and insertRememberRestorePair().
|
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 670 of file MCDwarf.h.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::MCStreamer::emitCFISameValue(), and insertCFISameValue().
|
inlinestatic |
.cfi_undefined From now on the previous value of Register can't be restored anymore.
Definition at line 663 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFIUndefined().
|
inlinestatic |
.cfi_val_offset Previous value of Register is offset Offset from the current CFA register.
Definition at line 705 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFIValOffset().
|
inlinestatic |
.cfi_window_save SPARC register window is saved.
Definition at line 638 of file MCDwarf.h.
Referenced by llvm::MCStreamer::emitCFIWindowSave(), and llvm::SparcFrameLowering::emitPrologue().
|
inline |
Definition at line 730 of file MCDwarf.h.
References assert(), Operation, and OpLLVMDefAspaceCfa.
Referenced by llvm::AsmPrinter::emitCFIInstruction(), and printCFI().
|
inline |
|
inline |
Definition at line 755 of file MCDwarf.h.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
|
inline |
Definition at line 711 of file MCDwarf.h.
Referenced by printCFI().
|
inline |
Definition at line 756 of file MCDwarf.h.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
|
inline |
Definition at line 735 of file MCDwarf.h.
References assert(), OpAdjustCfaOffset, OpDefCfa, OpDefCfaOffset, Operation, OpGnuArgsSize, OpLLVMDefAspaceCfa, OpOffset, OpRelOffset, and OpValOffset.
Referenced by llvm::AsmPrinter::emitCFIInstruction(), and printCFI().
|
inline |
Definition at line 710 of file MCDwarf.h.
References Operation.
Referenced by llvm::X86FrameLowering::BuildCFI(), llvm::AsmPrinter::emitCFIInstruction(), maybeMoveCFI(), llvm::X86FrameLowering::mergeSPUpdates(), and printCFI().
|
inline |
Definition at line 713 of file MCDwarf.h.
References assert(), OpDefCfa, OpDefCfaRegister, Operation, OpLLVMDefAspaceCfa, OpOffset, OpRegister, OpRelOffset, OpRestore, OpSameValue, OpUndefined, and OpValOffset.
Referenced by llvm::AsmPrinter::emitCFIInstruction(), and printCFI().
|
inline |
Definition at line 725 of file MCDwarf.h.
References assert(), Operation, and OpRegister.
Referenced by llvm::AsmPrinter::emitCFIInstruction(), and printCFI().
|
inline |
Definition at line 750 of file MCDwarf.h.
References assert(), Operation, and OpEscape.
Referenced by llvm::AsmPrinter::emitCFIInstruction(), and printCFI().
MCSymbol* llvm::MCCFIInstruction::CfiLabel |
Definition at line 540 of file MCDwarf.h.
Referenced by createLabel().
int64_t llvm::MCCFIInstruction::Offset |
Definition at line 529 of file MCDwarf.h.
Referenced by createLLVMDefAspaceCfa().
struct { ... } llvm::MCCFIInstruction::RI |
struct { ... } llvm::MCCFIInstruction::RIA |
struct { ... } llvm::MCCFIInstruction::RR |