LLVM 22.0.0git
|
Extension point for target-specific MCExpr subclasses with a relocation specifier, serving as a replacement for MCSymbolRefExpr::VariantKind. More...
#include "llvm/MC/MCExpr.h"
Public Member Functions | |
Spec | getSpecifier () const |
const MCExpr * | getSubExpr () const |
Public Member Functions inherited from llvm::MCExpr | |
MCExpr (const MCExpr &)=delete | |
MCExpr & | operator= (const MCExpr &)=delete |
ExprKind | getKind () const |
SMLoc | getLoc () const |
LLVM_ABI void | dump () const |
LLVM_ABI bool | evaluateAsAbsolute (int64_t &Res) const |
Try to evaluate the expression to an absolute value. | |
LLVM_ABI bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm) const |
LLVM_ABI bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler *Asm) const |
LLVM_ABI bool | evaluateKnownAbsolute (int64_t &Res, const MCAssembler &Asm) const |
Aggressive variant of evaluateAsRelocatable when relocations are unavailable (e.g. | |
LLVM_ABI bool | evaluateAsRelocatable (MCValue &Res, const MCAssembler *Asm) const |
Try to evaluate the expression to a relocatable value, i.e. | |
LLVM_ABI bool | evaluateAsValue (MCValue &Res, const MCAssembler &Asm) const |
Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables. | |
LLVM_ABI MCFragment * | findAssociatedFragment () const |
Find the "associated section" for this expression, which is currently defined as the absolute section for constants, or otherwise the section associated with the first defined symbol in the expression. |
Static Public Member Functions | |
static const MCSpecifierExpr * | create (const MCExpr *Expr, Spec S, MCContext &Ctx, SMLoc Loc=SMLoc()) |
static const MCSpecifierExpr * | create (const MCSymbol *Sym, Spec S, MCContext &Ctx, SMLoc Loc=SMLoc()) |
static bool | classof (const MCExpr *E) |
Static Public Member Functions inherited from llvm::MCExpr | |
static LLVM_ABI bool | evaluateSymbolicAdd (const MCAssembler *, bool, const MCValue &, const MCValue &, MCValue &) |
Protected Member Functions | |
MCSpecifierExpr (const MCExpr *Expr, Spec S, SMLoc Loc=SMLoc()) | |
Protected Member Functions inherited from llvm::MCExpr | |
MCExpr (ExprKind Kind, SMLoc Loc, unsigned SubclassData=0) | |
LLVM_ABI bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, bool InSet) const |
unsigned | getSubclassData () const |
Protected Attributes | |
const MCExpr * | Expr |
Additional Inherited Members | |
Public Types inherited from llvm::MCExpr | |
enum | ExprKind : uint8_t { Binary , Constant , SymbolRef , Unary , Specifier , Target } |
Protected Types inherited from llvm::MCExpr | |
using | Spec = uint16_t |
Extension point for target-specific MCExpr subclasses with a relocation specifier, serving as a replacement for MCSymbolRefExpr::VariantKind.
Limit this to top-level use, avoiding its inclusion as a subexpression.
NOTE: All subclasses are required to have trivial destructors because MCExprs are bump pointer allocated and not destructed.
|
inlineexplicitprotected |
Definition at line 499 of file MCExpr.h.
References Expr, llvm::MCExpr::MCExpr(), and llvm::MCExpr::Specifier.
Definition at line 511 of file MCExpr.h.
References E(), llvm::MCExpr::MCExpr(), and llvm::MCExpr::Specifier.
|
static |
Definition at line 743 of file MCExpr.cpp.
References Expr, llvm::MCExpr::MCExpr(), and MCSpecifierExpr().
Referenced by llvm::CSKYConstantPool::addEntry(), createGOTRelExprOp(), llvm::Mips::createGpOff(), llvm::ARM::createLower0_7(), llvm::ARM::createLower16(), llvm::ARM::createLower8_15(), createPCXRelExprOp(), createSparcMCOperand(), llvm::ARM::createUpper0_7(), llvm::ARM::createUpper16(), llvm::ARM::createUpper8_15(), createVEMCOperand(), llvm::MipsTargetELFStreamer::emitDirectiveCpLoad(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::MipsTargetObjectFile::getDebugThreadLocalSymbol(), llvm::RISCVMCAsmInfo::getExprForFDESymbol(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::RISCVELFTargetObjectFile::getIndirectSymViaGOTPCRel(), GetSymbolRef(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::lowerSymbolDifference(), llvm::LanaiMCInstLower::LowerSymbolOperand(), LowerSymbolOperand(), llvm::CSKYMCInstLower::lowerSymbolOperand(), lowerSymbolOperand(), llvm::AArch64MCInstLower::lowerSymbolOperandCOFF(), and llvm::AArch64MCInstLower::lowerSymbolOperandELF().
|
static |
Definition at line 748 of file MCExpr.cpp.
References llvm::MCSymbolRefExpr::create(), and MCSpecifierExpr().
|
inline |
Definition at line 508 of file MCExpr.h.
References llvm::MCExpr::getSubclassData().
Referenced by evaluate(), evaluate(), llvm::PPC::evaluateAsConstant(), evaluateAsRelocatable(), llvm::SystemZMCAsmInfoGOFF::evaluateAsRelocatableImpl(), llvm::VEELFMCAsmInfo::evaluateAsRelocatableImpl(), llvm::AVRMCExpr::getFixupKind(), llvm::AVRMCExpr::getName(), llvm::AArch64AuthMCExpr::hasAddressDiversity(), printImpl(), llvm::AArch64MCAsmInfoDarwin::printSpecifierExpr(), llvm::AArch64MCAsmInfoELF::printSpecifierExpr(), llvm::AArch64MCAsmInfoGNUCOFF::printSpecifierExpr(), llvm::AArch64MCAsmInfoMicrosoftCOFF::printSpecifierExpr(), llvm::ARM::printSpecifierExpr(), llvm::CSKYMCAsmInfo::printSpecifierExpr(), llvm::LanaiMCAsmInfo::printSpecifierExpr(), llvm::LoongArchMCAsmInfo::printSpecifierExpr(), llvm::PPCELFMCAsmInfo::printSpecifierExpr(), llvm::PPCXCOFFMCAsmInfo::printSpecifierExpr(), llvm::RISCVMCAsmInfo::printSpecifierExpr(), llvm::SparcELFMCAsmInfo::printSpecifierExpr(), llvm::SystemZMCAsmInfoGOFF::printSpecifierExpr(), llvm::VEELFMCAsmInfo::printSpecifierExpr(), and llvm::XtensaMCAsmInfo::printSpecifierExpr().
Definition at line 509 of file MCExpr.h.
References Expr, and llvm::MCExpr::MCExpr().
Referenced by evaluate(), evaluate(), llvm::AVRMCExpr::evaluateAsConstant(), llvm::PPC::evaluateAsConstant(), evaluateAsRelocatable(), llvm::SystemZMCAsmInfoGOFF::evaluateAsRelocatableImpl(), llvm::VEELFMCAsmInfo::evaluateAsRelocatableImpl(), getPCRelHiFixup(), llvm::AArch64AuthMCExpr::print(), printImpl(), llvm::AArch64MCAsmInfoDarwin::printSpecifierExpr(), llvm::AArch64MCAsmInfoELF::printSpecifierExpr(), llvm::AArch64MCAsmInfoGNUCOFF::printSpecifierExpr(), llvm::AArch64MCAsmInfoMicrosoftCOFF::printSpecifierExpr(), llvm::ARM::printSpecifierExpr(), llvm::CSKYMCAsmInfo::printSpecifierExpr(), llvm::LanaiMCAsmInfo::printSpecifierExpr(), llvm::LoongArchMCAsmInfo::printSpecifierExpr(), llvm::PPCELFMCAsmInfo::printSpecifierExpr(), llvm::PPCXCOFFMCAsmInfo::printSpecifierExpr(), llvm::RISCVMCAsmInfo::printSpecifierExpr(), llvm::SparcELFMCAsmInfo::printSpecifierExpr(), llvm::SystemZMCAsmInfoGOFF::printSpecifierExpr(), llvm::VEELFMCAsmInfo::printSpecifierExpr(), and llvm::XtensaMCAsmInfo::printSpecifierExpr().
Definition at line 497 of file MCExpr.h.
Referenced by llvm::AArch64AuthMCExpr::create(), llvm::AVRMCExpr::create(), llvm::LoongArchMCExpr::create(), create(), getSubExpr(), and MCSpecifierExpr().