22#define DEBUG_TYPE "loongarch-asm-printer"
25#define PRINT_ALIAS_INSTR
26#include "LoongArchGenAsmWriter.inc"
30 cl::desc(
"Print numeric register names rather than the ABI "
31 "names (such as $r0 instead of $zero)"),
40 if (Opt ==
"numeric") {
61void LoongArchInstPrinter::printOperand(
const MCInst *
MI,
unsigned OpNo,
76 assert(MO.
isExpr() &&
"Unknown operand kind in printOperand");
84 assert(MO.
isReg() &&
"printAtomicMemOp can only print register operands");
91 : LoongArch::RegAliasName);
static cl::opt< bool > NumericReg("loongarch-numeric-reg", cl::desc("Print numeric register names rather than the ABI " "names (such as $r0 instead of $zero)"), cl::init(false), cl::Hidden)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void printInstruction(const MCInst *MI, uint64_t Address, const MCSubtargetInfo &STI, raw_ostream &O)
void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) override
Print the specified MCInst to the specified raw_ostream.
bool applyTargetSpecificCLOption(StringRef Opt) override
Customize the printer according to a command line option.
bool printAliasInstr(const MCInst *MI, uint64_t Address, const MCSubtargetInfo &STI, raw_ostream &O)
void printRegName(raw_ostream &O, MCRegister Reg) override
Print the assembler register name.
static const char * getRegisterName(MCRegister Reg)
void printAtomicMemOp(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O)
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
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.
Generic base class for all target subtargets.
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.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.