LLVM 19.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
XtensaOperand Struct Reference
Inheritance diagram for XtensaOperand:
Inheritance graph
[legend]

Classes

struct  ImmOp
 
struct  RegOp
 

Public Types

enum  KindTy { Token , Register , Immediate }
 

Public Member Functions

 XtensaOperand (KindTy K)
 
 XtensaOperand (const XtensaOperand &o)
 
bool isToken () const override
 isToken - Is this a token operand?
 
bool isReg () const override
 isReg - Is this a register operand?
 
bool isImm () const override
 isImm - Is this an immediate operand?
 
bool isMem () const override
 isMem - Is this a memory operand?
 
bool isImm (int64_t MinValue, int64_t MaxValue) const
 
bool isImm8 () const
 
bool isImm8_sh8 () const
 
bool isImm12 () const
 
bool isImm12m () const
 
bool isOffset4m32 () const
 
bool isOffset8m8 () const
 
bool isOffset8m16 () const
 
bool isOffset8m32 () const
 
bool isUimm4 () const
 
bool isUimm5 () const
 
bool isImm8n_7 () const
 
bool isShimm1_31 () const
 
bool isImm16_31 () const
 
bool isImm1_16 () const
 
bool isB4const () const
 
bool isB4constu () const
 
SMLoc getStartLoc () const override
 getStartLoc - Gets location of the first token of this operand
 
SMLoc getEndLoc () const override
 getEndLoc - Gets location of the last token of this operand
 
MCRegister getReg () const override
 
const MCExprgetImm () const
 
StringRef getToken () const
 
void print (raw_ostream &OS) const override
 print - Print a debug representation of the operand to the given stream.
 
void addExpr (MCInst &Inst, const MCExpr *Expr) const
 
void addRegOperands (MCInst &Inst, unsigned N) const
 
void addImmOperands (MCInst &Inst, unsigned N) const
 
- 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 isToken () const =0
 isToken - Is this a token operand?
 
virtual bool isImm () const =0
 isImm - Is this an immediate operand?
 
virtual bool isReg () const =0
 isReg - Is this a register operand?
 
virtual MCRegister getReg () const =0
 
virtual bool isMem () const =0
 isMem - Is this a memory operand?
 
virtual bool isMemUseUpRegs () const
 isMemUseUpRegs - Is memory operand use up regs, for example, intel MS inline asm may use ARR[baseReg + IndexReg + ...] which may use up regs in [...] expr, so ARR[baseReg + IndexReg + ...] can not use extra reg for ARR.
 
virtual SMLoc getStartLoc () const =0
 getStartLoc - Get the location of the first token of this operand.
 
virtual SMLoc getEndLoc () const =0
 getEndLoc - Get the location of the last token of this operand.
 
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.
 
virtual bool isOffsetOfLocal () const
 isOffsetOfLocal - Do we need to emit code to get the offset of the local variable, rather than its value? Only valid when parsing MS-style inline assembly.
 
virtual SMLoc getOffsetOfLoc () const
 getOffsetOfLoc - Get the location of the offset operator.
 
virtual void print (raw_ostream &OS) const =0
 print - Print a debug representation of the operand to the given stream.
 
virtual void dump () const
 dump - Print to the debug stream.
 

Static Public Member Functions

static std::unique_ptr< XtensaOperandcreateToken (StringRef Str, SMLoc S)
 
static std::unique_ptr< XtensaOperandcreateReg (unsigned RegNo, SMLoc S, SMLoc E)
 
static std::unique_ptr< XtensaOperandcreateImm (const MCExpr *Val, SMLoc S, SMLoc E)
 

Public Attributes

enum XtensaOperand::KindTy Kind
 
SMLoc StartLoc
 
SMLoc EndLoc
 
union {
   StringRef   Tok
 
   RegOp   Reg
 
   ImmOp   Imm
 
}; 
 

Additional Inherited Members

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

Detailed Description

Definition at line 103 of file XtensaAsmParser.cpp.

Member Enumeration Documentation

◆ KindTy

Enumerator
Token 
Register 
Immediate 

Definition at line 105 of file XtensaAsmParser.cpp.

Constructor & Destructor Documentation

◆ XtensaOperand() [1/2]

XtensaOperand::XtensaOperand ( KindTy  K)
inline

Definition at line 126 of file XtensaAsmParser.cpp.

◆ XtensaOperand() [2/2]

XtensaOperand::XtensaOperand ( const XtensaOperand o)
inline

Definition at line 129 of file XtensaAsmParser.cpp.

References EndLoc, Imm, Immediate, Kind, Reg, Register, StartLoc, Tok, and Token.

Member Function Documentation

◆ addExpr()

void XtensaOperand::addExpr ( MCInst Inst,
const MCExpr Expr 
) const
inline

◆ addImmOperands()

void XtensaOperand::addImmOperands ( MCInst Inst,
unsigned  N 
) const
inline

Definition at line 339 of file XtensaAsmParser.cpp.

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

◆ addRegOperands()

void XtensaOperand::addRegOperands ( MCInst Inst,
unsigned  N 
) const
inline

◆ createImm()

static std::unique_ptr< XtensaOperand > XtensaOperand::createImm ( const MCExpr Val,
SMLoc  S,
SMLoc  E 
)
inlinestatic

Definition at line 308 of file XtensaAsmParser.cpp.

References Immediate.

◆ createReg()

static std::unique_ptr< XtensaOperand > XtensaOperand::createReg ( unsigned  RegNo,
SMLoc  S,
SMLoc  E 
)
inlinestatic

Definition at line 299 of file XtensaAsmParser.cpp.

◆ createToken()

static std::unique_ptr< XtensaOperand > XtensaOperand::createToken ( StringRef  Str,
SMLoc  S 
)
inlinestatic

Definition at line 291 of file XtensaAsmParser.cpp.

References Token.

◆ getEndLoc()

SMLoc XtensaOperand::getEndLoc ( ) const
inlineoverridevirtual

getEndLoc - Gets location of the last token of this operand

Implements llvm::MCParsedAsmOperand.

Definition at line 259 of file XtensaAsmParser.cpp.

References EndLoc.

◆ getImm()

const MCExpr * XtensaOperand::getImm ( ) const
inline

◆ getReg()

MCRegister XtensaOperand::getReg ( ) const
inlineoverridevirtual

Implements llvm::MCParsedAsmOperand.

Definition at line 261 of file XtensaAsmParser.cpp.

References assert(), Kind, Reg, and XtensaOperand::RegOp::RegNum.

Referenced by addRegOperands(), and print().

◆ getStartLoc()

SMLoc XtensaOperand::getStartLoc ( ) const
inlineoverridevirtual

getStartLoc - Gets location of the first token of this operand

Implements llvm::MCParsedAsmOperand.

Definition at line 257 of file XtensaAsmParser.cpp.

References StartLoc.

◆ getToken()

StringRef XtensaOperand::getToken ( ) const
inline

Definition at line 271 of file XtensaAsmParser.cpp.

References assert(), Kind, Tok, and Token.

Referenced by print().

◆ isB4const()

bool XtensaOperand::isB4const ( ) const
inline

Definition at line 196 of file XtensaAsmParser.cpp.

References getImm(), Immediate, and Kind.

◆ isB4constu()

bool XtensaOperand::isB4constu ( ) const
inline

Definition at line 226 of file XtensaAsmParser.cpp.

References getImm(), Immediate, and Kind.

◆ isImm() [1/2]

bool XtensaOperand::isImm ( ) const
inlineoverridevirtual

isImm - Is this an immediate operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 148 of file XtensaAsmParser.cpp.

References Immediate, and Kind.

Referenced by isImm12(), isImm16_31(), isImm1_16(), isImm8(), isImm8_sh8(), isImm8n_7(), isOffset4m32(), isOffset8m16(), isOffset8m32(), isOffset8m8(), isShimm1_31(), isUimm4(), and isUimm5().

◆ isImm() [2/2]

bool XtensaOperand::isImm ( int64_t  MinValue,
int64_t  MaxValue 
) const
inline

Definition at line 151 of file XtensaAsmParser.cpp.

References getImm(), Immediate, inRange(), and Kind.

◆ isImm12()

bool XtensaOperand::isImm12 ( ) const
inline

Definition at line 162 of file XtensaAsmParser.cpp.

References isImm().

◆ isImm12m()

bool XtensaOperand::isImm12m ( ) const
inline

Definition at line 165 of file XtensaAsmParser.cpp.

References Immediate, and Kind.

◆ isImm16_31()

bool XtensaOperand::isImm16_31 ( ) const
inline

Definition at line 192 of file XtensaAsmParser.cpp.

References isImm().

◆ isImm1_16()

bool XtensaOperand::isImm1_16 ( ) const
inline

Definition at line 194 of file XtensaAsmParser.cpp.

References isImm().

◆ isImm8()

bool XtensaOperand::isImm8 ( ) const
inline

Definition at line 155 of file XtensaAsmParser.cpp.

References isImm().

◆ isImm8_sh8()

bool XtensaOperand::isImm8_sh8 ( ) const
inline

Definition at line 157 of file XtensaAsmParser.cpp.

References getImm(), and isImm().

◆ isImm8n_7()

bool XtensaOperand::isImm8n_7 ( ) const
inline

Definition at line 188 of file XtensaAsmParser.cpp.

References isImm().

◆ isMem()

bool XtensaOperand::isMem ( ) const
inlineoverridevirtual

isMem - Is this a memory operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 149 of file XtensaAsmParser.cpp.

◆ isOffset4m32()

bool XtensaOperand::isOffset4m32 ( ) const
inline

Definition at line 167 of file XtensaAsmParser.cpp.

References getImm(), and isImm().

◆ isOffset8m16()

bool XtensaOperand::isOffset8m16 ( ) const
inline

Definition at line 174 of file XtensaAsmParser.cpp.

References getImm(), and isImm().

◆ isOffset8m32()

bool XtensaOperand::isOffset8m32 ( ) const
inline

Definition at line 179 of file XtensaAsmParser.cpp.

References getImm(), and isImm().

◆ isOffset8m8()

bool XtensaOperand::isOffset8m8 ( ) const
inline

Definition at line 172 of file XtensaAsmParser.cpp.

References isImm().

◆ isReg()

bool XtensaOperand::isReg ( ) const
inlineoverridevirtual

isReg - Is this a register operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 147 of file XtensaAsmParser.cpp.

References Kind, and Register.

◆ isShimm1_31()

bool XtensaOperand::isShimm1_31 ( ) const
inline

Definition at line 190 of file XtensaAsmParser.cpp.

References isImm().

◆ isToken()

bool XtensaOperand::isToken ( ) const
inlineoverridevirtual

isToken - Is this a token operand?

Implements llvm::MCParsedAsmOperand.

Definition at line 146 of file XtensaAsmParser.cpp.

References Kind, and Token.

◆ isUimm4()

bool XtensaOperand::isUimm4 ( ) const
inline

Definition at line 184 of file XtensaAsmParser.cpp.

References isImm().

◆ isUimm5()

bool XtensaOperand::isUimm5 ( ) const
inline

Definition at line 186 of file XtensaAsmParser.cpp.

References isImm().

◆ print()

void XtensaOperand::print ( raw_ostream OS) const
inlineoverridevirtual

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

Implements llvm::MCParsedAsmOperand.

Definition at line 276 of file XtensaAsmParser.cpp.

References getImm(), getReg(), getToken(), Immediate, Kind, OS, Register, and Token.

Member Data Documentation

◆ 

union { ... } XtensaOperand::@624

◆ EndLoc

SMLoc XtensaOperand::EndLoc

Definition at line 119 of file XtensaAsmParser.cpp.

Referenced by getEndLoc(), and XtensaOperand().

◆ Imm

ImmOp XtensaOperand::Imm

Definition at line 123 of file XtensaAsmParser.cpp.

Referenced by addExpr(), getImm(), and XtensaOperand().

◆ Kind

enum XtensaOperand::KindTy XtensaOperand::Kind

◆ Reg

RegOp XtensaOperand::Reg

Definition at line 122 of file XtensaAsmParser.cpp.

Referenced by getReg(), and XtensaOperand().

◆ StartLoc

SMLoc XtensaOperand::StartLoc

Definition at line 119 of file XtensaAsmParser.cpp.

Referenced by getStartLoc(), and XtensaOperand().

◆ Tok

StringRef XtensaOperand::Tok

Definition at line 121 of file XtensaAsmParser.cpp.

Referenced by getToken(), and XtensaOperand().


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