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" 17 #include "llvm/CodeGen/TargetFrameLowering.h" 18 19 namespace llvm { 20 class Nios2Subtarget; 21 22 class Nios2FrameLowering : public TargetFrameLowering { 23 protected: 24 const Nios2Subtarget &STI; 25 26 public: 27 explicit Nios2FrameLowering(const Nios2Subtarget &sti) 28 : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0, 4), 29 STI(sti) {} 30 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 40