24#define DEBUG_TYPE "loongarch-asm-printer"
27#define PRINT_ALIAS_INSTR
28#include "LoongArchGenAsmWriter.inc"
32 cl::desc(
"Print numeric register names rather than the ABI "
33 "names (such as $r0 instead of $zero)"),
42 if (Opt ==
"numeric") {
63void LoongArchInstPrinter::printOperand(
const MCInst *
MI,
unsigned OpNo,
78 assert(MO.
isExpr() &&
"Unknown operand kind in printOperand");
86 assert(MO.
isReg() &&
"printAtomicMemOp can only print register operands");
93 : 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)
static const char * getRegisterName(MCRegister Reg)
void printRegName(raw_ostream &O, MCRegister Reg) const override
Print the assembler register name.
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.
unsigned 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.