27 #define DEBUG_TYPE "asm-printer" 29 #include "NVPTXGenAsmWriter.inc" 38 unsigned RCId = (RegNo >> 28);
72 unsigned VReg = RegNo & 0x0FFFFFFF;
90 }
else if (Op.
isImm()) {
93 assert(Op.
isExpr() &&
"Unknown operand kind in printOperand");
99 const char *Modifier) {
101 int64_t Imm = MO.
getImm();
103 if (strcmp(Modifier,
"ftz") == 0) {
107 }
else if (strcmp(Modifier,
"sat") == 0) {
111 }
else if (strcmp(Modifier,
"base") == 0) {
149 const char *Modifier) {
151 int64_t Imm = MO.
getImm();
153 if (strcmp(Modifier,
"ftz") == 0) {
157 }
else if (strcmp(Modifier,
"base") == 0) {
225 int Imm = (int) MO.
getImm();
226 if (!strcmp(Modifier,
"volatile")) {
229 }
else if (!strcmp(Modifier,
"addsp")) {
251 }
else if (!strcmp(Modifier,
"sign")) {
262 }
else if (!strcmp(Modifier,
"vec")) {
277 if (Modifier && !strcmp(Modifier,
"add")) {
292 assert(Op.
isExpr() &&
"Call prototype is not an MCExpr?");
void printCvtMode(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
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.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void printInstruction(const MCInst *MI, raw_ostream &O)
void printCmpMode(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printInst(const MCInst *MI, raw_ostream &OS, 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.
NVPTXInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
unsigned getReg() const
Returns the register number.
void printMemOperand(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
format_object< int64_t > formatImm(int64_t Value) const
Utility function to print immediates in decimal or hex.
const MCExpr * getExpr() const
Expected< const typename ELFT::Sym * > getSymbol(typename ELFT::SymRange Symbols, uint32_t Index)
Instances of this class represent a single low-level machine instruction.
void printLdStCode(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...
This class is intended to be used as a base class for asm properties and features specific to the tar...
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
unsigned const MachineRegisterInfo * MRI
StringRef markup(StringRef s) const
Utility functions to make adding mark ups simpler.
Interface to description of machine instruction set.
static const char * getRegisterName(unsigned RegNo)
void printRegName(raw_ostream &OS, unsigned RegNo) const override
Print the assembler register name.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const MCOperand & getOperand(unsigned i) const
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Generic base class for all target subtargets.
StringRef getName() const
getName - Get the symbol name.
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.
void printProtoIdent(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)