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 |
![]() | |
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 LLVM_ABI bool | evaluateSymbolicAdd (const MCAssembler *, bool, const MCValue &, const MCValue &, MCValue &) |
Protected Member Functions | |
MCSpecifierExpr (const MCExpr *Expr, Spec S, SMLoc Loc=SMLoc()) | |
![]() | |
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 | |
![]() | |
enum | ExprKind : uint8_t { Binary , Constant , SymbolRef , Unary , Specifier , Target } |
![]() | |
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.
|
static |
Definition at line 743 of file MCExpr.cpp.
References Expr.
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(), LowerSymbolOperand(), llvm::CSKYMCInstLower::lowerSymbolOperand(), llvm::LanaiMCInstLower::LowerSymbolOperand(), lowerSymbolOperand(), llvm::AArch64MCInstLower::lowerSymbolOperandCOFF(), and llvm::AArch64MCInstLower::lowerSymbolOperandELF().
|
static |
Definition at line 748 of file MCExpr.cpp.
References llvm::MCSymbolRefExpr::create(), and Sym.
|
inline |
Definition at line 508 of file MCExpr.h.
Referenced by evaluate(), llvm::PPC::evaluateAsConstant(), evaluateAsRelocatable(), llvm::MCAsmInfo::evaluateAsRelocatableImpl(), llvm::SystemZMCAsmInfoGOFF::evaluateAsRelocatableImpl(), llvm::VEELFMCAsmInfo::evaluateAsRelocatableImpl(), llvm::AVRMCExpr::getFixupKind(), llvm::AVRMCExpr::getName(), llvm::AArch64AuthMCExpr::hasAddressDiversity(), llvm::Mips::isGpOff(), printImpl(), llvm::ARM::printSpecifierExpr(), llvm::AArch64MCAsmInfoDarwin::printSpecifierExpr(), llvm::AArch64MCAsmInfoELF::printSpecifierExpr(), llvm::AArch64MCAsmInfoMicrosoftCOFF::printSpecifierExpr(), llvm::AArch64MCAsmInfoGNUCOFF::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.
Referenced by evaluate(), llvm::PPC::evaluateAsConstant(), llvm::AVRMCExpr::evaluateAsConstant(), evaluateAsRelocatable(), llvm::MCAsmInfo::evaluateAsRelocatableImpl(), llvm::SystemZMCAsmInfoGOFF::evaluateAsRelocatableImpl(), llvm::VEELFMCAsmInfo::evaluateAsRelocatableImpl(), getPCRelHiFixup(), llvm::Mips::isGpOff(), llvm::AArch64AuthMCExpr::print(), printImpl(), llvm::ARM::printSpecifierExpr(), llvm::AArch64MCAsmInfoDarwin::printSpecifierExpr(), llvm::AArch64MCAsmInfoELF::printSpecifierExpr(), llvm::AArch64MCAsmInfoMicrosoftCOFF::printSpecifierExpr(), llvm::AArch64MCAsmInfoGNUCOFF::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 create(), llvm::AArch64AuthMCExpr::create(), llvm::LoongArchMCExpr::create(), and llvm::AVRMCExpr::create().