Go to the documentation of this file.
26 #define DEBUG_TYPE "asm-printer"
28 #include "NVPTXGenAsmWriter.inc"
37 unsigned RCId = (
Reg.id() >> 28);
71 unsigned VReg =
Reg.id() & 0x0FFFFFFF;
88 unsigned Reg =
Op.getReg();
90 }
else if (
Op.isImm()) {
93 assert(
Op.isExpr() &&
"Unknown operand kind in printOperand");
94 Op.getExpr()->print(
O, &
MAI);
99 const char *Modifier) {
103 if (strcmp(Modifier,
"ftz") == 0) {
107 }
else if (strcmp(Modifier,
"sat") == 0) {
111 }
else if (strcmp(Modifier,
"relu") == 0) {
115 }
else if (strcmp(Modifier,
"base") == 0) {
156 const char *Modifier) {
160 if (strcmp(Modifier,
"ftz") == 0) {
164 }
else if (strcmp(Modifier,
"base") == 0) {
233 if (!strcmp(Modifier,
"volatile")) {
236 }
else if (!strcmp(Modifier,
"addsp")) {
258 }
else if (!strcmp(Modifier,
"sign")) {
269 }
else if (!strcmp(Modifier,
"vec")) {
281 const char *Modifier) {
284 if (Modifier ==
nullptr || strcmp(Modifier,
"version") == 0) {
286 }
else if (strcmp(Modifier,
"aligned") == 0) {
298 if (Modifier && !strcmp(Modifier,
"add")) {
302 if (
MI->getOperand(OpNum + 1).isImm() &&
303 MI->getOperand(OpNum + 1).getImm() == 0)
313 assert(
Op.isExpr() &&
"Call prototype is not an MCExpr?");
315 const MCSymbol &Sym = cast<MCSymbolRefExpr>(Expr)->getSymbol();
This is an optimization pass for GlobalISel generic memory operations.
void printMemOperand(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
static const char * getRegisterName(MCRegister Reg)
void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O)
This class is intended to be used as a base class for asm properties and features specific to the tar...
Reg
All possible values of the reg field in the ModR/M byte.
void printProtoIdent(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
NVPTXInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
Instances of this class represent a single low-level machine instruction.
void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &OS) override
Print the specified MCInst to the specified raw_ostream.
Clang compiles this i1 i64 store i64 i64 store i64 i64 store i64 i64 store i64 align Which gets codegen d xmm0 movaps rbp movaps rbp movaps rbp movaps rbp rbp rbp rbp rbp It would be better to have movq s of instead of the movaps s LLVM produces ret int
void printLdStCode(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class implements an extremely fast bulk output stream that can only output to a stream.
StringRef getName() const
getName - Get the symbol name.
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
format_object< int64_t > formatImm(int64_t Value) const
Utility function to print immediates in decimal or hex.
StringRef - Represent a constant reference to a string, i.e.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void printMmaCode(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
unsigned const MachineRegisterInfo * MRI
Interface to description of machine instruction set.
StringRef markup(StringRef s) const
Utility functions to make adding mark ups simpler.
void printCvtMode(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
Instances of this class represent operands of the MCInst class.
void printCmpMode(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
void printRegName(raw_ostream &OS, MCRegister Reg) const override
Print the assembler register name.
Generic base class for all target subtargets.
Base class for the full range of assembler expressions which are needed for parsing.
Wrapper class representing physical registers. Should be passed by value.