1 //===- MipsSEFrameLowering.h - Mips32/64 frame lowering ---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
11 #define LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
13 #include "MipsFrameLowering.h"
18 class MachineBasicBlock;
19 class MachineFunction;
22 class MipsSEFrameLowering : public MipsFrameLowering {
24 explicit MipsSEFrameLowering(const MipsSubtarget &STI);
26 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
28 void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
29 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
31 int getFrameIndexReference(const MachineFunction &MF, int FI,
32 unsigned &FrameReg) const override;
34 bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
35 MachineBasicBlock::iterator MI,
36 const std::vector<CalleeSavedInfo> &CSI,
37 const TargetRegisterInfo *TRI) const override;
39 bool hasReservedCallFrame(const MachineFunction &MF) const override;
41 void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
42 RegScavenger *RS) const override;
43 unsigned ehDataReg(unsigned I) const;
46 void emitInterruptEpilogueStub(MachineFunction &MF,
47 MachineBasicBlock &MBB) const;
48 void emitInterruptPrologueStub(MachineFunction &MF,
49 MachineBasicBlock &MBB) const;
52 } // end namespace llvm
54 #endif // LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H