10 #ifndef LLVM_MC_MCEXPR_H
11 #define LLVM_MC_MCEXPR_H
15 #include "llvm/Support/DataTypes.h"
45 void operator=(const
MCExpr&) LLVM_DELETED_FUNCTION;
81 bool EvaluateAsAbsolute(int64_t &Res,
const MCAsmLayout &Layout,
83 bool EvaluateAsAbsolute(int64_t &Res)
const;
84 bool EvaluateAsAbsolute(int64_t &Res,
const MCAssembler &
Asm)
const;
85 bool EvaluateAsAbsolute(int64_t &Res,
const MCAsmLayout &Layout)
const;
323 static const MCUnaryExpr *
Create(
Opcode Op,
const MCExpr *Expr,
394 static const MCBinaryExpr *
Create(
Opcode Op,
const MCExpr *LHS,
395 const MCExpr *RHS, MCContext &Ctx);
495 virtual void anchor();
static const MCBinaryExpr * CreateMod(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCUnaryExpr * CreatePlus(const MCExpr *Expr, MCContext &Ctx)
static const MCBinaryExpr * CreateOr(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
const MCSymbol & getSymbol() const
static const MCBinaryExpr * CreateDiv(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCConstantExpr * Create(int64_t Value, MCContext &Ctx)
static VariantKind getVariantKindForName(StringRef Name)
static const MCBinaryExpr * CreateEQ(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
virtual void AddValueSymbols(MCAssembler *) const =0
static const MCBinaryExpr * CreateGTE(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * CreateShr(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
virtual void PrintImpl(raw_ostream &OS) const =0
Shift right (arithmetic or logical, depending on target)
static const MCUnaryExpr * CreateNot(const MCExpr *Expr, MCContext &Ctx)
static const MCBinaryExpr * CreateLAnd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * CreateXor(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * CreateNE(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
virtual const MCSection * FindAssociatedSection() const =0
static const MCBinaryExpr * CreateSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static bool classof(const MCExpr *E)
MCUnaryExpr - Unary assembler expressions.
static const MCSymbolRefExpr * Create(const MCSymbol *Symbol, MCContext &Ctx)
const MCExpr * getLHS() const
getLHS - Get the left-hand side expression of the binary operator.
static const MCBinaryExpr * CreateAnd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * Create(Opcode Op, const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCUnaryExpr * Create(Opcode Op, const MCExpr *Expr, MCContext &Ctx)
const MCSection * FindAssociatedSection() const
MCBinaryExpr - Binary assembler expressions.
bool EvaluateAsRelocatable(MCValue &Res, const MCAsmLayout &Layout) const
static const MCBinaryExpr * CreateLOr(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * CreateLTE(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
virtual void fixELFSymbolsInTLSFixups(MCAssembler &) const =0
static const MCBinaryExpr * CreateLT(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static bool classof(const MCExpr *E)
static bool classof(const MCExpr *E)
bool EvaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm, const MCAsmLayout *Layout, const SectionAddrMap *Addrs, bool InSet) const
#define LLVM_DELETED_FUNCTION
static const MCUnaryExpr * CreateLNot(const MCExpr *Expr, MCContext &Ctx)
static const MCBinaryExpr * CreateAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
const MCExpr * getRHS() const
getRHS - Get the right-hand side expression of the binary operator.
const MCExpr * getSubExpr() const
getSubExpr - Get the child of this unary expression.
void print(raw_ostream &OS) const
static const MCBinaryExpr * CreateShl(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
DenseMap< const MCSectionData *, uint64_t > SectionAddrMap
Opcode getOpcode() const
getOpcode - Get the kind of this binary expression.
static const MCUnaryExpr * CreateMinus(const MCExpr *Expr, MCContext &Ctx)
References to labels and assigned expressions.
static const MCBinaryExpr * CreateGT(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
static bool classof(const MCExpr *E)
VariantKind getKind() const
LLVM Value Representation.
virtual bool EvaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout) const =0
static const MCBinaryExpr * CreateMul(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Target specific expression.
static bool classof(const MCExpr *E)
static StringRef getVariantKindName(VariantKind Kind)
Opcode getOpcode() const
getOpcode - Get the kind of this unary expression.