27 #define DEBUG_TYPE "asm-printer"
29 #include "NVPTXGenAsmWriter.inc"
38 unsigned RCId = (RegNo >> 28);
66 unsigned VReg = RegNo & 0x0FFFFFFF;
84 }
else if (Op.
isImm()) {
87 assert(Op.
isExpr() &&
"Unknown operand kind in printOperand");
93 const char *Modifier) {
97 if (
strcmp(Modifier,
"ftz") == 0) {
101 }
else if (
strcmp(Modifier,
"sat") == 0) {
105 }
else if (
strcmp(Modifier,
"base") == 0) {
143 const char *Modifier) {
145 int64_t Imm = MO.
getImm();
147 if (
strcmp(Modifier,
"ftz") == 0) {
151 }
else if (
strcmp(Modifier,
"base") == 0) {
219 int Imm = (int) MO.
getImm();
220 if (!
strcmp(Modifier,
"volatile")) {
223 }
else if (!
strcmp(Modifier,
"addsp")) {
245 }
else if (!
strcmp(Modifier,
"sign")) {
252 }
else if (!
strcmp(Modifier,
"vec")) {
267 if (Modifier && !
strcmp(Modifier,
"add")) {
282 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.
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)
Maximum length of the test input libFuzzer tries to guess a good value based on the corpus and reports it always prefer smaller inputs during the corpus shuffle When libFuzzer itself reports a bug this exit code will be used If indicates the maximal total time in seconds to run the fuzzer minimizes the provided crash input Use with strcmp
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.
Reg
All possible values of the reg field in the ModR/M byte.
NVPTXInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
void printMemOperand(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)
unsigned getReg() const
Returns the register number.
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...
const MCExpr * getExpr() 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.
format_object< int64_t > formatImm(int64_t Value) const
Utility function to print immediates in decimal or hex.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
StringRef getName() const
getName - Get the symbol name.
MCSubtargetInfo - Generic base class for all target subtargets.
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) 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.
const MCOperand & getOperand(unsigned i) const
void printProtoIdent(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier=nullptr)