23 #define DEBUG_TYPE "asm-printer" 25 #include "SystemZGenAsmWriter.inc" 69 assert(isUInt<N>(Value) &&
"Invalid uimm argument");
76 assert(isInt<N>(Value) &&
"Invalid simm argument");
80 void SystemZInstPrinter::printU1ImmOperand(
const MCInst *
MI,
int OpNum,
82 printUImmOperand<1>(
MI, OpNum,
O);
85 void SystemZInstPrinter::printU2ImmOperand(
const MCInst *MI,
int OpNum,
87 printUImmOperand<2>(
MI, OpNum,
O);
90 void SystemZInstPrinter::printU3ImmOperand(
const MCInst *MI,
int OpNum,
92 printUImmOperand<3>(
MI, OpNum,
O);
95 void SystemZInstPrinter::printU4ImmOperand(
const MCInst *MI,
int OpNum,
97 printUImmOperand<4>(
MI, OpNum,
O);
100 void SystemZInstPrinter::printU6ImmOperand(
const MCInst *MI,
int OpNum,
102 printUImmOperand<6>(
MI, OpNum,
O);
105 void SystemZInstPrinter::printS8ImmOperand(
const MCInst *MI,
int OpNum,
107 printSImmOperand<8>(
MI, OpNum,
O);
110 void SystemZInstPrinter::printU8ImmOperand(
const MCInst *MI,
int OpNum,
112 printUImmOperand<8>(
MI, OpNum,
O);
115 void SystemZInstPrinter::printU12ImmOperand(
const MCInst *MI,
int OpNum,
117 printUImmOperand<12>(
MI, OpNum,
O);
120 void SystemZInstPrinter::printS16ImmOperand(
const MCInst *MI,
int OpNum,
122 printSImmOperand<16>(
MI, OpNum,
O);
125 void SystemZInstPrinter::printU16ImmOperand(
const MCInst *MI,
int OpNum,
127 printUImmOperand<16>(
MI, OpNum,
O);
130 void SystemZInstPrinter::printS32ImmOperand(
const MCInst *MI,
int OpNum,
132 printSImmOperand<32>(
MI, OpNum,
O);
135 void SystemZInstPrinter::printU32ImmOperand(
const MCInst *MI,
int OpNum,
137 printUImmOperand<32>(
MI, OpNum,
O);
140 void SystemZInstPrinter::printU48ImmOperand(
const MCInst *MI,
int OpNum,
142 printUImmOperand<48>(
MI, OpNum,
O);
145 void SystemZInstPrinter::printPCRelOperand(
const MCInst *MI,
int OpNum,
155 void SystemZInstPrinter::printPCRelTLSOperand(
const MCInst *MI,
int OpNum,
158 printPCRelOperand(MI, OpNum, O);
183 void SystemZInstPrinter::printBDAddrOperand(
const MCInst *MI,
int OpNum,
189 void SystemZInstPrinter::printBDXAddrOperand(
const MCInst *MI,
int OpNum,
196 void SystemZInstPrinter::printBDLAddrOperand(
const MCInst *MI,
int OpNum,
201 O << Disp <<
'(' << Length;
207 void SystemZInstPrinter::printBDRAddrOperand(
const MCInst *MI,
int OpNum,
218 void SystemZInstPrinter::printBDVAddrOperand(
const MCInst *MI,
int OpNum,
225 void SystemZInstPrinter::printCond4Operand(
const MCInst *MI,
int OpNum,
227 static const char *
const CondNames[] = {
228 "o",
"h",
"nle",
"l",
"nhe",
"lh",
"ne",
229 "e",
"nlh",
"he",
"nl",
"le",
"nh",
"no" 232 assert(Imm > 0 && Imm < 15 &&
"Invalid condition");
233 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.