2011-04-15 21:51:11 +00:00
|
|
|
//==--- MipsFrameLowering.h - Define frame lowering for Mips --*- C++ -*---===//
|
2010-11-15 00:06:54 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-11-15 00:06:54 +00:00
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-11-15 00:06:54 +00:00
|
|
|
|
2011-03-04 19:20:24 +00:00
|
|
|
#ifndef MIPS_FRAMEINFO_H
|
|
|
|
#define MIPS_FRAMEINFO_H
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
#include "Mips.h"
|
|
|
|
#include "MipsSubtarget.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class MipsSubtarget;
|
|
|
|
|
2011-01-10 12:39:04 +00:00
|
|
|
class MipsFrameLowering : public TargetFrameLowering {
|
2010-11-15 00:06:54 +00:00
|
|
|
protected:
|
|
|
|
const MipsSubtarget &STI;
|
|
|
|
|
|
|
|
public:
|
2011-01-10 12:39:04 +00:00
|
|
|
explicit MipsFrameLowering(const MipsSubtarget &sti)
|
2010-11-15 00:06:54 +00:00
|
|
|
// FIXME: Is this correct at all?
|
2011-01-10 12:39:04 +00:00
|
|
|
: TargetFrameLowering(StackGrowsUp, 8, 0), STI(sti) {
|
2010-11-15 00:06:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void adjustMipsStackFrame(MachineFunction &MF) const;
|
|
|
|
|
|
|
|
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
|
|
|
/// the function.
|
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2010-11-18 21:19:35 +00:00
|
|
|
|
|
|
|
bool hasFP(const MachineFunction &MF) const;
|
2011-01-18 19:50:18 +00:00
|
|
|
|
|
|
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
2010-11-15 00:06:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|