Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 1 | //===-- Nios2FrameLowering.h - Define frame lowering for Nios2 --*- 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 | #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2FRAMELOWERING_H |
| 14 | #define LLVM_LIB_TARGET_NIOS2_NIOS2FRAMELOWERING_H |
| 15 | |
| 16 | #include "Nios2.h" |
David Blaikie | 1be62f0 | 2017-11-03 22:32:11 +0000 | [diff] [blame] | 17 | #include "llvm/CodeGen/TargetFrameLowering.h" |
Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 18 | |
| 19 | namespace llvm { |
| 20 | class Nios2Subtarget; |
| 21 | |
| 22 | class Nios2FrameLowering : public TargetFrameLowering { |
| 23 | protected: |
| 24 | const Nios2Subtarget &STI; |
| 25 | |
| 26 | public: |
Nikolai Bozhenov | 1cf9c54 | 2017-12-07 12:35:02 +0000 | [diff] [blame] | 27 | explicit Nios2FrameLowering(const Nios2Subtarget &sti) |
| 28 | : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0, 4), |
| 29 | STI(sti) {} |
Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 30 | |
Nikolai Bozhenov | ebbde14 | 2017-09-19 11:54:29 +0000 | [diff] [blame] | 31 | bool hasFP(const MachineFunction &MF) const override; |
| 32 | /// emitProlog/emitEpilog - These methods insert prolog and epilog code into |
| 33 | /// the function. |
| 34 | void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override; |
| 35 | void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; |
| 36 | }; |
| 37 | } // namespace llvm |
| 38 | |
| 39 | #endif |