LLVM: lib/Target/XCore/MCTargetDesc/XCoreInstPrinter.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
22#include
23
24using namespace llvm;
25
26#define DEBUG_TYPE "asm-printer"
27
28#include "XCoreGenAsmWriter.inc"
29
33
40
41void XCoreInstPrinter::
44}
45
46void XCoreInstPrinter::
49}
50
55
59 assert(SRE && CE && "Binary expression must be sym+const.");
60 Offset = CE->getValue();
61 } else {
63 assert(SRE && "Unexpected MCExpr type.");
64 }
66
68
71 OS << '+';
73 }
74}
75
76void XCoreInstPrinter::
78 const MCOperand &Op = MI->getOperand(OpNo);
79 if (Op.isReg()) {
81 return;
82 }
83
84 if (Op.isImm()) {
86 return;
87 }
88
89 assert(Op.isExpr() && "unknown operand kind in printOperand");
91}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static void printExpr(const MCExpr *Expr, const MCAsmInfo *MAI, raw_ostream &OS)
This file contains the declaration of the XCoreInstPrinter class, which is used to print XCore MCInst...
This class is intended to be used as a base class for asm properties and features specific to the tar...
Binary assembler expressions.
Base class for the full range of assembler expressions which are needed for parsing.
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
Instances of this class represent a single low-level machine instruction.
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
Represent a reference to a symbol from inside an expression.
const MCSymbol & getSymbol() const
uint16_t getSpecifier() const
LLVM_ABI void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.
StringRef - Represent a constant reference to a string, i.e.
LLVM_ABI std::string lower() const
static const char * getRegisterName(MCRegister Reg)
void printRegName(raw_ostream &OS, MCRegister Reg) override
Print the assembler register name.
Definition XCoreInstPrinter.cpp:30
void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O)
void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) override
Print the specified MCInst to the specified raw_ostream.
Definition XCoreInstPrinter.cpp:34
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast - Return the argument parameter cast to the specified type.
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
DWARFExpression::Operation Op