10 #define DEBUG_TYPE "asm-printer"
19 #include "SystemZGenAsmWriter.inc"
30 assert(!Index &&
"Shouldn't have an index without a base");
54 void SystemZInstPrinter::printU4ImmOperand(
const MCInst *
MI,
int OpNum,
57 assert(isUInt<4>(Value) &&
"Invalid u4imm argument");
61 void SystemZInstPrinter::printU6ImmOperand(
const MCInst *MI,
int OpNum,
64 assert(isUInt<6>(Value) &&
"Invalid u6imm argument");
68 void SystemZInstPrinter::printS8ImmOperand(
const MCInst *MI,
int OpNum,
71 assert(
isInt<8>(Value) &&
"Invalid s8imm argument");
75 void SystemZInstPrinter::printU8ImmOperand(
const MCInst *MI,
int OpNum,
78 assert(
isUInt<8>(Value) &&
"Invalid u8imm argument");
82 void SystemZInstPrinter::printS16ImmOperand(
const MCInst *MI,
int OpNum,
85 assert(
isInt<16>(Value) &&
"Invalid s16imm argument");
89 void SystemZInstPrinter::printU16ImmOperand(
const MCInst *MI,
int OpNum,
92 assert(
isUInt<16>(Value) &&
"Invalid u16imm argument");
96 void SystemZInstPrinter::printS32ImmOperand(
const MCInst *MI,
int OpNum,
99 assert(
isInt<32>(Value) &&
"Invalid s32imm argument");
103 void SystemZInstPrinter::printU32ImmOperand(
const MCInst *MI,
int OpNum,
106 assert(
isUInt<32>(Value) &&
"Invalid u32imm argument");
110 void SystemZInstPrinter::printAccessRegOperand(
const MCInst *MI,
int OpNum,
113 assert(Value < 16 &&
"Invalid access register number");
114 O <<
"%a" << (
unsigned int)Value;
117 void SystemZInstPrinter::printPCRelOperand(
const MCInst *MI,
int OpNum,
132 void SystemZInstPrinter::printBDAddrOperand(
const MCInst *MI,
int OpNum,
138 void SystemZInstPrinter::printBDXAddrOperand(
const MCInst *MI,
int OpNum,
145 void SystemZInstPrinter::printBDLAddrOperand(
const MCInst *MI,
int OpNum,
150 O << Disp <<
'(' << Length;
156 void SystemZInstPrinter::printCond4Operand(
const MCInst *MI,
int OpNum,
158 static const char *
const CondNames[] = {
159 "o",
"h",
"nle",
"l",
"nhe",
"lh",
"ne",
160 "e",
"nlh",
"he",
"nl",
"le",
"nh",
"no"
163 assert(Imm > 0 && Imm < 15 &&
"Invalid condition");
164 O << CondNames[Imm - 1];
bool isInt< 32 >(int64_t x)
bool isUInt< 8 >(uint64_t x)
virtual void printRegName(raw_ostream &O, unsigned RegNo) const LLVM_OVERRIDE
printRegName - Print the assembler register name.
void printInstruction(const MCInst *MI, raw_ostream &O)
static void printAddress(unsigned Base, int64_t Disp, unsigned Index, raw_ostream &O)
#define llvm_unreachable(msg)
bool isInt< 8 >(int64_t x)
unsigned getReg() const
getReg - Returns the register number.
raw_ostream & write_hex(unsigned long long N)
write_hex - Output N in hexadecimal, without any prefix or padding.
const MCExpr * getExpr() const
static const char * getRegisterName(unsigned RegNo)
static void printOperand(const MCOperand &MO, raw_ostream &O)
bool isUInt< 32 >(uint64_t x)
virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot) LLVM_OVERRIDE
bool isInt< 16 >(int64_t x)
LLVM Value Representation.
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
bool isUInt< 16 >(uint64_t x)
const MCOperand & getOperand(unsigned i) const