blob: ccb1452e94b92bb09e2284453b5eb357fb972984 [file] [log] [blame]
Akira Hatanaka17a2f8e2011-07-07 20:24:54 +00001//===-- MipsMCInstLower.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 MIPSMCINSTLOWER_H
11#define MIPSMCINSTLOWER_H
12#include "llvm/CodeGen/MachineOperand.h"
13#include "llvm/Support/Compiler.h"
14
15namespace llvm {
16 class MCAsmInfo;
17 class MCContext;
18 class MCInst;
19 class MCOperand;
20 class MCSymbol;
21 class MachineInstr;
22 class MachineFunction;
23 class Mangler;
24 class MipsAsmPrinter;
25
26/// MipsMCInstLower - This class is used to lower an MachineInstr into an
27// MCInst.
28class LLVM_LIBRARY_VISIBILITY MipsMCInstLower {
29 typedef MachineOperand::MachineOperandType MachineOperandType;
30 MCContext &Ctx;
31 Mangler *Mang;
32 MipsAsmPrinter &AsmPrinter;
33public:
34 MipsMCInstLower(Mangler *mang, const MachineFunction &MF,
35 MipsAsmPrinter &asmprinter);
36 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
37private:
38 MCOperand LowerSymbolOperand(const MachineOperand &MO,
Akira Hatanaka78d1b112011-08-16 02:15:03 +000039 MachineOperandType MOTy, unsigned Offset) const;
Akira Hatanaka17a2f8e2011-07-07 20:24:54 +000040};
41}
42
43#endif