blob: a2b99ae83c01becef2e686a85c4ec86d48370d43 [file] [log] [blame]
Anton Korobeynikov1c7ceed2009-10-21 00:11:08 +00001//===-- MSP430MCInstLower.h - Lower MachineInstr to MCInst ----------------===//
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#ifndef MSP430_MCINSTLOWER_H
11#define MSP430_MCINSTLOWER_H
12
13#include "llvm/Support/Compiler.h"
14
15namespace llvm {
Anton Korobeynikov7199ce52009-10-21 00:13:05 +000016 class AsmPrinter;
Anton Korobeynikov1c7ceed2009-10-21 00:11:08 +000017 class MCAsmInfo;
18 class MCContext;
19 class MCInst;
20 class MCOperand;
21 class MCSymbol;
22 class MachineInstr;
23 class MachineModuleInfoMachO;
24 class MachineOperand;
25 class Mangler;
26
27 /// MSP430MCInstLower - This class is used to lower an MachineInstr
28 /// into an MCInst.
29class VISIBILITY_HIDDEN MSP430MCInstLower {
30 MCContext &Ctx;
Anton Korobeynikovbaffc352009-10-21 00:12:08 +000031 Mangler &Mang;
Anton Korobeynikov1c7ceed2009-10-21 00:11:08 +000032
Anton Korobeynikov7199ce52009-10-21 00:13:05 +000033 AsmPrinter &Printer;
Anton Korobeynikov1c7ceed2009-10-21 00:11:08 +000034public:
Anton Korobeynikov7199ce52009-10-21 00:13:05 +000035 MSP430MCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer)
36 : Ctx(ctx), Mang(mang), Printer(printer) {}
Anton Korobeynikov1c7ceed2009-10-21 00:11:08 +000037 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
Anton Korobeynikovbaffc352009-10-21 00:12:08 +000038
39 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
40
41 MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
Anton Korobeynikov616b9bb2009-10-21 00:13:42 +000042 MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
Anton Korobeynikovbaffc352009-10-21 00:12:08 +000043 MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const;
44 MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const;
Anton Korobeynikov1c7ceed2009-10-21 00:11:08 +000045};
46
47}
48
49#endif