25 #define DEBUG_TYPE "nios2-asm-printer" 33 std::unique_ptr<MCStreamer> Streamer)
36 StringRef getPassName()
const override {
return "Nios2 Assembly Printer"; }
40 bool PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
41 unsigned AsmVariant,
const char *ExtraCode,
43 bool PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNum,
44 unsigned AsmVariant,
const char *ExtraCode,
47 void EmitFunctionEntryLabel()
override;
66 EmitToStreamer(*OutStreamer, TmpInst0);
67 }
while ((++I != E) && I->isInsideBundle());
73 void Nios2AsmPrinter::EmitFunctionEntryLabel() {
74 OutStreamer->EmitLabel(CurrentFnSym);
78 bool Nios2AsmPrinter::PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNum,
85 bool Nios2AsmPrinter::PrintAsmMemoryOperand(
const MachineInstr *MI,
86 unsigned OpNum,
unsigned AsmVariant,
87 const char *ExtraCode,
89 if (ExtraCode && ExtraCode[0])
93 assert(MO.
isReg() &&
"unexpected inline asm memory operand");
unsigned getTargetFlags() const
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
instr_iterator instr_end()
MachineBasicBlock * getMBB() const
Compute iterated dominance frontiers using a linear time algorithm.
unsigned getReg() const
getReg - Returns the register number.
MachineBasicBlock reference.
Target & getTheNios2Target()
Name of external global symbol.
static StringRef getName(Value *V)
const char * getSymbolName() const
RegisterAsmPrinter - Helper template for registering a target specific assembly printer, for use in the target machine initialization function.
Expected< const typename ELFT::Sym * > getSymbol(typename ELFT::SymRange Symbols, uint32_t Index)
Instances of this class represent a single low-level machine instruction.
Address of a global value.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
const GlobalValue * getGlobal() const
void LowerNios2MachineInstToMCInst(const MachineInstr *MI, MCInst &OutMI, AsmPrinter &AP)
This class is intended to be used as a driving class for all asm writers.
Address of a basic block.
self_iterator getIterator()
void print(raw_ostream &OS) const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Iterator for intrusive lists based on ilist_node.
MachineOperand class - Representation of each machine instruction operand.
void LLVMInitializeNios2AsmPrinter()
const MachineBasicBlock * getParent() const
Representation of each machine instruction.
static bool printOperand(raw_ostream &OS, const SelectionDAG *G, const SDValue Value)
const BlockAddress * getBlockAddress() const
MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
LLVM_NODISCARD std::string lower() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
MO_ABS_HI/LO - Represents the hi or low part of an absolute symbol address.
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
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
static const char * getRegisterName(unsigned RegNo)
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.