LLVM  7.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)
 
 AVROperand (MCExpr const *Imm, SMLoc const &S, SMLoc const &E)
 
 AVROperand (unsigned Reg, MCExpr const *Imm, SMLoc const &S, SMLoc const &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 MCExpr * getImm () 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 ()=default
 
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 ()=default
 
 MCParsedAsmOperand (const MCParsedAsmOperand &RHS)=default
 
MCParsedAsmOperand & operator= (const MCParsedAsmOperand &)=default
 

Detailed Description

An parsed AVR assembly operand.

Definition at line 102 of file AVRAsmParser.cpp.

Constructor & Destructor Documentation

◆ AVROperand() [1/4]

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

Definition at line 107 of file AVRAsmParser.cpp.

◆ AVROperand() [2/4]

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

Definition at line 109 of file AVRAsmParser.cpp.

References Reg.

◆ AVROperand() [3/4]

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

Definition at line 111 of file AVRAsmParser.cpp.

◆ AVROperand() [4/4]

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

Definition at line 113 of file AVRAsmParser.cpp.

References Reg.

Member Function Documentation

◆ addExpr()

void llvm::AVROperand::addExpr ( MCInst &  Inst,
const MCExpr *  Expr 
) const
inline

◆ addImmOperands()

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

Definition at line 145 of file AVRAsmParser.cpp.

References assert().

◆ addMemriOperands()

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

Adds the contained reg+imm operand to an instruction.

Definition at line 154 of file AVRAsmParser.cpp.

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

◆ addRegOperands()

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

◆ CreateImm()

static std::unique_ptr<AVROperand> llvm::AVROperand::CreateImm ( const MCExpr *  Val,
SMLoc  S,
SMLoc  E 
)
inlinestatic

Definition at line 193 of file AVRAsmParser.cpp.

References E.

Referenced by print().

◆ CreateMemri()

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

Definition at line 199 of file AVRAsmParser.cpp.

References E.

Referenced by print().

◆ CreateReg()

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

Definition at line 188 of file AVRAsmParser.cpp.

References E.

Referenced by print().

◆ CreateToken()

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

Definition at line 184 of file AVRAsmParser.cpp.

Referenced by print().

◆ getEndLoc()

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

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

Implements llvm::MCParsedAsmOperand.

Definition at line 224 of file AVRAsmParser.cpp.

◆ getImm()

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

Definition at line 179 of file AVRAsmParser.cpp.

References assert().

◆ getReg()

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

Implements llvm::MCParsedAsmOperand.

Definition at line 173 of file AVRAsmParser.cpp.

References assert().

◆ getStartLoc()

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

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

Implements llvm::MCParsedAsmOperand.

Definition at line 223 of file AVRAsmParser.cpp.

Referenced by print().

◆ getToken()

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

Definition at line 168 of file AVRAsmParser.cpp.

References assert().

◆ isImm()

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

isImm - Is this an immediate operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 163 of file AVRAsmParser.cpp.

◆ isMem()

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

isMem - Is this a memory operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 165 of file AVRAsmParser.cpp.

◆ isMemri()

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

Definition at line 166 of file AVRAsmParser.cpp.

◆ isReg()

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

isReg - Is this a register operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 162 of file AVRAsmParser.cpp.

◆ isToken()

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

isToken - Is this a token operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 164 of file AVRAsmParser.cpp.

◆ makeImm()

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

Definition at line 213 of file AVRAsmParser.cpp.

◆ makeMemri()

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

Definition at line 218 of file AVRAsmParser.cpp.

◆ makeReg()

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

Definition at line 208 of file AVRAsmParser.cpp.

◆ makeToken()

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

Definition at line 203 of file AVRAsmParser.cpp.

◆ print()

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 226 of file AVRAsmParser.cpp.

References assert(), llvm::AsmToken::BigNum, llvm::AsmToken::Colon, llvm::AsmToken::Comma, llvm::AVRMCExpr::create(), CreateImm(), CreateMemri(), CreateReg(), CreateToken(), llvm::dbgs(), llvm::AsmToken::Dot, E, llvm::MCAsmParser::eatToEndOfStatement(), llvm::MCStreamer::EmitInstruction(), llvm::MCStreamer::EmitValue(), llvm::AVRMCELFStreamer::EmitValueForModiferKind(), llvm::AsmToken::EndOfStatement, llvm::MCAsmParserExtension::Error(), first, llvm::MCAsmParserExtension::getContext(), llvm::AsmToken::getEndLoc(), llvm::SMLoc::getFromPointer(), llvm::AsmToken::getIdentifier(), llvm::AsmToken::getKind(), llvm::MCAsmLexer::getKind(), llvm::AVRMCExpr::getKindByName(), llvm::AVRAsmParser::getLexer(), llvm::MCAsmParser::getLexer(), llvm::AsmToken::getLoc(), llvm::MCAsmLexer::getLoc(), llvm::MCContext::getOrCreateSymbol(), llvm::AVRAsmParser::getParser(), llvm::SMLoc::getPointer(), getReg(), getStartLoc(), llvm::MCAsmParser::getStreamer(), llvm::AsmToken::getString(), llvm::MCAsmParser::getTok(), llvm::getToken(), llvm::AsmToken::Identifier, llvm::AsmToken::Integer, llvm::AsmToken::is(), llvm::MCAsmParser::Lex(), LLVM_DEBUG, LLVM_FALLTHROUGH, llvm::StringRef::lower(), llvm::AsmToken::LParen, llvm::MCTargetAsmParser::Match_InvalidOperand, llvm::MCTargetAsmParser::Match_MissingFeature, llvm::MCTargetAsmParser::Match_MnemonicFail, llvm::MCTargetAsmParser::Match_Success, llvm::MatchOperand_ParseFail, llvm::MatchOperand_Success, llvm::MatchRegisterAltName(), llvm::MatchRegisterName(), llvm::AsmToken::Minus, llvm::MCAsmParser::parseExpression(), llvm::MCAsmParserExtension::parseMany(), llvm::MCAsmLexer::peekTok(), llvm::MCAsmLexer::peekTokens(), llvm::AsmToken::Plus, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::AsmToken::Real, llvm::AsmToken::RParen, llvm::MCInst::setLoc(), llvm::SmallVectorBase::size(), llvm::SIZE_LONG, llvm::SIZE_WORD, llvm::StringRef::str(), llvm::ARMBuildAttrs::Symbol, llvm::StringRef::upper(), and llvm::AVRMCExpr::VK_AVR_None.

Member Data Documentation

◆ @383

union { ... }

◆ End

SMLoc llvm::AVROperand::End

Definition at line 125 of file AVRAsmParser.cpp.

◆ RegImm

RegisterImmediate llvm::AVROperand::RegImm

Definition at line 122 of file AVRAsmParser.cpp.

◆ Start

SMLoc llvm::AVROperand::Start

Definition at line 125 of file AVRAsmParser.cpp.

◆ Tok

StringRef llvm::AVROperand::Tok

Definition at line 121 of file AVRAsmParser.cpp.


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