32 #define DEBUG_TYPE "asm-printer" 38 std::unique_ptr<MCStreamer> Streamer)
41 StringRef getPassName()
const override {
return "RISCV Assembly Printer"; }
45 bool PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
46 unsigned AsmVariant,
const char *ExtraCode,
48 bool PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNo,
49 unsigned AsmVariant,
const char *ExtraCode,
53 bool emitPseudoExpansionLowering(
MCStreamer &OutStreamer,
63 #define GEN_COMPRESS_INSTR 64 #include "RISCVGenCompressInstEmitter.inc" 67 bool Res = compressInst(CInst, Inst, *
TM.getMCSubtargetInfo(),
68 OutStreamer->getContext());
74 #include "RISCVGenMCPseudoLowering.inc" 78 if (emitPseudoExpansionLowering(*OutStreamer, MI))
83 EmitToStreamer(*OutStreamer, TmpInst);
86 bool RISCVAsmPrinter::PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
113 bool RISCVAsmPrinter::PrintAsmMemoryOperand(
const MachineInstr *MI,
114 unsigned OpNo,
unsigned AsmVariant,
115 const char *ExtraCode,
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
unsigned getReg() const
getReg - Returns the register number.
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
Target & getTheRISCV32Target()
void LLVMInitializeRISCVAsmPrinter()
void LowerRISCVMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, const AsmPrinter &AP)
virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS)
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...
RegisterAsmPrinter - Helper template for registering a target specific assembly printer, for use in the target machine initialization function.
Instances of this class represent a single low-level machine instruction.
Streaming machine code generation interface.
virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS)
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant...
Target & getTheRISCV64Target()
This class is intended to be used as a driving class for all asm writers.
static const char * getRegisterName(unsigned RegNo, unsigned AltIdx=RISCV::ABIRegAltName)
MachineOperand class - Representation of each machine instruction operand.
void EmitToStreamer(MCStreamer &S, const MCInst &Inst)
Representation of each machine instruction.
bool LowerRISCVMachineOperandToMCOperand(const MachineOperand &MO, MCOperand &MCOp, const AsmPrinter &AP)
bool isReg() const
isReg - Tests if this is a MO_Register operand.
This class implements an extremely fast bulk output stream that can only output to a stream...
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.
const MachineOperand & getOperand(unsigned i) const
Instances of this class represent operands of the MCInst class.
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.