24 #define DEBUG_TYPE "asm-printer"
26 #include "XCoreGenAsmWriter.inc"
38 void XCoreInstPrinter::
43 void XCoreInstPrinter::
53 if (
const MCBinaryExpr *BE = dyn_cast<MCBinaryExpr>(Expr)) {
56 assert(SRE && CE &&
"Binary expression must be sym+const.");
57 Offset = CE->getValue();
60 assert(SRE &&
"Unexpected MCExpr type.");
73 void XCoreInstPrinter::
86 assert(Op.
isExpr() &&
"unknown operand kind in printOperand");
const MCSymbol & getSymbol() const
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, const MCSubtargetInfo &STI) override
Print the specified MCInst to the specified raw_ostream.
Base class for the full range of assembler expressions which are needed for parsing.
Represent a reference to a symbol from inside an expression.
unsigned getReg() const
Returns the register number.
void printRegName(raw_ostream &OS, unsigned RegNo) const override
Print the assembler register name.
Instances of this class represent a single low-level machine instruction.
This class is intended to be used as a base class for asm properties and features specific to the tar...
const MCExpr * getExpr() const
void printInstruction(const MCInst *MI, raw_ostream &O)
Binary assembler expressions.
static void printExpr(const MCExpr *Expr, const MCAsmInfo *MAI, raw_ostream &OS)
MCSubtargetInfo - Generic base class for all target subtargets.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
This file contains the declaration of the XCoreInstPrinter class, which is used to print XCore MCInst...
VariantKind getKind() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
Instances of this class represent operands of the MCInst class.
LLVM_NODISCARD std::string lower() const
const MCOperand & getOperand(unsigned i) const
static const char * getRegisterName(unsigned RegNo)