blob: 204d2f8c47256889b0d69339d2fa3b0d2b76443f [file] [log] [blame]
Anton Korobeynikov33464912010-11-15 00:06:54 +00001//=-- MBlazeFrameInfo.h - Define TargetFrameInfo for MicroBlaze --*- 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
14#ifndef ALPHA_FRAMEINFO_H
15#define ALPHA_FRAMEINFO_H
16
17#include "MBlaze.h"
18#include "MBlazeSubtarget.h"
19#include "llvm/Target/TargetFrameInfo.h"
20
21namespace llvm {
22 class MBlazeSubtarget;
23
24class MBlazeFrameInfo : public TargetFrameInfo {
25protected:
26 const MBlazeSubtarget &STI;
27
28public:
29 explicit MBlazeFrameInfo(const MBlazeSubtarget &sti)
30 : TargetFrameInfo(TargetFrameInfo::StackGrowsUp, 8, 0), STI(sti) {
31 }
32
33 void adjustMBlazeStackFrame(MachineFunction &MF) const;
34
35 /// targetHandlesStackFrameRounding - Returns true if the target is
36 /// responsible for rounding up the stack frame (probably at emitPrologue
37 /// time).
38 bool targetHandlesStackFrameRounding() const { return true; }
39
40 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
41 /// the function.
42 void emitPrologue(MachineFunction &MF) const;
43 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
Anton Korobeynikovd0c38172010-11-18 21:19:35 +000044
45 bool hasFP(const MachineFunction &MF) const;
Anton Korobeynikov33464912010-11-15 00:06:54 +000046};
47
48} // End llvm namespace
49
50#endif