blob: 934e45aa8157e0dcefb7a10131852e7528a4d470 [file] [log] [blame]
Chris Lattnerfadc83c2009-06-19 00:47:59 +00001//===-- 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 Lattnerd5fb7902009-06-19 23:59:57 +000018#include "llvm/Support/raw_ostream.h"
Chris Lattnerfadc83c2009-06-19 00:47:59 +000019using namespace llvm;
20
Chris Lattnerd5fb7902009-06-19 23:59:57 +000021// 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
27void 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
43void 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
49void X86ATTAsmPrinter::printOperand(const MCInst *MI, unsigned OpNo,
50 const char *Modifier, bool NotRIPRel) {
51}
52
53void X86ATTAsmPrinter::printLeaMemReference(const MCInst *MI, unsigned Op,
54 const char *Modifier,
55 bool NotRIPRel) {
56}
57
58void X86ATTAsmPrinter::printMemReference(const MCInst *MI, unsigned Op,
59 const char *Modifier, bool NotRIPRel){
60}