Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 1 | //===-- MipsSEFrameLowering.h - Mips32/64 frame lowering --------*- 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 | // |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 14 | #ifndef LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H |
| 15 | #define LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H |
Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 16 | |
| 17 | #include "MipsFrameLowering.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | class MipsSEFrameLowering : public MipsFrameLowering { |
| 22 | public: |
Eric Christopher | 4cdb3f9 | 2014-07-02 23:29:55 +0000 | [diff] [blame] | 23 | explicit MipsSEFrameLowering(const MipsSubtarget &STI); |
Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 24 | |
| 25 | /// emitProlog/emitEpilog - These methods insert prolog and epilog code into |
| 26 | /// the function. |
Quentin Colombet | 61b305e | 2015-05-05 17:38:16 +0000 | [diff] [blame] | 27 | void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override; |
Craig Topper | 56c590a | 2014-04-29 07:58:02 +0000 | [diff] [blame] | 28 | void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; |
Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 29 | |
Vasileios Kalintiris | 48e0256 | 2015-11-12 14:11:43 +0000 | [diff] [blame] | 30 | int getFrameIndexReference(const MachineFunction &MF, int FI, |
| 31 | unsigned &FrameReg) const override; |
| 32 | |
Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 33 | bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, |
| 34 | MachineBasicBlock::iterator MI, |
| 35 | const std::vector<CalleeSavedInfo> &CSI, |
Craig Topper | 56c590a | 2014-04-29 07:58:02 +0000 | [diff] [blame] | 36 | const TargetRegisterInfo *TRI) const override; |
Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 37 | |
Craig Topper | 56c590a | 2014-04-29 07:58:02 +0000 | [diff] [blame] | 38 | bool hasReservedCallFrame(const MachineFunction &MF) const override; |
Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 39 | |
Matthias Braun | 0256486 | 2015-07-14 17:17:13 +0000 | [diff] [blame] | 40 | void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, |
| 41 | RegScavenger *RS) const override; |
Akira Hatanaka | c0b0206 | 2013-01-30 00:26:49 +0000 | [diff] [blame] | 42 | unsigned ehDataReg(unsigned I) const; |
Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 43 | |
Vasileios Kalintiris | 43dff0c | 2015-10-26 12:38:43 +0000 | [diff] [blame] | 44 | private: |
| 45 | void emitInterruptEpilogueStub(MachineFunction &MF, |
| 46 | MachineBasicBlock &MBB) const; |
| 47 | void emitInterruptPrologueStub(MachineFunction &MF, |
| 48 | MachineBasicBlock &MBB) const; |
| 49 | }; |
Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 50 | } // End llvm namespace |
Akira Hatanaka | d1c43ce | 2012-07-31 22:50:19 +0000 | [diff] [blame] | 51 | |
| 52 | #endif |