24#define DEBUG_TYPE "ve-asmprinter"
26#define GET_INSTRUCTION_NAME
27#define PRINT_ALIAS_INSTR
28#include "VEGenAsmWriter.inc"
32 unsigned AltIdx = VE::AsmName;
35 AltIdx = VE::NoRegAltName;
58 int32_t TruncatedImm =
static_cast<int32_t
>(MO.
getImm());
63 assert(MO.
isExpr() &&
"Unknown operand kind in printOperand");
71 if (Modifier && !strcmp(Modifier,
"arith")) {
78 if (
MI->getOperand(OpNum + 2).isImm() &&
79 MI->getOperand(OpNum + 2).getImm() == 0) {
84 if (
MI->getOperand(OpNum + 1).isImm() &&
85 MI->getOperand(OpNum + 1).getImm() == 0 &&
86 MI->getOperand(OpNum).isImm() &&
MI->getOperand(OpNum).getImm() == 0) {
87 if (
MI->getOperand(OpNum + 2).isImm() &&
88 MI->getOperand(OpNum + 2).getImm() == 0) {
95 if (
MI->getOperand(OpNum + 1).isImm() &&
96 MI->getOperand(OpNum + 1).getImm() == 0) {
101 if (
MI->getOperand(OpNum).isImm() &&
MI->getOperand(OpNum).getImm() == 0) {
115 if (Modifier && !strcmp(Modifier,
"arith")) {
122 if (
MI->getOperand(OpNum + 1).isImm() &&
123 MI->getOperand(OpNum + 1).getImm() == 0) {
128 if (
MI->getOperand(OpNum).isImm() &&
MI->getOperand(OpNum).getImm() == 0) {
129 if (
MI->getOperand(OpNum + 1).isImm() &&
130 MI->getOperand(OpNum + 1).getImm() == 0) {
146 if (Modifier && !strcmp(Modifier,
"arith")) {
153 if (
MI->getOperand(OpNum + 1).isImm() &&
154 MI->getOperand(OpNum + 1).getImm() == 0) {
159 if (
MI->getOperand(OpNum).isImm() &&
MI->getOperand(OpNum).getImm() == 0) {
160 if (
MI->getOperand(OpNum + 1).isImm() &&
161 MI->getOperand(OpNum + 1).getImm() == 0) {
177 if (Modifier && !strcmp(Modifier,
"arith")) {
184 if (
MI->getOperand(OpNum + 1).isImm() &&
185 MI->getOperand(OpNum + 1).getImm() == 0) {
191 if (
MI->getOperand(OpNum).isReg())
199 int MImm = (int)
MI->getOperand(OpNum).getImm() & 0x7f;
201 O <<
"(" << MImm - 64 <<
")0";
203 O <<
"(" << MImm <<
")1";
208 int CC = (int)
MI->getOperand(OpNum).getImm();
214 int RD = (int)
MI->getOperand(OpNum).getImm();
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
const MCRegisterInfo & MRI
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
Instances of this class represent a single low-level machine instruction.
Instances of this class represent operands of the MCInst class.
unsigned getReg() const
Returns the register number.
const MCExpr * getExpr() const
bool contains(MCRegister Reg) const
contains - Return true if the specified register is included in this register class.
const MCRegisterClass & getRegClass(unsigned i) const
Returns the register class associated with the enumeration value.
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
StringRef - Represent a constant reference to a string, i.e.
void printMImmOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, raw_ostream &OS)
void printMemASOperandHM(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, raw_ostream &OS, const char *Modifier=nullptr)
void printMemASOperandRRM(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, raw_ostream &OS, const char *Modifier=nullptr)
bool printAliasInstr(const MCInst *, uint64_t Address, const MCSubtargetInfo &, raw_ostream &)
void printOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, raw_ostream &OS)
void printRDOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, raw_ostream &OS)
void printMemASXOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, raw_ostream &OS, const char *Modifier=nullptr)
void printCCOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, raw_ostream &OS)
static const char * getRegisterName(MCRegister Reg, unsigned AltIdx=VE::NoRegAltName)
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.
void printInstruction(const MCInst *, uint64_t, const MCSubtargetInfo &, raw_ostream &)
void printMemASOperandASX(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, raw_ostream &OS, const char *Modifier=nullptr)
void printRegName(raw_ostream &OS, MCRegister Reg) const override
Print the assembler register name.
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.
static const char * VECondCodeToString(VECC::CondCode CC)
static const char * VERDToString(VERD::RoundingMode R)