LLVM API Documentation
#include <AArch64MCExpr.h>
Public Types | |
enum | VariantKind { VK_NONE = 0x000, VK_ABS = 0x001, VK_SABS = 0x002, VK_GOT = 0x003, VK_DTPREL = 0x004, VK_GOTTPREL = 0x005, VK_TPREL = 0x006, VK_TLSDESC = 0x007, VK_SymLocBits = 0x00f, VK_PAGE = 0x010, VK_PAGEOFF = 0x020, VK_HI12 = 0x030, VK_G0 = 0x040, VK_G1 = 0x050, VK_G2 = 0x060, VK_G3 = 0x070, VK_AddressFragBits = 0x0f0, VK_NC = 0x100, VK_CALL = VK_ABS, VK_ABS_PAGE = VK_ABS | VK_PAGE, VK_ABS_G3 = VK_ABS | VK_G3, VK_ABS_G2 = VK_ABS | VK_G2, VK_ABS_G2_S = VK_SABS | VK_G2, VK_ABS_G2_NC = VK_ABS | VK_G2 | VK_NC, VK_ABS_G1 = VK_ABS | VK_G1, VK_ABS_G1_S = VK_SABS | VK_G1, VK_ABS_G1_NC = VK_ABS | VK_G1 | VK_NC, VK_ABS_G0 = VK_ABS | VK_G0, VK_ABS_G0_S = VK_SABS | VK_G0, VK_ABS_G0_NC = VK_ABS | VK_G0 | VK_NC, VK_LO12 = VK_ABS | VK_PAGEOFF | VK_NC, VK_GOT_LO12 = VK_GOT | VK_PAGEOFF | VK_NC, VK_GOT_PAGE = VK_GOT | VK_PAGE, VK_DTPREL_G2 = VK_DTPREL | VK_G2, VK_DTPREL_G1 = VK_DTPREL | VK_G1, VK_DTPREL_G1_NC = VK_DTPREL | VK_G1 | VK_NC, VK_DTPREL_G0 = VK_DTPREL | VK_G0, VK_DTPREL_G0_NC = VK_DTPREL | VK_G0 | VK_NC, VK_DTPREL_HI12 = VK_DTPREL | VK_HI12, VK_DTPREL_LO12 = VK_DTPREL | VK_PAGEOFF, VK_DTPREL_LO12_NC = VK_DTPREL | VK_PAGEOFF | VK_NC, VK_GOTTPREL_PAGE = VK_GOTTPREL | VK_PAGE, VK_GOTTPREL_LO12_NC = VK_GOTTPREL | VK_PAGEOFF | VK_NC, VK_GOTTPREL_G1 = VK_GOTTPREL | VK_G1, VK_GOTTPREL_G0_NC = VK_GOTTPREL | VK_G0 | VK_NC, VK_TPREL_G2 = VK_TPREL | VK_G2, VK_TPREL_G1 = VK_TPREL | VK_G1, VK_TPREL_G1_NC = VK_TPREL | VK_G1 | VK_NC, VK_TPREL_G0 = VK_TPREL | VK_G0, VK_TPREL_G0_NC = VK_TPREL | VK_G0 | VK_NC, VK_TPREL_HI12 = VK_TPREL | VK_HI12, VK_TPREL_LO12 = VK_TPREL | VK_PAGEOFF, VK_TPREL_LO12_NC = VK_TPREL | VK_PAGEOFF | VK_NC, VK_TLSDESC_LO12 = VK_TLSDESC | VK_PAGEOFF | VK_NC, VK_TLSDESC_PAGE = VK_TLSDESC | VK_PAGE, VK_INVALID = 0xfff } |
Public Member Functions | |
VariantKind | getKind () const |
Get the kind of this expression. | |
const MCExpr * | getSubExpr () const |
Get the expression this modifier applies to. | |
StringRef | getVariantKindName () const |
void | PrintImpl (raw_ostream &OS) const override |
void | visitUsedExpr (MCStreamer &Streamer) const override |
const MCSection * | FindAssociatedSection () const override |
bool | EvaluateAsRelocatableImpl (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override |
void | fixELFSymbolsInTLSFixups (MCAssembler &Asm) const override |
Static Public Member Functions | |
static VariantKind | getSymbolLoc (VariantKind Kind) |
static VariantKind | getAddressFrag (VariantKind Kind) |
static bool | isNotChecked (VariantKind Kind) |
static bool | classof (const MCExpr *E) |
static bool | classof (const AArch64MCExpr *) |
Construction | |
static const AArch64MCExpr * | Create (const MCExpr *Expr, VariantKind Kind, MCContext &Ctx) |
Definition at line 23 of file AArch64MCExpr.h.
Definition at line 25 of file AArch64MCExpr.h.
static bool llvm::AArch64MCExpr::classof | ( | const MCExpr * | E | ) | [inline, static] |
Reimplemented from llvm::MCTargetExpr.
Definition at line 156 of file AArch64MCExpr.h.
static bool llvm::AArch64MCExpr::classof | ( | const AArch64MCExpr * | ) | [inline, static] |
Definition at line 160 of file AArch64MCExpr.h.
References llvm::MCExpr::getKind(), and llvm::MCExpr::Target.
const AArch64MCExpr * AArch64MCExpr::Create | ( | const MCExpr * | Expr, |
VariantKind | Kind, | ||
MCContext & | Ctx | ||
) | [static] |
Definition at line 28 of file AArch64MCExpr.cpp.
Referenced by llvm::AArch64MCInstLower::lowerSymbolOperandELF().
bool AArch64MCExpr::EvaluateAsRelocatableImpl | ( | MCValue & | Res, |
const MCAsmLayout * | Layout, | ||
const MCFixup * | Fixup | ||
) | const [override, virtual] |
Implements llvm::MCTargetExpr.
Definition at line 92 of file AArch64MCExpr.cpp.
References llvm::MCExpr::EvaluateAsRelocatable(), llvm::MCValue::get(), llvm::MCValue::getConstant(), getKind(), getSubExpr(), llvm::MCValue::getSymA(), and llvm::MCValue::getSymB().
const MCSection * AArch64MCExpr::FindAssociatedSection | ( | ) | const [override, virtual] |
FindAssociatedSection - 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.
Implements llvm::MCTargetExpr.
Definition at line 88 of file AArch64MCExpr.cpp.
References llvm_unreachable.
void AArch64MCExpr::fixELFSymbolsInTLSFixups | ( | MCAssembler & | Asm | ) | const [override, virtual] |
Implements llvm::MCTargetExpr.
Definition at line 134 of file AArch64MCExpr.cpp.
References fixELFSymbolsInTLSFixupsImpl(), getSubExpr(), getSymbolLoc(), VK_DTPREL, VK_GOTTPREL, VK_TLSDESC, and VK_TPREL.
static VariantKind llvm::AArch64MCExpr::getAddressFrag | ( | VariantKind | Kind | ) | [inline, static] |
Definition at line 132 of file AArch64MCExpr.h.
References VK_SymLocBits.
VariantKind llvm::AArch64MCExpr::getKind | ( | ) | const [inline] |
Get the kind of this expression.
Reimplemented from llvm::MCExpr.
Definition at line 121 of file AArch64MCExpr.h.
Referenced by EvaluateAsRelocatableImpl(), getVariantKindName(), and PrintImpl().
const MCExpr* llvm::AArch64MCExpr::getSubExpr | ( | ) | const [inline] |
Get the expression this modifier applies to.
Definition at line 124 of file AArch64MCExpr.h.
Referenced by EvaluateAsRelocatableImpl(), fixELFSymbolsInTLSFixups(), and visitUsedExpr().
static VariantKind llvm::AArch64MCExpr::getSymbolLoc | ( | VariantKind | Kind | ) | [inline, static] |
Definition at line 128 of file AArch64MCExpr.h.
Referenced by fixELFSymbolsInTLSFixups().
StringRef AArch64MCExpr::getVariantKindName | ( | ) | const |
Convert the variant kind into an ELF-appropriate modifier (e.g. ":got:", ":lo12:").
Definition at line 33 of file AArch64MCExpr.cpp.
References getKind(), llvm_unreachable, VK_ABS_G0, VK_ABS_G0_NC, VK_ABS_G0_S, VK_ABS_G1, VK_ABS_G1_NC, VK_ABS_G1_S, VK_ABS_G2, VK_ABS_G2_NC, VK_ABS_G2_S, VK_ABS_G3, VK_ABS_PAGE, VK_CALL, VK_DTPREL_G0, VK_DTPREL_G0_NC, VK_DTPREL_G1, VK_DTPREL_G1_NC, VK_DTPREL_G2, VK_DTPREL_HI12, VK_DTPREL_LO12, VK_DTPREL_LO12_NC, VK_GOT_LO12, VK_GOT_PAGE, VK_GOTTPREL_G0_NC, VK_GOTTPREL_G1, VK_GOTTPREL_LO12_NC, VK_GOTTPREL_PAGE, VK_LO12, VK_TLSDESC, VK_TLSDESC_LO12, VK_TLSDESC_PAGE, VK_TPREL_G0, VK_TPREL_G0_NC, VK_TPREL_G1, VK_TPREL_G1_NC, VK_TPREL_G2, VK_TPREL_HI12, VK_TPREL_LO12, and VK_TPREL_LO12_NC.
Referenced by PrintImpl().
static bool llvm::AArch64MCExpr::isNotChecked | ( | VariantKind | Kind | ) | [inline, static] |
Definition at line 136 of file AArch64MCExpr.h.
References VK_AddressFragBits.
void AArch64MCExpr::PrintImpl | ( | raw_ostream & | OS | ) | const [override, virtual] |
Implements llvm::MCTargetExpr.
Definition at line 78 of file AArch64MCExpr.cpp.
References getKind(), getVariantKindName(), and VK_NONE.
void AArch64MCExpr::visitUsedExpr | ( | MCStreamer & | Streamer | ) | const [override, virtual] |
Implements llvm::MCTargetExpr.
Definition at line 84 of file AArch64MCExpr.cpp.
References getSubExpr(), and llvm::MCStreamer::visitUsedExpr().