26 #define DEBUG_TYPE "asm-printer" 28 #define GET_INSTRUCTION_NAME 29 #include "HexagonGenAsmWriter.inc" 49 void HexagonInstPrinter::setExtender(
MCInst const &MCI) {
60 MCInst const &MCI = *
I.getInst();
75 OS << (IsLoop1 ?
" :endloop01" :
" :endloop0");
91 if (MO.
getExpr()->evaluateAsAbsolute(Value))
160 O <<
'#' << (hi ?
"HI" :
"LO") <<
'(';
172 if (Expr.evaluateAsAbsolute(Value))
173 O <<
format(
"0x%" PRIx64, Value);
bool isDuplex(MCInstrInfo const &MCII, MCInst const &MCI)
void printRegName(raw_ostream &O, unsigned RegNo) const override
Print the assembler register name.
Compute iterated dominance frontiers using a linear time algorithm.
void printBrtarget(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
void printNegImmOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
void printUnsignedImmOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
bool isBundle(MCInst const &MCI)
void printGlobalOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
void printConstantPool(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
bool isOuterLoop(MCInst const &MCI)
void printInst(MCInst const *MI, raw_ostream &O, StringRef Annot, const MCSubtargetInfo &STI) override
Print the specified MCInst to the specified raw_ostream.
StringRef getRegName(unsigned RegNo) const
void printCallOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
bool isImmext(MCInst const &MCI)
#define HEXAGON_PACKET_SIZE
Base class for the full range of assembler expressions which are needed for parsing.
iterator_range< Hexagon::PacketIterator > bundleInstructions(MCInstrInfo const &MCII, MCInst const &MCI)
void printAbsAddrOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
unsigned getReg() const
Returns the register number.
format_object< int64_t > formatImm(int64_t Value) const
Utility function to print immediates in decimal or hex.
const MCInst * getInst() const
const MCExpr * getExpr() const
virtual StringRef getOpcodeName(unsigned Opcode) const
Instances of this class represent a single low-level machine instruction.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
This class is intended to be used as a base class for asm properties and features specific to the tar...
void printJumpTable(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
unsigned const MachineRegisterInfo * MRI
void printExtOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
void printSymbol(MCInst const *MI, unsigned OpNo, raw_ostream &O, bool hi) const
void printPredicateOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
Interface to description of machine instruction set.
StringRef getName(unsigned Opcode) const
Returns the name for the instructions with the given opcode.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
unsigned short getExtendableOp(MCInstrInfo const &MCII, MCInst const &MCI)
const MCOperand & getOperand(unsigned i) const
void printInstruction(MCInst const *MI, raw_ostream &O)
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
HexagonInstPrinter(MCAsmInfo const &MAI, MCInstrInfo const &MII, MCRegisterInfo const &MRI)
Generic base class for all target subtargets.
void printNOneImmOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
size_t bundleSize(MCInst const &MCI)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isInnerLoop(MCInst const &MCI)
LLVM Value Representation.
static char const * getRegisterName(unsigned RegNo)
This class implements an extremely fast bulk output stream that can only output to a stream...
bool isConstExtended(MCInstrInfo const &MCII, MCInst const &MCI)
StringRef - Represent a constant reference to a string, i.e.
Instances of this class represent operands of the MCInst class.
void printOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const
void printBranchOperand(MCInst const *MI, unsigned OpNo, raw_ostream &O) const