LLVM  4.0.0
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::AVROperand Class Reference

An parsed AVR assembly operand. More...

Inheritance diagram for llvm::AVROperand:
[legend]
Collaboration diagram for llvm::AVROperand:
[legend]

Classes

struct  RegisterImmediate
 

Public Member Functions

 AVROperand (StringRef Tok, SMLoc const &S)
 
 AVROperand (unsigned Reg, SMLoc const &S, SMLoc const &E)
 
 Start (S)
 
 End (E)
 
 AVROperand (MCExpr const *Imm, SMLoc const &S, SMLoc const &E)
 
 Start (S)
 
 End (E)
 
 AVROperand (unsigned Reg, MCExpr const *Imm, SMLoc const &S, SMLoc const &E)
 
 Start (S)
 
 End (E)
 
void addRegOperands (MCInst &Inst, unsigned N) const
 
void addExpr (MCInst &Inst, const MCExpr *Expr) const
 
void addImmOperands (MCInst &Inst, unsigned N) const
 
void addMemriOperands (MCInst &Inst, unsigned N) const
 Adds the contained reg+imm operand to an instruction. More...
 
bool isReg () const
 isReg - Is this a register operand? More...
 
bool isImm () const
 isImm - Is this an immediate operand? More...
 
bool isToken () const
 isToken - Is this a token operand? More...
 
bool isMem () const
 isMem - Is this a memory operand? More...
 
bool isMemri () const
 
StringRef getToken () const
 
unsigned getReg () const
 
const MCExprgetImm () const
 
void makeToken (StringRef Token)
 
void makeReg (unsigned RegNo)
 
void makeImm (MCExpr const *Ex)
 
void makeMemri (unsigned RegNo, MCExpr const *Imm)
 
SMLoc getStartLoc () const
 getStartLoc - Get the location of the first token of this operand. More...
 
SMLoc getEndLoc () const
 getEndLoc - Get the location of the last token of this operand. More...
 
virtual void print (raw_ostream &O) const
 print - Print a debug representation of the operand to the given stream. More...
 
- Public Member Functions inherited from llvm::MCParsedAsmOperand
virtual ~MCParsedAsmOperand ()
 
void setConstraint (StringRef C)
 
StringRef getConstraint ()
 
void setMCOperandNum (unsigned OpNum)
 
unsigned getMCOperandNum ()
 
virtual StringRef getSymName ()
 
virtual void * getOpDecl ()
 
virtual bool needAddressOf () const
 needAddressOf - Do we need to emit code to get the address of the variable/label? Only valid when parsing MS-style inline assembly. More...
 
virtual bool isOffsetOf () const
 isOffsetOf - Do we need to emit code to get the offset of the variable, rather then the value of the variable? Only valid when parsing MS-style inline assembly. More...
 
virtual SMLoc getOffsetOfLoc () const
 getOffsetOfLoc - Get the location of the offset operator. More...
 
virtual void dump () const
 dump - Print to the debug stream. More...
 

Static Public Member Functions

static std::unique_ptr
< AVROperand
CreateToken (StringRef Str, SMLoc S)
 
static std::unique_ptr
< AVROperand
CreateReg (unsigned RegNum, SMLoc S, SMLoc E)
 
static std::unique_ptr
< AVROperand
CreateImm (const MCExpr *Val, SMLoc S, SMLoc E)
 
static std::unique_ptr
< AVROperand
CreateMemri (unsigned RegNum, const MCExpr *Val, SMLoc S, SMLoc E)
 

Public Attributes

union {
   StringRef   Tok
 
   RegisterImmediate   RegImm
 
}; 
 
SMLoc Start
 
SMLoc End
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::MCParsedAsmOperand
 MCParsedAsmOperand (const MCParsedAsmOperand &RHS)=default
 
MCParsedAsmOperandoperator= (const MCParsedAsmOperand &)=default
 
 MCParsedAsmOperand ()=default
 

Detailed Description

An parsed AVR assembly operand.

Definition at line 98 of file AVRAsmParser.cpp.

Constructor & Destructor Documentation

llvm::AVROperand::AVROperand ( StringRef  Tok,
SMLoc const S 
)
inline

Definition at line 103 of file AVRAsmParser.cpp.

llvm::AVROperand::AVROperand ( unsigned  Reg,
SMLoc const S,
SMLoc const E 
)
inline

Definition at line 105 of file AVRAsmParser.cpp.

llvm::AVROperand::AVROperand ( MCExpr const Imm,
SMLoc const S,
SMLoc const E 
)
inline

Definition at line 107 of file AVRAsmParser.cpp.

llvm::AVROperand::AVROperand ( unsigned  Reg,
MCExpr const Imm,
SMLoc const S,
SMLoc const E 
)
inline

Definition at line 109 of file AVRAsmParser.cpp.

Member Function Documentation

void llvm::AVROperand::addExpr ( MCInst Inst,
const MCExpr Expr 
) const
inline
void llvm::AVROperand::addImmOperands ( MCInst Inst,
unsigned  N 
) const
inline

Definition at line 141 of file AVRAsmParser.cpp.

References addExpr(), assert(), and getImm().

void llvm::AVROperand::addMemriOperands ( MCInst Inst,
unsigned  N 
) const
inline

Adds the contained reg+imm operand to an instruction.

Definition at line 150 of file AVRAsmParser.cpp.

References addExpr(), llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createReg(), getImm(), and getReg().

void llvm::AVROperand::addRegOperands ( MCInst Inst,
unsigned  N 
) const
inline
static std::unique_ptr<AVROperand> llvm::AVROperand::CreateImm ( const MCExpr Val,
SMLoc  S,
SMLoc  E 
)
inlinestatic

Definition at line 189 of file AVRAsmParser.cpp.

References E.

static std::unique_ptr<AVROperand> llvm::AVROperand::CreateMemri ( unsigned  RegNum,
const MCExpr Val,
SMLoc  S,
SMLoc  E 
)
inlinestatic

Definition at line 195 of file AVRAsmParser.cpp.

References E.

static std::unique_ptr<AVROperand> llvm::AVROperand::CreateReg ( unsigned  RegNum,
SMLoc  S,
SMLoc  E 
)
inlinestatic

Definition at line 184 of file AVRAsmParser.cpp.

References E.

static std::unique_ptr<AVROperand> llvm::AVROperand::CreateToken ( StringRef  Str,
SMLoc  S 
)
inlinestatic

Definition at line 180 of file AVRAsmParser.cpp.

llvm::AVROperand::End ( E  )
inline

Definition at line 106 of file AVRAsmParser.cpp.

llvm::AVROperand::End ( E  )
inline

Definition at line 108 of file AVRAsmParser.cpp.

llvm::AVROperand::End ( E  )
inline

Definition at line 110 of file AVRAsmParser.cpp.

SMLoc llvm::AVROperand::getEndLoc ( ) const
inlinevirtual

getEndLoc - Get the location of the last token of this operand.

Implements llvm::MCParsedAsmOperand.

Definition at line 220 of file AVRAsmParser.cpp.

References End.

const MCExpr* llvm::AVROperand::getImm ( ) const
inline

Definition at line 175 of file AVRAsmParser.cpp.

References assert(), llvm::AVROperand::RegisterImmediate::Imm, and RegImm.

Referenced by addImmOperands(), addMemriOperands(), and print().

unsigned llvm::AVROperand::getReg ( ) const
inlinevirtual
SMLoc llvm::AVROperand::getStartLoc ( ) const
inlinevirtual

getStartLoc - Get the location of the first token of this operand.

Implements llvm::MCParsedAsmOperand.

Definition at line 219 of file AVRAsmParser.cpp.

References Start.

StringRef llvm::AVROperand::getToken ( ) const
inline

Definition at line 164 of file AVRAsmParser.cpp.

References assert(), and Tok.

Referenced by print().

bool llvm::AVROperand::isImm ( ) const
inlinevirtual

isImm - Is this an immediate operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 159 of file AVRAsmParser.cpp.

bool llvm::AVROperand::isMem ( ) const
inlinevirtual

isMem - Is this a memory operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 161 of file AVRAsmParser.cpp.

bool llvm::AVROperand::isMemri ( ) const
inline

Definition at line 162 of file AVRAsmParser.cpp.

bool llvm::AVROperand::isReg ( ) const
inlinevirtual

isReg - Is this a register operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 158 of file AVRAsmParser.cpp.

bool llvm::AVROperand::isToken ( ) const
inlinevirtual

isToken - Is this a token operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 160 of file AVRAsmParser.cpp.

void llvm::AVROperand::makeImm ( MCExpr const Ex)
inline

Definition at line 209 of file AVRAsmParser.cpp.

References RegImm.

void llvm::AVROperand::makeMemri ( unsigned  RegNo,
MCExpr const Imm 
)
inline

Definition at line 214 of file AVRAsmParser.cpp.

References RegImm.

void llvm::AVROperand::makeReg ( unsigned  RegNo)
inline

Definition at line 204 of file AVRAsmParser.cpp.

References RegImm.

void llvm::AVROperand::makeToken ( StringRef  Token)
inline

Definition at line 199 of file AVRAsmParser.cpp.

References Tok, and Token.

virtual void llvm::AVROperand::print ( raw_ostream OS) const
inlinevirtual

print - Print a debug representation of the operand to the given stream.

Implements llvm::MCParsedAsmOperand.

Definition at line 222 of file AVRAsmParser.cpp.

References getImm(), getReg(), and getToken().

llvm::AVROperand::Start ( )
llvm::AVROperand::Start ( )
llvm::AVROperand::Start ( )

Member Data Documentation

union { ... }
SMLoc llvm::AVROperand::End

Definition at line 121 of file AVRAsmParser.cpp.

Referenced by getEndLoc().

RegisterImmediate llvm::AVROperand::RegImm

Definition at line 118 of file AVRAsmParser.cpp.

Referenced by getImm(), getReg(), makeImm(), makeMemri(), and makeReg().

SMLoc llvm::AVROperand::Start

Definition at line 121 of file AVRAsmParser.cpp.

Referenced by getStartLoc().

StringRef llvm::AVROperand::Tok

Definition at line 117 of file AVRAsmParser.cpp.

Referenced by getToken(), and makeToken().


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