22 #define DEBUG_TYPE "asm-printer" 24 #include "SystemZGenAsmWriter.inc" 68 assert(isUInt<N>(Value) &&
"Invalid uimm argument");
75 assert(isInt<N>(Value) &&
"Invalid simm argument");
79 void SystemZInstPrinter::printU1ImmOperand(
const MCInst *
MI,
int OpNum,
81 printUImmOperand<1>(
MI, OpNum,
O);
84 void SystemZInstPrinter::printU2ImmOperand(
const MCInst *MI,
int OpNum,
86 printUImmOperand<2>(
MI, OpNum,
O);
89 void SystemZInstPrinter::printU3ImmOperand(
const MCInst *MI,
int OpNum,
91 printUImmOperand<3>(
MI, OpNum,
O);
94 void SystemZInstPrinter::printU4ImmOperand(
const MCInst *MI,
int OpNum,
96 printUImmOperand<4>(
MI, OpNum,
O);
99 void SystemZInstPrinter::printU6ImmOperand(
const MCInst *MI,
int OpNum,
101 printUImmOperand<6>(
MI, OpNum,
O);
104 void SystemZInstPrinter::printS8ImmOperand(
const MCInst *MI,
int OpNum,
106 printSImmOperand<8>(
MI, OpNum,
O);
109 void SystemZInstPrinter::printU8ImmOperand(
const MCInst *MI,
int OpNum,
111 printUImmOperand<8>(
MI, OpNum,
O);
114 void SystemZInstPrinter::printU12ImmOperand(
const MCInst *MI,
int OpNum,
116 printUImmOperand<12>(
MI, OpNum,
O);
119 void SystemZInstPrinter::printS16ImmOperand(
const MCInst *MI,
int OpNum,
121 printSImmOperand<16>(
MI, OpNum,
O);
124 void SystemZInstPrinter::printU16ImmOperand(
const MCInst *MI,
int OpNum,
126 printUImmOperand<16>(
MI, OpNum,
O);
129 void SystemZInstPrinter::printS32ImmOperand(
const MCInst *MI,
int OpNum,
131 printSImmOperand<32>(
MI, OpNum,
O);
134 void SystemZInstPrinter::printU32ImmOperand(
const MCInst *MI,
int OpNum,
136 printUImmOperand<32>(
MI, OpNum,
O);
139 void SystemZInstPrinter::printU48ImmOperand(
const MCInst *MI,
int OpNum,
141 printUImmOperand<48>(
MI, OpNum,
O);
144 void SystemZInstPrinter::printPCRelOperand(
const MCInst *MI,
int OpNum,
154 void SystemZInstPrinter::printPCRelTLSOperand(
const MCInst *MI,
int OpNum,
157 printPCRelOperand(MI, OpNum, O);
182 void SystemZInstPrinter::printBDAddrOperand(
const MCInst *MI,
int OpNum,
188 void SystemZInstPrinter::printBDXAddrOperand(
const MCInst *MI,
int OpNum,
195 void SystemZInstPrinter::printBDLAddrOperand(
const MCInst *MI,
int OpNum,
200 O << Disp <<
'(' << Length;
206 void SystemZInstPrinter::printBDRAddrOperand(
const MCInst *MI,
int OpNum,
217 void SystemZInstPrinter::printBDVAddrOperand(
const MCInst *MI,
int OpNum,
224 void SystemZInstPrinter::printCond4Operand(
const MCInst *MI,
int OpNum,
226 static const char *
const CondNames[] = {
227 "o",
"h",
"nle",
"l",
"nhe",
"lh",
"ne",
228 "e",
"nlh",
"he",
"nl",
"le",
"nh",
"no" 231 assert(Imm > 0 && Imm < 15 &&
"Invalid condition");
232 O << CondNames[Imm - 1];
void printInstruction(const MCInst *MI, raw_ostream &O)
static void printAddress(unsigned Base, int64_t Disp, unsigned Index, raw_ostream &O)
This class represents lattice values for constants.
VariantKind getKind() const
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.
const MCExpr * getExpr() const
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...
static const char * getRegisterName(unsigned RegNo)
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
static void printUImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
unsigned getNumOperands() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const MCSymbol & getSymbol() const
const MCOperand & getOperand(unsigned i) const
static void printSImmOperand(const MCInst *MI, int OpNum, raw_ostream &O)
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.
StringRef getName() const
getName - Get the symbol name.
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.