23 #define DEBUG_TYPE "asm-printer"
33 #define GET_INSTRUCTION_NAME
34 #define PRINT_ALIAS_INSTR
35 #include "SparcGenAsmWriter.inc"
57 default:
return false;
65 default:
return false;
71 case SP::I7: O <<
"\tret";
return true;
72 case SP::O7: O <<
"\tretl";
return true;
82 case SP::V9FCMPS:
case SP::V9FCMPD:
case SP::V9FCMPQ:
83 case SP::V9FCMPES:
case SP::V9FCMPED:
case SP::V9FCMPEQ: {
92 case SP::V9FCMPS: O <<
"\tfcmps ";
break;
93 case SP::V9FCMPD: O <<
"\tfcmpd ";
break;
94 case SP::V9FCMPQ: O <<
"\tfcmpq ";
break;
95 case SP::V9FCMPES: O <<
"\tfcmpes ";
break;
96 case SP::V9FCMPED: O <<
"\tfcmped ";
break;
97 case SP::V9FCMPEQ: O <<
"\tfcmpeq ";
break;
122 assert(MO.
isExpr() &&
"Unknown operand kind in printOperand");
132 if (Modifier && !strcmp(Modifier,
"arith")) {
161 case SP::MOVFCCrr:
case SP::V9MOVFCCrr:
162 case SP::MOVFCCri:
case SP::V9MOVFCCri:
163 case SP::FMOVS_FCC:
case SP::V9FMOVS_FCC:
164 case SP::FMOVD_FCC:
case SP::V9FMOVD_FCC:
165 case SP::FMOVQ_FCC:
case SP::V9FMOVQ_FCC:
167 CC = (CC < 16) ? (CC + 16) : CC;
bool printAliasInstr(const MCInst *MI, const MCSubtargetInfo &STI, raw_ostream &O)
void printInstruction(const MCInst *MI, const MCSubtargetInfo &STI, raw_ostream &O)
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, const MCSubtargetInfo &STI) override
Print the specified MCInst to the specified raw_ostream.
static const char * SPARCCondCodeToString(SPCC::CondCodes CC)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static const char * getRegisterName(unsigned RegNo)
unsigned getReg() const
Returns the register number.
void printRegName(raw_ostream &OS, unsigned RegNo) const override
Print the assembler register name.
Instances of this class represent a single low-level machine instruction.
const MCExpr * getExpr() const
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
void printMemOperand(const MCInst *MI, int opNum, const MCSubtargetInfo &STI, raw_ostream &OS, const char *Modifier=nullptr)
bool printGetPCX(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &OS)
const FeatureBitset & getFeatureBits() const
getFeatureBits - Return the feature bits.
void printOperand(const MCInst *MI, int opNum, const MCSubtargetInfo &STI, raw_ostream &OS)
unsigned getOpcode() const
void printCCOperand(const MCInst *MI, int opNum, const MCSubtargetInfo &STI, raw_ostream &OS)
unsigned getNumOperands() const
MCSubtargetInfo - Generic base class for all target subtargets.
bool isV9(const MCSubtargetInfo &STI) const
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.
bool printSparcAliasInstr(const MCInst *MI, const MCSubtargetInfo &STI, raw_ostream &OS)
std::string lower() const
const MCOperand & getOperand(unsigned i) const