23#define DEBUG_TYPE "asm-printer"
52 }
else if (MO.
isImm())
73 assert(isUInt<N>(
Value) &&
"Invalid uimm argument");
85 int64_t
Value =
MI->getOperand(OpNum).getImm();
92 printUImmOperand<1>(
MI, OpNum, O);
97 printUImmOperand<2>(
MI, OpNum, O);
102 printUImmOperand<3>(
MI, OpNum, O);
107 printUImmOperand<4>(
MI, OpNum, O);
112 printSImmOperand<8>(
MI, OpNum, O);
117 printUImmOperand<8>(
MI, OpNum, O);
122 printUImmOperand<12>(
MI, OpNum, O);
127 printSImmOperand<16>(
MI, OpNum, O);
132 printUImmOperand<16>(
MI, OpNum, O);
137 printSImmOperand<32>(
MI, OpNum, O);
142 printUImmOperand<32>(
MI, OpNum, O);
147 printUImmOperand<48>(
MI, OpNum, O);
168 if ((
unsigned)OpNum + 1 <
MI->getNumOperands()) {
199 MI->getOperand(OpNum + 2).getReg(), O);
204 unsigned Base =
MI->getOperand(OpNum).getReg();
205 const MCOperand &DispMO =
MI->getOperand(OpNum + 1);
218 unsigned Base =
MI->getOperand(OpNum).getReg();
219 const MCOperand &DispMO =
MI->getOperand(OpNum + 1);
220 unsigned Length =
MI->getOperand(OpNum + 2).getReg();
234 MI->getOperand(OpNum + 2).getReg(), O);
239 static const char *
const CondNames[] = {
"o",
"h",
"nle",
"l",
"nhe",
240 "lh",
"ne",
"e",
"nlh",
"he",
241 "nl",
"le",
"nh",
"no"};
242 uint64_t Imm =
MI->getOperand(OpNum).getImm();
243 assert(Imm > 0 && Imm < 15 &&
"Invalid condition");
244 O << CondNames[Imm - 1];
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class is intended to be used as a base class for asm properties and features specific to the tar...
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
WithMarkup markup(raw_ostream &OS, Markup M)
Instances of this class represent a single low-level machine instruction.
Instances of this class represent operands of the MCInst class.
MCRegister getReg() const
Returns the register number.
const MCExpr * getExpr() const
Wrapper class representing physical registers. Should be passed by value.
Represent a reference to a symbol from inside an expression.
const MCSymbol & getSymbol() const
VariantKind getKind() const
StringRef getName() const
getName - Get the symbol name.
void printUImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printU2ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printU3ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printBDXAddrOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printBDVAddrOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printU4ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printSImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printS8ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printBDLAddrOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printOperand(const MCOperand &MO, const MCAsmInfo *MAI, raw_ostream &O)
void printPCRelTLSOperand(const MCInst *MI, uint64_t Address, int OpNum, raw_ostream &O)
void printRegName(raw_ostream &O, MCRegister Reg) override
Print the assembler register name.
virtual void printFormattedRegName(const MCAsmInfo *MAI, MCRegister Reg, raw_ostream &O)
void printU12ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printU32ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printBDAddrOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printPCRelOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printU1ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printU48ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printU8ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printAddress(const MCAsmInfo *MAI, MCRegister Base, const MCOperand &DispMO, MCRegister Index, raw_ostream &O)
void printCond4Operand(const MCInst *MI, int OpNum, raw_ostream &O)
void printBDRAddrOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printS32ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printS16ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
void printU16ImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.