1*9880d681SAndroid Build Coastguard Worker //= MSP430InstPrinter.h - Convert MSP430 MCInst to assembly syntax -*- C++ -*-// 2*9880d681SAndroid Build Coastguard Worker // 3*9880d681SAndroid Build Coastguard Worker // The LLVM Compiler Infrastructure 4*9880d681SAndroid Build Coastguard Worker // 5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source 6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details. 7*9880d681SAndroid Build Coastguard Worker // 8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 9*9880d681SAndroid Build Coastguard Worker // 10*9880d681SAndroid Build Coastguard Worker // This class prints a MSP430 MCInst to a .s file. 11*9880d681SAndroid Build Coastguard Worker // 12*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_LIB_TARGET_MSP430_INSTPRINTER_MSP430INSTPRINTER_H 15*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_TARGET_MSP430_INSTPRINTER_MSP430INSTPRINTER_H 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker #include "llvm/MC/MCInstPrinter.h" 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Worker namespace llvm { 20*9880d681SAndroid Build Coastguard Worker class MSP430InstPrinter : public MCInstPrinter { 21*9880d681SAndroid Build Coastguard Worker public: MSP430InstPrinter(const MCAsmInfo & MAI,const MCInstrInfo & MII,const MCRegisterInfo & MRI)22*9880d681SAndroid Build Coastguard Worker MSP430InstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, 23*9880d681SAndroid Build Coastguard Worker const MCRegisterInfo &MRI) 24*9880d681SAndroid Build Coastguard Worker : MCInstPrinter(MAI, MII, MRI) {} 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Worker void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, 27*9880d681SAndroid Build Coastguard Worker const MCSubtargetInfo &STI) override; 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker // Autogenerated by tblgen. 30*9880d681SAndroid Build Coastguard Worker void printInstruction(const MCInst *MI, raw_ostream &O); 31*9880d681SAndroid Build Coastguard Worker static const char *getRegisterName(unsigned RegNo); 32*9880d681SAndroid Build Coastguard Worker 33*9880d681SAndroid Build Coastguard Worker void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O, 34*9880d681SAndroid Build Coastguard Worker const char *Modifier = nullptr); 35*9880d681SAndroid Build Coastguard Worker void printPCRelImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); 36*9880d681SAndroid Build Coastguard Worker void printSrcMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O, 37*9880d681SAndroid Build Coastguard Worker const char *Modifier = nullptr); 38*9880d681SAndroid Build Coastguard Worker void printCCOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); 39*9880d681SAndroid Build Coastguard Worker 40*9880d681SAndroid Build Coastguard Worker }; 41*9880d681SAndroid Build Coastguard Worker } 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Worker #endif 44