2008-11-07 10:59:00 +00:00
|
|
|
//===-- XCoreFrameInfo.h - Frame info for XCore Target -----------*- C++ -*-==//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains XCore frame information that doesn't fit anywhere else
|
|
|
|
// cleanly...
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef XCOREFRAMEINFO_H
|
|
|
|
#define XCOREFRAMEINFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
2010-11-15 00:06:54 +00:00
|
|
|
class XCoreSubtarget;
|
2008-11-07 10:59:00 +00:00
|
|
|
|
2010-11-15 00:06:54 +00:00
|
|
|
class XCoreFrameInfo: public TargetFrameInfo {
|
|
|
|
const XCoreSubtarget &STI;
|
2008-11-07 10:59:00 +00:00
|
|
|
public:
|
2010-11-15 00:06:54 +00:00
|
|
|
XCoreFrameInfo(const XCoreSubtarget &STI);
|
|
|
|
|
|
|
|
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
|
|
|
/// the function.
|
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2008-11-07 10:59:00 +00:00
|
|
|
|
|
|
|
//! Stack slot size (4 bytes)
|
|
|
|
static int stackSlotSize() {
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // XCOREFRAMEINFO_H
|