Anton Korobeynikov | 425a938 | 2009-10-21 00:10:30 +0000 | [diff] [blame] | 1 | //===-- 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 Lattner | 99fbae7 | 2010-04-04 05:04:31 +0000 | [diff] [blame] | 19 | namespace llvm { |
Anton Korobeynikov | 425a938 | 2009-10-21 00:10:30 +0000 | [diff] [blame] | 20 | class MCOperand; |
| 21 | |
| 22 | class MSP430InstPrinter : public MCInstPrinter { |
| 23 | public: |
Chris Lattner | 99fbae7 | 2010-04-04 05:04:31 +0000 | [diff] [blame] | 24 | MSP430InstPrinter(const MCAsmInfo &MAI) : MCInstPrinter(MAI) { |
Anton Korobeynikov | 425a938 | 2009-10-21 00:10:30 +0000 | [diff] [blame] | 25 | } |
| 26 | |
Chris Lattner | 99fbae7 | 2010-04-04 05:04:31 +0000 | [diff] [blame] | 27 | virtual void printInst(const MCInst *MI, raw_ostream &O); |
Anton Korobeynikov | 425a938 | 2009-10-21 00:10:30 +0000 | [diff] [blame] | 28 | |
| 29 | // Autogenerated by tblgen. |
Chris Lattner | 4e97253 | 2010-04-04 04:47:45 +0000 | [diff] [blame] | 30 | void printInstruction(const MCInst *MI, raw_ostream &O); |
Anton Korobeynikov | 425a938 | 2009-10-21 00:10:30 +0000 | [diff] [blame] | 31 | static const char *getRegisterName(unsigned RegNo); |
| 32 | |
Chris Lattner | 4e97253 | 2010-04-04 04:47:45 +0000 | [diff] [blame] | 33 | void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O, |
Anton Korobeynikov | 0f66de4 | 2009-10-21 00:11:27 +0000 | [diff] [blame] | 34 | const char *Modifier = 0); |
Chris Lattner | 4e97253 | 2010-04-04 04:47:45 +0000 | [diff] [blame] | 35 | void printPCRelImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); |
| 36 | void printSrcMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O, |
Anton Korobeynikov | baffc35 | 2009-10-21 00:12:08 +0000 | [diff] [blame] | 37 | const char *Modifier = 0); |
Chris Lattner | 4e97253 | 2010-04-04 04:47:45 +0000 | [diff] [blame] | 38 | void printCCOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); |
Anton Korobeynikov | 425a938 | 2009-10-21 00:10:30 +0000 | [diff] [blame] | 39 | |
| 40 | }; |
| 41 | } |
| 42 | |
| 43 | #endif |