LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
llvm::MCBinaryExpr Class Reference

MCBinaryExpr - Binary assembler expressions. More...

#include <MCExpr.h>

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

Public Types

enum  Opcode {
  Add, And, Div, EQ,
  GT, GTE, LAnd, LOr,
  LT, LTE, Mod, Mul,
  NE, Or, Shl, Shr,
  Sub, Xor
}
 
- Public Types inherited from llvm::MCExpr
enum  ExprKind {
  Binary, Constant, SymbolRef, Unary,
  Target
}
 

Public Member Functions

Accessors
Opcode getOpcode () const
 getOpcode - Get the kind of this binary expression. More...
 
const MCExprgetLHS () const
 getLHS - Get the left-hand side expression of the binary operator. More...
 
const MCExprgetRHS () const
 getRHS - Get the right-hand side expression of the binary operator. More...
 
- Public Member Functions inherited from llvm::MCExpr
ExprKind getKind () const
 
void print (raw_ostream &OS) const
 
void dump () const
 
bool EvaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout, const SectionAddrMap &Addrs) const
 
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 EvaluateAsRelocatable (MCValue &Res, const MCAsmLayout &Layout) const
 
const MCSectionFindAssociatedSection () const
 

Static Public Member Functions

static bool classof (const MCExpr *E)
 
Construction
static const MCBinaryExprCreate (Opcode Op, const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateAdd (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateAnd (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateDiv (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateEQ (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateGT (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateGTE (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateLAnd (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateLOr (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateLT (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateLTE (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateMod (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateMul (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateNE (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateOr (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateShl (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateShr (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateSub (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 
static const MCBinaryExprCreateXor (const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::MCExpr
 MCExpr (ExprKind _Kind)
 
bool EvaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCAsmLayout *Layout, const SectionAddrMap *Addrs, bool InSet) const
 

Detailed Description

MCBinaryExpr - Binary assembler expressions.

Definition at line 356 of file MCExpr.h.

Member Enumeration Documentation

Enumerator
Add 

Addition.

And 

Bitwise and.

Div 

Signed division.

EQ 

Equality comparison.

GT 

Signed greater than comparison (result is either 0 or some target-specific non-zero value)

GTE 

Signed greater than or equal comparison (result is either 0 or some target-specific non-zero value).

LAnd 

Logical and.

LOr 

Logical or.

LT 

Signed less than comparison (result is either 0 or some target-specific non-zero value).

LTE 

Signed less than or equal comparison (result is either 0 or some target-specific non-zero value).

Mod 

Signed remainder.

Mul 

Multiplication.

NE 

Inequality comparison.

Or 

Bitwise or.

Shl 

Shift left.

Shr 

Shift right (arithmetic or logical, depending on target)

Sub 

Subtraction.

Xor 

Bitwise exclusive or.

Definition at line 358 of file MCExpr.h.

Member Function Documentation

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

Definition at line 484 of file MCExpr.h.

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

const MCBinaryExpr * MCBinaryExpr::Create ( Opcode  Op,
const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
static
static const MCBinaryExpr* llvm::MCBinaryExpr::CreateAdd ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic
static const MCBinaryExpr* llvm::MCBinaryExpr::CreateAnd ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 400 of file MCExpr.h.

References And, and Create().

Referenced by nvptx::LowerConstant(), and lowerConstant().

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateDiv ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 404 of file MCExpr.h.

References Create(), and Div.

Referenced by llvm::ARMAsmPrinter::EmitJump2Table(), nvptx::LowerConstant(), and lowerConstant().

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateEQ ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 408 of file MCExpr.h.

References Create(), and EQ.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateGT ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 412 of file MCExpr.h.

References Create(), and GT.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateGTE ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 416 of file MCExpr.h.

References Create(), and GTE.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateLAnd ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 420 of file MCExpr.h.

References Create(), and LAnd.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateLOr ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 424 of file MCExpr.h.

References Create(), and LOr.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateLT ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 428 of file MCExpr.h.

References Create(), and LT.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateLTE ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 432 of file MCExpr.h.

References Create(), and LTE.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateMod ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 436 of file MCExpr.h.

References Create(), and Mod.

Referenced by nvptx::LowerConstant(), and lowerConstant().

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateMul ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 440 of file MCExpr.h.

References Create(), and Mul.

Referenced by nvptx::LowerConstant(), and lowerConstant().

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateNE ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 444 of file MCExpr.h.

References Create(), and NE.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateOr ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 448 of file MCExpr.h.

References Create(), and Or.

Referenced by nvptx::LowerConstant(), and lowerConstant().

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateShl ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 452 of file MCExpr.h.

References Create(), and Shl.

Referenced by nvptx::LowerConstant(), and lowerConstant().

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateShr ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 456 of file MCExpr.h.

References Create(), and Shr.

static const MCBinaryExpr* llvm::MCBinaryExpr::CreateSub ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic
static const MCBinaryExpr* llvm::MCBinaryExpr::CreateXor ( const MCExpr LHS,
const MCExpr RHS,
MCContext Ctx 
)
inlinestatic

Definition at line 464 of file MCExpr.h.

References Create(), and Xor.

Referenced by nvptx::LowerConstant(), and lowerConstant().

const MCExpr* llvm::MCBinaryExpr::getLHS ( ) const
inline
Opcode llvm::MCBinaryExpr::getOpcode ( ) const
inline

getOpcode - Get the kind of this binary expression.

Definition at line 474 of file MCExpr.h.

Referenced by llvm::MCExpr::EvaluateAsRelocatableImpl(), and llvm::MCExpr::print().

const MCExpr* llvm::MCBinaryExpr::getRHS ( ) const
inline

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