[SystemZ] Rename subregs and add subreg_h32
[oota-llvm.git] / lib / Target / SystemZ / SystemZMCInstLower.h
1 //===-- SystemZMCInstLower.h - Lower MachineInstr to MCInst ----*- C++ -*--===//
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 LLVM_SYSTEMZMCINSTLOWER_H
11 #define LLVM_SYSTEMZMCINSTLOWER_H
12
13 #include "llvm/MC/MCExpr.h"
14 #include "llvm/Support/DataTypes.h"
15 #include "llvm/Support/Compiler.h"
16
17 namespace llvm {
18 class MCInst;
19 class MCOperand;
20 class MachineInstr;
21 class MachineOperand;
22 class Mangler;
23 class SystemZAsmPrinter;
24
25 class LLVM_LIBRARY_VISIBILITY SystemZMCInstLower {
26   Mangler *Mang;
27   MCContext &Ctx;
28   SystemZAsmPrinter &AsmPrinter;
29
30 public:
31   SystemZMCInstLower(Mangler *mang, MCContext &ctx,
32                      SystemZAsmPrinter &asmPrinter);
33
34   // Lower MachineInstr MI to MCInst OutMI.
35   void lower(const MachineInstr *MI, MCInst &OutMI) const;
36
37   // Return an MCOperand for MO.
38   MCOperand lowerOperand(const MachineOperand& MO) const;
39
40   // Return an MCExpr for symbolic operand MO with variant kind Kind.
41   const MCExpr *getExpr(const MachineOperand &MO,
42                         MCSymbolRefExpr::VariantKind Kind) const;
43 };
44 } // end namespace llvm
45
46 #endif