LLVM  6.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::AArch64MCExpr Class Reference

#include "Target/AArch64/MCTargetDesc/AArch64MCExpr.h"

Inheritance diagram for llvm::AArch64MCExpr:
Inheritance graph
[legend]
Collaboration diagram for llvm::AArch64MCExpr:
Collaboration graph
[legend]

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_PAGE_NC = VK_ABS | VK_PAGE | VK_NC, 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_TLSDESC_PAGE = VK_TLSDESC | VK_PAGE,
  VK_INVALID = 0xfff
}
 
- Public Types inherited from llvm::MCExpr
enum  ExprKind {
  Binary, Constant, SymbolRef, Unary,
  Target
}
 

Public Member Functions

StringRef getVariantKindName () const
 Convert the variant kind into an ELF-appropriate modifier (e.g. More...
 
void printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const override
 
void visitUsedExpr (MCStreamer &Streamer) const override
 
MCFragmentfindAssociatedFragment () const override
 
bool evaluateAsRelocatableImpl (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
 
void fixELFSymbolsInTLSFixups (MCAssembler &Asm) const override
 
Accessors
VariantKind getKind () const
 Get the kind of this expression. More...
 
const MCExprgetSubExpr () const
 Get the expression this modifier applies to. More...
 
- Public Member Functions inherited from llvm::MCExpr
 MCExpr (const MCExpr &)=delete
 
MCExproperator= (const MCExpr &)=delete
 
ExprKind getKind () const
 
SMLoc getLoc () const
 
void print (raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
 
void dump () const
 
bool evaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout, const SectionAddrMap &Addrs) const
 Try to evaluate the expression to an absolute value. More...
 
bool evaluateAsAbsolute (int64_t &Res) const
 
bool evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm) const
 
bool evaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout) const
 
bool evaluateKnownAbsolute (int64_t &Res, const MCAsmLayout &Layout) const
 
bool evaluateAsRelocatable (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const
 Try to evaluate the expression to a relocatable value, i.e. More...
 
bool evaluateAsValue (MCValue &Res, const MCAsmLayout &Layout) const
 Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables. More...
 
MCFragmentfindAssociatedFragment () 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. More...
 

Static Public Member Functions

static bool classof (const MCExpr *E)
 
static bool classof (const AArch64MCExpr *)
 
Construction
static const AArch64MCExprcreate (const MCExpr *Expr, VariantKind Kind, MCContext &Ctx)
 
VariantKind information extractors.
static VariantKind getSymbolLoc (VariantKind Kind)
 
static VariantKind getAddressFrag (VariantKind Kind)
 
static bool isNotChecked (VariantKind Kind)
 
- Static Public Member Functions inherited from llvm::MCTargetExpr
static bool classof (const MCExpr *E)
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::MCTargetExpr
 MCTargetExpr ()
 
virtual ~MCTargetExpr ()=default
 
- Protected Member Functions inherited from llvm::MCExpr
 MCExpr (ExprKind Kind, SMLoc Loc)
 
bool evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCAsmLayout *Layout, const MCFixup *Fixup, const SectionAddrMap *Addrs, bool InSet) const
 

Detailed Description

Definition at line 23 of file AArch64MCExpr.h.

Member Enumeration Documentation

◆ VariantKind

Enumerator
VK_NONE 
VK_ABS 
VK_SABS 
VK_GOT 
VK_DTPREL 
VK_GOTTPREL 
VK_TPREL 
VK_TLSDESC 
VK_SymLocBits 
VK_PAGE 
VK_PAGEOFF 
VK_HI12 
VK_G0 
VK_G1 
VK_G2 
VK_G3 
VK_AddressFragBits 
VK_NC 
VK_CALL 
VK_ABS_PAGE 
VK_ABS_PAGE_NC 
VK_ABS_G3 
VK_ABS_G2 
VK_ABS_G2_S 
VK_ABS_G2_NC 
VK_ABS_G1 
VK_ABS_G1_S 
VK_ABS_G1_NC 
VK_ABS_G0 
VK_ABS_G0_S 
VK_ABS_G0_NC 
VK_LO12 
VK_GOT_LO12 
VK_GOT_PAGE 
VK_DTPREL_G2 
VK_DTPREL_G1 
VK_DTPREL_G1_NC 
VK_DTPREL_G0 
VK_DTPREL_G0_NC 
VK_DTPREL_HI12 
VK_DTPREL_LO12 
VK_DTPREL_LO12_NC 
VK_GOTTPREL_PAGE 
VK_GOTTPREL_LO12_NC 
VK_GOTTPREL_G1 
VK_GOTTPREL_G0_NC 
VK_TPREL_G2 
VK_TPREL_G1 
VK_TPREL_G1_NC 
VK_TPREL_G0 
VK_TPREL_G0_NC 
VK_TPREL_HI12 
VK_TPREL_LO12 
VK_TPREL_LO12_NC 
VK_TLSDESC_LO12 
VK_TLSDESC_PAGE 
VK_INVALID 

Definition at line 25 of file AArch64MCExpr.h.

Member Function Documentation

◆ classof() [1/2]

static bool llvm::AArch64MCExpr::classof ( const MCExpr E)
inlinestatic

Definition at line 160 of file AArch64MCExpr.h.

References llvm::MCExpr::getKind(), and llvm::MCExpr::Target.

◆ classof() [2/2]

static bool llvm::AArch64MCExpr::classof ( const AArch64MCExpr )
inlinestatic

Definition at line 164 of file AArch64MCExpr.h.

◆ create()

const AArch64MCExpr * AArch64MCExpr::create ( const MCExpr Expr,
VariantKind  Kind,
MCContext Ctx 
)
static

◆ evaluateAsRelocatableImpl()

bool AArch64MCExpr::evaluateAsRelocatableImpl ( MCValue Res,
const MCAsmLayout Layout,
const MCFixup Fixup 
) const
overridevirtual

◆ findAssociatedFragment()

MCFragment * AArch64MCExpr::findAssociatedFragment ( ) const
overridevirtual

Implements llvm::MCTargetExpr.

Definition at line 89 of file AArch64MCExpr.cpp.

References llvm_unreachable.

Referenced by isNotChecked().

◆ fixELFSymbolsInTLSFixups()

void AArch64MCExpr::fixELFSymbolsInTLSFixups ( MCAssembler Asm) const
overridevirtual

◆ getAddressFrag()

static VariantKind llvm::AArch64MCExpr::getAddressFrag ( VariantKind  Kind)
inlinestatic

Definition at line 137 of file AArch64MCExpr.h.

References VK_AddressFragBits.

◆ getKind()

VariantKind llvm::AArch64MCExpr::getKind ( ) const
inline

Get the kind of this expression.

Definition at line 124 of file AArch64MCExpr.h.

Referenced by evaluateAsRelocatableImpl(), getVariantKindName(), and printImpl().

◆ getSubExpr()

const MCExpr* llvm::AArch64MCExpr::getSubExpr ( ) const
inline

Get the expression this modifier applies to.

Definition at line 127 of file AArch64MCExpr.h.

Referenced by evaluateAsRelocatableImpl(), fixELFSymbolsInTLSFixups(), fixELFSymbolsInTLSFixupsImpl(), and visitUsedExpr().

◆ getSymbolLoc()

static VariantKind llvm::AArch64MCExpr::getSymbolLoc ( VariantKind  Kind)
inlinestatic

Definition at line 133 of file AArch64MCExpr.h.

References VK_SymLocBits.

Referenced by fixELFSymbolsInTLSFixups(), and isNonILP32reloc().

◆ getVariantKindName()

StringRef AArch64MCExpr::getVariantKindName ( ) const

◆ isNotChecked()

static bool llvm::AArch64MCExpr::isNotChecked ( VariantKind  Kind)
inlinestatic

◆ printImpl()

void AArch64MCExpr::printImpl ( raw_ostream OS,
const MCAsmInfo MAI 
) const
overridevirtual

Implements llvm::MCTargetExpr.

Definition at line 79 of file AArch64MCExpr.cpp.

References getKind(), getVariantKindName(), llvm::MCExpr::print(), and VK_NONE.

Referenced by isNotChecked().

◆ visitUsedExpr()

void AArch64MCExpr::visitUsedExpr ( MCStreamer Streamer) const
overridevirtual

Implements llvm::MCTargetExpr.

Definition at line 85 of file AArch64MCExpr.cpp.

References getSubExpr(), and llvm::MCStreamer::visitUsedExpr().

Referenced by isNotChecked().


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