blob: f6a8129e142ec0af273cde16158ab809e57aa34f [file] [log] [blame]
Chris Lattner9cf0eb52009-10-19 20:21:05 +00001//===-- ARMMCInstLower.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 ARM_MCINSTLOWER_H
11#define ARM_MCINSTLOWER_H
12
13#include "llvm/Support/Compiler.h"
14
15namespace llvm {
Chris Lattner96bc2172009-10-20 00:52:47 +000016 class AsmPrinter;
Chris Lattner6f997762009-10-19 21:53:00 +000017 class MCAsmInfo;
Chris Lattner9cf0eb52009-10-19 20:21:05 +000018 class MCContext;
19 class MCInst;
20 class MCOperand;
21 class MCSymbol;
22 class MachineInstr;
23 class MachineModuleInfoMachO;
24 class MachineOperand;
25 class Mangler;
26 //class ARMSubtarget;
Jim Grosbachfc16a892010-09-13 18:25:42 +000027
Chris Lattner9cf0eb52009-10-19 20:21:05 +000028/// ARMMCInstLower - This class is used to lower an MachineInstr into an MCInst.
Duncan Sands16d8f8b2010-05-11 20:16:09 +000029class LLVM_LIBRARY_VISIBILITY ARMMCInstLower {
Chris Lattner9cf0eb52009-10-19 20:21:05 +000030 MCContext &Ctx;
Chris Lattner6f997762009-10-19 21:53:00 +000031 Mangler &Mang;
Chris Lattner96bc2172009-10-20 00:52:47 +000032 AsmPrinter &Printer;
Chris Lattner9cf0eb52009-10-19 20:21:05 +000033
34 //const ARMSubtarget &getSubtarget() const;
35public:
Chris Lattner96bc2172009-10-20 00:52:47 +000036 ARMMCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer)
37 : Ctx(ctx), Mang(mang), Printer(printer) {}
Jim Grosbachfc16a892010-09-13 18:25:42 +000038
Chris Lattner9cf0eb52009-10-19 20:21:05 +000039 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
40
Chris Lattner6f997762009-10-19 21:53:00 +000041 //MCSymbol *GetPICBaseSymbol() const;
Chris Lattner9cf0eb52009-10-19 20:21:05 +000042 MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
Chris Lattner292df8e2009-10-20 00:56:16 +000043 MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
Chris Lattner9cf0eb52009-10-19 20:21:05 +000044 MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const;
45 MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const;
46 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
Jim Grosbachfc16a892010-09-13 18:25:42 +000047
Chris Lattner6f997762009-10-19 21:53:00 +000048/*
Chris Lattner9cf0eb52009-10-19 20:21:05 +000049private:
50 MachineModuleInfoMachO &getMachOMMI() const;
51 */
52};
53
54}
55
56#endif