1*9880d681SAndroid Build Coastguard Worker //===-- MSP430MCInstLower.h - Lower MachineInstr to MCInst ------*- 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 #ifndef LLVM_LIB_TARGET_MSP430_MSP430MCINSTLOWER_H 11*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_TARGET_MSP430_MSP430MCINSTLOWER_H 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker #include "llvm/Support/Compiler.h" 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker namespace llvm { 16*9880d681SAndroid Build Coastguard Worker class AsmPrinter; 17*9880d681SAndroid Build Coastguard Worker class MCContext; 18*9880d681SAndroid Build Coastguard Worker class MCInst; 19*9880d681SAndroid Build Coastguard Worker class MCOperand; 20*9880d681SAndroid Build Coastguard Worker class MCSymbol; 21*9880d681SAndroid Build Coastguard Worker class MachineInstr; 22*9880d681SAndroid Build Coastguard Worker class MachineModuleInfoMachO; 23*9880d681SAndroid Build Coastguard Worker class MachineOperand; 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Worker /// MSP430MCInstLower - This class is used to lower an MachineInstr 26*9880d681SAndroid Build Coastguard Worker /// into an MCInst. 27*9880d681SAndroid Build Coastguard Worker class LLVM_LIBRARY_VISIBILITY MSP430MCInstLower { 28*9880d681SAndroid Build Coastguard Worker MCContext &Ctx; 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Worker AsmPrinter &Printer; 31*9880d681SAndroid Build Coastguard Worker public: MSP430MCInstLower(MCContext & ctx,AsmPrinter & printer)32*9880d681SAndroid Build Coastguard Worker MSP430MCInstLower(MCContext &ctx, AsmPrinter &printer) 33*9880d681SAndroid Build Coastguard Worker : Ctx(ctx), Printer(printer) {} 34*9880d681SAndroid Build Coastguard Worker void Lower(const MachineInstr *MI, MCInst &OutMI) const; 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const; 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const; 39*9880d681SAndroid Build Coastguard Worker MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const; 40*9880d681SAndroid Build Coastguard Worker MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const; 41*9880d681SAndroid Build Coastguard Worker MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const; 42*9880d681SAndroid Build Coastguard Worker MCSymbol *GetBlockAddressSymbol(const MachineOperand &MO) const; 43*9880d681SAndroid Build Coastguard Worker }; 44*9880d681SAndroid Build Coastguard Worker 45*9880d681SAndroid Build Coastguard Worker } 46*9880d681SAndroid Build Coastguard Worker 47*9880d681SAndroid Build Coastguard Worker #endif 48