20 #define DEBUG_TYPE "asm-printer"
22 #include "SystemZGenAsmWriter.inc"
66 assert(isUInt<N>(Value) &&
"Invalid uimm argument");
73 assert(isInt<N>(Value) &&
"Invalid simm argument");
77 void SystemZInstPrinter::printU1ImmOperand(
const MCInst *
MI,
int OpNum,
79 printUImmOperand<1>(
MI, OpNum, O);
82 void SystemZInstPrinter::printU2ImmOperand(
const MCInst *
MI,
int OpNum,
84 printUImmOperand<2>(
MI, OpNum, O);
87 void SystemZInstPrinter::printU3ImmOperand(
const MCInst *
MI,
int OpNum,
89 printUImmOperand<3>(
MI, OpNum, O);
92 void SystemZInstPrinter::printU4ImmOperand(
const MCInst *
MI,
int OpNum,
94 printUImmOperand<4>(
MI, OpNum, O);
97 void SystemZInstPrinter::printU6ImmOperand(
const MCInst *
MI,
int OpNum,
99 printUImmOperand<6>(
MI, OpNum, O);
102 void SystemZInstPrinter::printS8ImmOperand(
const MCInst *
MI,
int OpNum,
104 printSImmOperand<8>(
MI, OpNum, O);
107 void SystemZInstPrinter::printU8ImmOperand(
const MCInst *
MI,
int OpNum,
109 printUImmOperand<8>(
MI, OpNum, O);
112 void SystemZInstPrinter::printU12ImmOperand(
const MCInst *
MI,
int OpNum,
114 printUImmOperand<12>(
MI, OpNum, O);
117 void SystemZInstPrinter::printS16ImmOperand(
const MCInst *
MI,
int OpNum,
119 printSImmOperand<16>(
MI, OpNum, O);
122 void SystemZInstPrinter::printU16ImmOperand(
const MCInst *
MI,
int OpNum,
124 printUImmOperand<16>(
MI, OpNum, O);
127 void SystemZInstPrinter::printS32ImmOperand(
const MCInst *
MI,
int OpNum,
129 printSImmOperand<32>(
MI, OpNum, O);
132 void SystemZInstPrinter::printU32ImmOperand(
const MCInst *
MI,
int OpNum,
134 printUImmOperand<32>(
MI, OpNum, O);
137 void SystemZInstPrinter::printU48ImmOperand(
const MCInst *
MI,
int OpNum,
139 printUImmOperand<48>(
MI, OpNum, O);
142 void SystemZInstPrinter::printPCRelOperand(
const MCInst *
MI,
int OpNum,
152 void SystemZInstPrinter::printPCRelTLSOperand(
const MCInst *MI,
int OpNum,
155 printPCRelOperand(MI, OpNum, O);
180 void SystemZInstPrinter::printBDAddrOperand(
const MCInst *MI,
int OpNum,
186 void SystemZInstPrinter::printBDXAddrOperand(
const MCInst *MI,
int OpNum,
193 void SystemZInstPrinter::printBDLAddrOperand(
const MCInst *MI,
int OpNum,
198 O << Disp <<
'(' << Length;
204 void SystemZInstPrinter::printBDRAddrOperand(
const MCInst *MI,
int OpNum,
215 void SystemZInstPrinter::printBDVAddrOperand(
const MCInst *MI,
int OpNum,
222 void SystemZInstPrinter::printCond4Operand(
const MCInst *MI,
int OpNum,
224 static const char *
const CondNames[] = {
225 "o",
"h",
"nle",
"l",
"nhe",
"lh",
"ne",
226 "e",
"nlh",
"he",
"nl",
"le",
"nh",
"no"
229 assert(Imm > 0 && Imm < 15 &&
"Invalid condition");
230 O << CondNames[Imm - 1];
void printInstruction(const MCInst *MI, raw_ostream &O)
const MCSymbol & getSymbol() const
static void printAddress(unsigned Base, int64_t Disp, unsigned Index, raw_ostream &O)
Represent a reference to a symbol from inside an expression.
unsigned getReg() const
Returns the register number.
raw_ostream & write_hex(unsigned long long N)
Output N in hexadecimal, without any prefix or padding.
Instances of this class represent a single low-level machine instruction.
This class is intended to be used as a base class for asm properties and features specific to the tar...
const MCExpr * getExpr() const
static const char * getRegisterName(unsigned RegNo)
static void printUImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef getName() const
getName - Get the symbol name.
unsigned getNumOperands() const
static void printSImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
MCSubtargetInfo - Generic base class for all target subtargets.
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, const MCSubtargetInfo &STI) override
Print the specified MCInst to the specified raw_ostream.
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
VariantKind getKind() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static void printOperand(const MCOperand &MO, const MCAsmInfo *MAI, raw_ostream &O)
LLVM Value Representation.
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.
void printRegName(raw_ostream &O, unsigned RegNo) const override
Print the assembler register name.
Instances of this class represent operands of the MCInst class.
const MCOperand & getOperand(unsigned i) const