[mips] Fix encoding of BAL instruction. Also, fix assembler test case which
[oota-llvm.git] / lib / Target / Mips / Mips16RegisterInfo.h
1 //===-- Mips16RegisterInfo.h - Mips16 Register Information ------*- 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 // This file contains the Mips16 implementation of the TargetRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef MIPS16REGISTERINFO_H
15 #define MIPS16REGISTERINFO_H
16
17 #include "MipsRegisterInfo.h"
18
19 namespace llvm {
20 class Mips16InstrInfo;
21
22 class Mips16RegisterInfo : public MipsRegisterInfo {
23   const Mips16InstrInfo &TII;
24 public:
25   Mips16RegisterInfo(const MipsSubtarget &Subtarget, const Mips16InstrInfo &TII);
26
27   void eliminateCallFramePseudoInstr(MachineFunction &MF,
28                                      MachineBasicBlock &MBB,
29                                      MachineBasicBlock::iterator I) const;
30
31   bool requiresRegisterScavenging(const MachineFunction &MF) const;
32
33   bool requiresFrameIndexScavenging(const MachineFunction &MF) const;
34
35   bool useFPForScavengingIndex(const MachineFunction &MF) const;
36
37   bool saveScavengerRegister(MachineBasicBlock &MBB,
38                                      MachineBasicBlock::iterator I,
39                                      MachineBasicBlock::iterator &UseMI,
40                                      const TargetRegisterClass *RC,
41                                      unsigned Reg) const;
42
43 private:
44   virtual void eliminateFI(MachineBasicBlock::iterator II, unsigned OpNo,
45                            int FrameIndex, uint64_t StackSize,
46                            int64_t SPOffset) const;
47 };
48
49 } // end namespace llvm
50
51 #endif