blob: f0e1ce22841b5ce20697413a0b210775f68d4460 [file] [log] [blame]
Anton Korobeynikov425a9382009-10-21 00:10:30 +00001//===-- MSP430InstPrinter.h - Convert MSP430 MCInst to assembly syntax ----===//
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 class prints a MSP430 MCInst to a .s file.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MSP430INSTPRINTER_H
15#define MSP430INSTPRINTER_H
16
17#include "llvm/MC/MCInstPrinter.h"
18
Chris Lattner99fbae72010-04-04 05:04:31 +000019namespace llvm {
Anton Korobeynikov425a9382009-10-21 00:10:30 +000020 class MCOperand;
21
22 class MSP430InstPrinter : public MCInstPrinter {
23 public:
Chris Lattner99fbae72010-04-04 05:04:31 +000024 MSP430InstPrinter(const MCAsmInfo &MAI) : MCInstPrinter(MAI) {
Anton Korobeynikov425a9382009-10-21 00:10:30 +000025 }
26
Chris Lattner99fbae72010-04-04 05:04:31 +000027 virtual void printInst(const MCInst *MI, raw_ostream &O);
Anton Korobeynikov425a9382009-10-21 00:10:30 +000028
29 // Autogenerated by tblgen.
Chris Lattner4e972532010-04-04 04:47:45 +000030 void printInstruction(const MCInst *MI, raw_ostream &O);
Anton Korobeynikov425a9382009-10-21 00:10:30 +000031 static const char *getRegisterName(unsigned RegNo);
32
Chris Lattner4e972532010-04-04 04:47:45 +000033 void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O,
Anton Korobeynikov0f66de42009-10-21 00:11:27 +000034 const char *Modifier = 0);
Chris Lattner4e972532010-04-04 04:47:45 +000035 void printPCRelImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
36 void printSrcMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O,
Anton Korobeynikovbaffc352009-10-21 00:12:08 +000037 const char *Modifier = 0);
Chris Lattner4e972532010-04-04 04:47:45 +000038 void printCCOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
Anton Korobeynikov425a9382009-10-21 00:10:30 +000039
40 };
41}
42
43#endif