Chris Lattner | fadc83c | 2009-06-19 00:47:59 +0000 | [diff] [blame] | 1 | //===-- X86ATTInstPrinter.cpp - AT&T assembly instruction printing --------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file includes code for rendering MCInst instances as AT&T-style |
| 11 | // assembly. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #define DEBUG_TYPE "asm-printer" |
| 16 | #include "llvm/MC/MCInst.h" |
| 17 | #include "X86ATTAsmPrinter.h" |
Chris Lattner | d5fb790 | 2009-06-19 23:59:57 +0000 | [diff] [blame] | 18 | #include "llvm/Support/raw_ostream.h" |
Chris Lattner | fadc83c | 2009-06-19 00:47:59 +0000 | [diff] [blame] | 19 | using namespace llvm; |
| 20 | |
Chris Lattner | d5fb790 | 2009-06-19 23:59:57 +0000 | [diff] [blame] | 21 | // Include the auto-generated portion of the assembly writer. |
| 22 | #define MachineInstr MCInst |
| 23 | #define NO_ASM_WRITER_BOILERPLATE |
| 24 | #include "X86GenAsmWriter.inc" |
| 25 | #undef MachineInstr |
| 26 | |
| 27 | void X86ATTAsmPrinter::printSSECC(const MCInst *MI, unsigned Op) { |
| 28 | unsigned char value = MI->getOperand(Op).getImm(); |
| 29 | assert(value <= 7 && "Invalid ssecc argument!"); |
| 30 | switch (value) { |
| 31 | case 0: O << "eq"; break; |
| 32 | case 1: O << "lt"; break; |
| 33 | case 2: O << "le"; break; |
| 34 | case 3: O << "unord"; break; |
| 35 | case 4: O << "neq"; break; |
| 36 | case 5: O << "nlt"; break; |
| 37 | case 6: O << "nle"; break; |
| 38 | case 7: O << "ord"; break; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | |
| 43 | void X86ATTAsmPrinter::printPICLabel(const MCInst *MI, unsigned Op) { |
| 44 | assert(0 && |
| 45 | "This is only used for MOVPC32r, should lower before asm printing!"); |
| 46 | } |
| 47 | |
| 48 | |
| 49 | void X86ATTAsmPrinter::printOperand(const MCInst *MI, unsigned OpNo, |
| 50 | const char *Modifier, bool NotRIPRel) { |
| 51 | } |
| 52 | |
| 53 | void X86ATTAsmPrinter::printLeaMemReference(const MCInst *MI, unsigned Op, |
| 54 | const char *Modifier, |
| 55 | bool NotRIPRel) { |
| 56 | } |
| 57 | |
| 58 | void X86ATTAsmPrinter::printMemReference(const MCInst *MI, unsigned Op, |
| 59 | const char *Modifier, bool NotRIPRel){ |
| 60 | } |