16 #ifndef LLVM_MC_MCINST_H 17 #define LLVM_MC_MCINST_H 36 enum MachineOperandType :
unsigned char {
44 MachineOperandType Kind = kInvalid;
57 bool isValid()
const {
return Kind != kInvalid; }
58 bool isReg()
const {
return Kind == kRegister; }
59 bool isImm()
const {
return Kind == kImmediate; }
60 bool isFPImm()
const {
return Kind == kFPImmediate; }
61 bool isExpr()
const {
return Kind == kExpr; }
62 bool isInst()
const {
return Kind == kInst; }
66 assert(
isReg() &&
"This is not a register operand!");
72 assert(
isReg() &&
"This is not a register operand!");
125 Op.Kind = kImmediate;
132 Op.Kind = kFPImmediate;
200 return Operands.
insert(I, Op);
227 #endif // LLVM_MC_MCINST_H
This class represents lattice values for constants.
static MCOperand createExpr(const MCExpr *Val)
void setInst(const MCInst *Val)
void push_back(const T &Elt)
void print(raw_ostream &OS) const
print alias Alias Set Printer
MCOperand & getOperand(unsigned i)
amdgpu Simplify well known AMD library false Value Value const Twine & Name
bool isBareSymbolRef() const
static MCOperand createReg(unsigned Reg)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Base class for the full range of assembler expressions which are needed for parsing.
const_iterator begin() const
void setFPImm(double Val)
unsigned getReg() const
Returns the register number.
const MCInst * getInst() const
const MCExpr * getExpr() const
iterator insert(iterator I, const MCOperand &Op)
Instances of this class represent a single low-level machine instruction.
unsigned getFlags() const
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
unsigned getNumOperands() const
SmallVectorImpl< MCOperand >::iterator iterator
void print(raw_ostream &OS) const
iterator erase(const_iterator CI)
void setFlags(unsigned F)
isPodLike - This is a type trait that is used to determine whether a given type can be copied around ...
void setOpcode(unsigned Op)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
const MCOperand & getOperand(unsigned i) const
static MCOperand createFPImm(double Val)
const_iterator end() const
SmallVectorImpl< MCOperand >::const_iterator const_iterator
iterator insert(iterator I, T &&Elt)
static MCOperand createInst(const MCInst *Val)
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
bool evaluateAsConstantImm(int64_t &Imm) const
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
void setReg(unsigned Reg)
Set the register number.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
void addOperand(const MCOperand &Op)
StringRef - Represent a constant reference to a string, i.e.
Represents a location in source code.
unsigned getOpcode() const
Instances of this class represent operands of the MCInst class.
static MCOperand createImm(int64_t Val)
void setExpr(const MCExpr *Val)