1 | //===- MipsSEFrameLowering.h - Mips32/64 frame lowering ---------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H |
10 | #define LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H |
11 | |
12 | #include "MipsFrameLowering.h" |
13 | |
14 | namespace llvm { |
15 | |
16 | class MachineBasicBlock; |
17 | class MachineFunction; |
18 | class MipsSubtarget; |
19 | |
20 | class MipsSEFrameLowering : public MipsFrameLowering { |
21 | public: |
22 | explicit MipsSEFrameLowering(const MipsSubtarget &STI); |
23 | |
24 | /// emitProlog/emitEpilog - These methods insert prolog and epilog code into |
25 | /// the function. |
26 | void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override; |
27 | void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; |
28 | |
29 | StackOffset getFrameIndexReference(const MachineFunction &MF, int FI, |
30 | Register &FrameReg) const override; |
31 | |
32 | bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, |
33 | MachineBasicBlock::iterator MI, |
34 | ArrayRef<CalleeSavedInfo> CSI, |
35 | const TargetRegisterInfo *TRI) const override; |
36 | |
37 | bool hasReservedCallFrame(const MachineFunction &MF) const override; |
38 | |
39 | void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, |
40 | RegScavenger *RS) const override; |
41 | |
42 | private: |
43 | void emitInterruptEpilogueStub(MachineFunction &MF, |
44 | MachineBasicBlock &MBB) const; |
45 | void emitInterruptPrologueStub(MachineFunction &MF, |
46 | MachineBasicBlock &MBB) const; |
47 | }; |
48 | |
49 | } // end namespace llvm |
50 | |
51 | #endif // LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H |
52 | |