33 #define DEBUG_TYPE "asm-printer" 39 std::unique_ptr<MCStreamer> Streamer)
42 StringRef getPassName()
const override {
return "BPF Assembly Printer"; }
44 bool PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
45 unsigned AsmVariant,
const char *ExtraCode,
47 bool PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNum,
48 unsigned AsmVariant,
const char *ExtraCode,
93 bool BPFAsmPrinter::PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
96 if (ExtraCode && ExtraCode[0])
103 bool BPFAsmPrinter::PrintAsmMemoryOperand(
const MachineInstr *MI,
104 unsigned OpNum,
unsigned AsmVariant,
105 const char *ExtraCode,
110 assert(BaseMO.isReg() &&
"Unexpected base pointer for inline asm memory operand.");
111 assert(OffsetMO.
isImm() &&
"Unexpected offset for inline asm memory operand.");
125 void BPFAsmPrinter::EmitInstruction(
const MachineInstr *MI) {
130 MCInstLowering.
Lower(MI, TmpInst);
131 EmitToStreamer(*OutStreamer, TmpInst);
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
MachineBasicBlock * getMBB() const
Compute iterated dominance frontiers using a linear time algorithm.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
unsigned getReg() const
getReg - Returns the register number.
Address of indexed Jump Table for switch.
MachineBasicBlock reference.
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
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 ...
unsigned getNumOperands() const
Access to explicit operands of the instruction.
Name of external global symbol.
const char * getSymbolName() const
zlib-gnu style compression
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.
Address of a global value.
const GlobalValue * getGlobal() const
MCSymbol * getSymbol(const GlobalValue *GV) const
This class is intended to be used as a driving class for all asm writers.
Address of a basic block.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void Lower(const MachineInstr *MI, MCInst &OutMI) const
MachineOperand class - Representation of each machine instruction operand.
static const char * getRegisterName(unsigned RegNo)
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.
StringRef getName() const
getName - Get the symbol name.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Target & getTheBPFleTarget()
This class implements an extremely fast bulk output stream that can only output to a stream...
void LLVMInitializeBPFAsmPrinter()
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.
Address of indexed Constant in Constant Pool.
Target & getTheBPFbeTarget()
const MachineOperand & getOperand(unsigned i) const
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
Target & getTheBPFTarget()