blob: 4ffb01dda36a272f855b0ea925ca3b8042847ef1 [file] [log] [blame]
Nikolai Bozhenovebbde142017-09-19 11:54:29 +00001//===-- 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 Blaikie1be62f02017-11-03 22:32:11 +000017#include "llvm/CodeGen/TargetFrameLowering.h"
Nikolai Bozhenovebbde142017-09-19 11:54:29 +000018
19namespace llvm {
20class Nios2Subtarget;
21
22class Nios2FrameLowering : public TargetFrameLowering {
23protected:
24 const Nios2Subtarget &STI;
25
26public:
Nikolai Bozhenov1cf9c542017-12-07 12:35:02 +000027 explicit Nios2FrameLowering(const Nios2Subtarget &sti)
28 : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0, 4),
29 STI(sti) {}
Nikolai Bozhenovebbde142017-09-19 11:54:29 +000030
Nikolai Bozhenovebbde142017-09-19 11:54:29 +000031 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