15 #define DEBUG_TYPE "asm-printer"
32 #define PRINT_ALIAS_INSTR
33 #include "X86GenAsmWriter.inc"
36 unsigned RegNo)
const {
45 uint64_t TSFlags = Desc.
TSFlags;
67 case 0: O <<
"eq";
break;
68 case 1: O <<
"lt";
break;
69 case 2: O <<
"le";
break;
70 case 3: O <<
"unord";
break;
71 case 4: O <<
"neq";
break;
72 case 5: O <<
"nlt";
break;
73 case 6: O <<
"nle";
break;
74 case 7: O <<
"ord";
break;
75 case 8: O <<
"eq_uq";
break;
76 case 9: O <<
"nge";
break;
77 case 0xa: O <<
"ngt";
break;
78 case 0xb: O <<
"false";
break;
79 case 0xc: O <<
"neq_oq";
break;
80 case 0xd: O <<
"ge";
break;
81 case 0xe: O <<
"gt";
break;
82 case 0xf: O <<
"true";
break;
91 case 0: O <<
"eq";
break;
92 case 1: O <<
"lt";
break;
93 case 2: O <<
"le";
break;
94 case 3: O <<
"unord";
break;
95 case 4: O <<
"neq";
break;
96 case 5: O <<
"nlt";
break;
97 case 6: O <<
"nle";
break;
98 case 7: O <<
"ord";
break;
99 case 8: O <<
"eq_uq";
break;
100 case 9: O <<
"nge";
break;
101 case 0xa: O <<
"ngt";
break;
102 case 0xb: O <<
"false";
break;
103 case 0xc: O <<
"neq_oq";
break;
104 case 0xd: O <<
"ge";
break;
105 case 0xe: O <<
"gt";
break;
106 case 0xf: O <<
"true";
break;
107 case 0x10: O <<
"eq_os";
break;
108 case 0x11: O <<
"lt_oq";
break;
109 case 0x12: O <<
"le_oq";
break;
110 case 0x13: O <<
"unord_s";
break;
111 case 0x14: O <<
"neq_us";
break;
112 case 0x15: O <<
"nlt_uq";
break;
113 case 0x16: O <<
"nle_uq";
break;
114 case 0x17: O <<
"ord_s";
break;
115 case 0x18: O <<
"eq_us";
break;
116 case 0x19: O <<
"nge_uq";
break;
117 case 0x1a: O <<
"ngt_uq";
break;
118 case 0x1b: O <<
"false_os";
break;
119 case 0x1c: O <<
"neq_os";
break;
120 case 0x1d: O <<
"ge_oq";
break;
121 case 0x1e: O <<
"gt_oq";
break;
122 case 0x1f: O <<
"true_us";
break;
136 assert(Op.
isExpr() &&
"unknown pcrel immediate operand");
141 if (BranchTarget && BranchTarget->EvaluateAsAbsolute(Address)) {
156 }
else if (Op.
isImm()) {
166 assert(Op.
isExpr() &&
"unknown operand kind in printOperand");
188 if (DispSpec.
isImm()) {
189 int64_t DispVal = DispSpec.
getImm();
190 if (DispVal || (!IndexReg.
getReg() && !BaseReg.
getReg()))
193 assert(DispSpec.
isExpr() &&
"non-immediate displacement for LEA?");
225 if (DispSpec.
isImm()) {
228 assert(DispSpec.
isExpr() &&
"non-immediate displacement?");
static const char * getRegisterName(unsigned RegNo)
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
void printAVXCC(const MCInst *MI, unsigned Op, raw_ostream &OS)
void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &OS)
format_object1< int64_t > formatImm(const int64_t Value) const
Utility function to print immediates in decimal or hex.
#define llvm_unreachable(msg)
void printInstruction(const MCInst *MI, raw_ostream &OS)
format_object1< T > format(const char *Fmt, const T &Val)
unsigned getReg() const
getReg - Returns the register number.
void printMemOffset(const MCInst *MI, unsigned OpNo, raw_ostream &OS)
const MCExpr * getExpr() const
StringRef markup(StringRef s) const
Utility functions to make adding mark ups simpler.
format_object1< int64_t > formatHex(const int64_t Value) const
const MCInstrDesc & get(unsigned Opcode) const
void printMemReference(const MCInst *MI, unsigned Op, raw_ostream &OS)
raw_ostream * CommentStream
unsigned getOpcode() const
void printPCRelImm(const MCInst *MI, unsigned OpNo, raw_ostream &OS)
void printSSECC(const MCInst *MI, unsigned Op, raw_ostream &OS)
virtual void printRegName(raw_ostream &OS, unsigned RegNo) const
printRegName - Print the assembler register name.
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
bool printAliasInstr(const MCInst *MI, raw_ostream &OS)
virtual void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot)
void EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS, const char *(*getRegName)(unsigned))
const MCOperand & getOperand(unsigned i) const