blob: 4e15c2f7c6ddb14fe0c8a361f200eb30720e225d [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 Lattner6f997762009-10-19 21:53:00 +000016 class MCAsmInfo;
Chris Lattner9cf0eb52009-10-19 20:21:05 +000017 class MCContext;
18 class MCInst;
19 class MCOperand;
20 class MCSymbol;
21 class MachineInstr;
22 class MachineModuleInfoMachO;
23 class MachineOperand;
24 class Mangler;
25 //class ARMSubtarget;
26
27/// ARMMCInstLower - This class is used to lower an MachineInstr into an MCInst.
28class VISIBILITY_HIDDEN ARMMCInstLower {
29 MCContext &Ctx;
Chris Lattner6f997762009-10-19 21:53:00 +000030 Mangler &Mang;
31
32 const unsigned CurFunctionNumber;
33 const MCAsmInfo &MAI;
Chris Lattner9cf0eb52009-10-19 20:21:05 +000034
35 //const ARMSubtarget &getSubtarget() const;
36public:
Chris Lattner6f997762009-10-19 21:53:00 +000037 ARMMCInstLower(MCContext &ctx, Mangler &mang, unsigned FuncNum,
38 const MCAsmInfo &mai)
39 : Ctx(ctx), Mang(mang), CurFunctionNumber(FuncNum), MAI(mai) {}
Chris Lattner9cf0eb52009-10-19 20:21:05 +000040
41 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
42
Chris Lattner6f997762009-10-19 21:53:00 +000043 //MCSymbol *GetPICBaseSymbol() const;
Chris Lattner9cf0eb52009-10-19 20:21:05 +000044 MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
Chris Lattner6f997762009-10-19 21:53:00 +000045 //MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
Chris Lattner9cf0eb52009-10-19 20:21:05 +000046 MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const;
47 MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const;
48 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
49
Chris Lattner6f997762009-10-19 21:53:00 +000050/*
Chris Lattner9cf0eb52009-10-19 20:21:05 +000051private:
52 MachineModuleInfoMachO &getMachOMMI() const;
53 */
54};
55
56}
57
58#endif