26 #define DEBUG_TYPE "asm-printer" 28 #include "XCoreGenAsmWriter.inc" 40 void XCoreInstPrinter::
45 void XCoreInstPrinter::
55 if (
const MCBinaryExpr *BE = dyn_cast<MCBinaryExpr>(Expr)) {
58 assert(SRE && CE &&
"Binary expression must be sym+const.");
59 Offset = CE->getValue();
62 assert(SRE &&
"Unexpected MCExpr type.");
75 void XCoreInstPrinter::
88 assert(Op.
isExpr() &&
"unknown operand kind in printOperand");
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.
VariantKind getKind() const
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.
const MCExpr * getExpr() const
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...
void printInstruction(const MCInst *MI, raw_ostream &O)
Binary assembler expressions.
const MCSymbol & getSymbol() const
const MCOperand & getOperand(unsigned i) const
static void printExpr(const MCExpr *Expr, const MCAsmInfo *MAI, raw_ostream &OS)
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...
LLVM_NODISCARD std::string lower() 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.
static const char * getRegisterName(unsigned RegNo)
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.