15#ifndef LLVM_MC_MCINST_H
16#define LLVM_MC_MCINST_H
41 enum MachineOperandType :
unsigned char {
50 MachineOperandType Kind = kInvalid;
64 bool isValid()
const {
return Kind != kInvalid; }
65 bool isReg()
const {
return Kind == kRegister; }
66 bool isImm()
const {
return Kind == kImmediate; }
67 bool isSFPImm()
const {
return Kind == kSFPImmediate; }
68 bool isDFPImm()
const {
return Kind == kDFPImmediate; }
69 bool isExpr()
const {
return Kind == kExpr; }
70 bool isInst()
const {
return Kind == kInst; }
74 assert(
isReg() &&
"This is not a register operand!");
80 assert(
isReg() &&
"This is not a register operand!");
141 Op.RegVal =
Reg.id();
147 Op.Kind = kImmediate;
154 Op.Kind = kSFPImmediate;
161 Op.Kind = kDFPImmediate;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
dxil pretty DXIL Metadata Pretty Printer
mir Rename Register Operands
This file defines the SmallVector class.
This file implements the C++20 <bit> header.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This class represents an Operation in the Expression.
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Instances of this class represent a single low-level machine instruction.
LLVM_ABI void print(raw_ostream &OS, const MCContext *Ctx=nullptr) const
const_iterator end() const
MCOperand & getOperand(unsigned i)
unsigned getNumOperands() const
SmallVectorImpl< MCOperand >::iterator iterator
unsigned getFlags() const
unsigned getOpcode() const
LLVM_ABI void dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer=nullptr, StringRef Separator=" ", const MCContext *Ctx=nullptr) const
Dump the MCInst as prettily as possible using the additional MC structures, if given.
void erase(iterator First, iterator Last)
ArrayRef< MCOperand > getOperands() const
const_iterator begin() const
iterator insert(iterator I, const MCOperand &Op)
void setFlags(unsigned F)
void setOperands(ArrayRef< MCOperand > Ops)
LLVM_ABI void dump() const
void addOperand(const MCOperand Op)
SmallVectorImpl< MCOperand >::const_iterator const_iterator
void setOpcode(unsigned Op)
const MCOperand & getOperand(unsigned i) const
Instances of this class represent operands of the MCInst class.
static MCOperand createExpr(const MCExpr *Val)
LLVM_ABI bool isBareSymbolRef() const
static MCOperand createSFPImm(uint32_t Val)
LLVM_ABI void print(raw_ostream &OS, const MCContext *Ctx=nullptr) const
void setExpr(const MCExpr *Val)
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
void setReg(MCRegister Reg)
Set the register number.
void setInst(const MCInst *Val)
MCRegister getReg() const
Returns the register number.
void setSFPImm(uint32_t Val)
LLVM_ABI bool evaluateAsConstantImm(int64_t &Imm) const
LLVM_ABI void dump() const
const MCInst * getInst() const
void setDFPImm(uint64_t Val)
const MCExpr * getExpr() const
void setFPImm(double Val)
uint32_t getSFPImm() const
static MCOperand createDFPImm(uint64_t Val)
uint64_t getDFPImm() const
static MCOperand createInst(const MCInst *Val)
Wrapper class representing physical registers. Should be passed by value.
virtual void print(raw_ostream &OS, const Module *M) const
print - Print out the internal state of the pass.
Represents a location in source code.
typename SuperClass::const_iterator const_iterator
typename SuperClass::iterator iterator
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
DWARFExpression::Operation Op
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)