22 #define DEBUG_TYPE "asm-printer" 24 #include "SystemZGenAsmWriter.inc" 72 assert(isUInt<N>(Value) &&
"Invalid uimm argument");
79 assert(isInt<N>(Value) &&
"Invalid simm argument");
83 void SystemZInstPrinter::printU1ImmOperand(
const MCInst *
MI,
int OpNum,
85 printUImmOperand<1>(
MI, OpNum,
O);
88 void SystemZInstPrinter::printU2ImmOperand(
const MCInst *MI,
int OpNum,
90 printUImmOperand<2>(
MI, OpNum,
O);
93 void SystemZInstPrinter::printU3ImmOperand(
const MCInst *MI,
int OpNum,
95 printUImmOperand<3>(
MI, OpNum,
O);
98 void SystemZInstPrinter::printU4ImmOperand(
const MCInst *MI,
int OpNum,
100 printUImmOperand<4>(
MI, OpNum,
O);
103 void SystemZInstPrinter::printU6ImmOperand(
const MCInst *MI,
int OpNum,
105 printUImmOperand<6>(
MI, OpNum,
O);
108 void SystemZInstPrinter::printS8ImmOperand(
const MCInst *MI,
int OpNum,
110 printSImmOperand<8>(
MI, OpNum,
O);
113 void SystemZInstPrinter::printU8ImmOperand(
const MCInst *MI,
int OpNum,
115 printUImmOperand<8>(
MI, OpNum,
O);
118 void SystemZInstPrinter::printU12ImmOperand(
const MCInst *MI,
int OpNum,
120 printUImmOperand<12>(
MI, OpNum,
O);
123 void SystemZInstPrinter::printS16ImmOperand(
const MCInst *MI,
int OpNum,
125 printSImmOperand<16>(
MI, OpNum,
O);
128 void SystemZInstPrinter::printU16ImmOperand(
const MCInst *MI,
int OpNum,
130 printUImmOperand<16>(
MI, OpNum,
O);
133 void SystemZInstPrinter::printS32ImmOperand(
const MCInst *MI,
int OpNum,
135 printSImmOperand<32>(
MI, OpNum,
O);
138 void SystemZInstPrinter::printU32ImmOperand(
const MCInst *MI,
int OpNum,
140 printUImmOperand<32>(
MI, OpNum,
O);
143 void SystemZInstPrinter::printU48ImmOperand(
const MCInst *MI,
int OpNum,
145 printUImmOperand<48>(
MI, OpNum,
O);
148 void SystemZInstPrinter::printPCRelOperand(
const MCInst *MI,
int OpNum,
158 void SystemZInstPrinter::printPCRelTLSOperand(
const MCInst *MI,
int OpNum,
161 printPCRelOperand(MI, OpNum, O);
186 void SystemZInstPrinter::printBDAddrOperand(
const MCInst *MI,
int OpNum,
192 void SystemZInstPrinter::printBDXAddrOperand(
const MCInst *MI,
int OpNum,
199 void SystemZInstPrinter::printBDLAddrOperand(
const MCInst *MI,
int OpNum,
204 O << Disp <<
'(' << Length;
210 void SystemZInstPrinter::printBDRAddrOperand(
const MCInst *MI,
int OpNum,
221 void SystemZInstPrinter::printBDVAddrOperand(
const MCInst *MI,
int OpNum,
228 void SystemZInstPrinter::printCond4Operand(
const MCInst *MI,
int OpNum,
230 static const char *
const CondNames[] = {
231 "o",
"h",
"nle",
"l",
"nhe",
"lh",
"ne",
232 "e",
"nlh",
"he",
"nl",
"le",
"nh",
"no" 235 assert(Imm > 0 && Imm < 15 &&
"Invalid condition");
236 O << CondNames[Imm - 1];
void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &O) override
Print the specified MCInst to the specified raw_ostream.
static void printAddress(unsigned Base, int64_t Disp, unsigned Index, raw_ostream &O)
This class represents lattice values for constants.
VariantKind getKind() const
void printInstruction(const MCInst *MI, uint64_t Address, 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.
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.
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.