aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCFrameInfo.h
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2004-08-14 22:16:36 +0000
committerNate Begeman <natebegeman@mac.com>2004-08-14 22:16:36 +0000
commitca068e861b7f1184d31f6c8f26f88feb076badf1 (patch)
tree7f8c3553f2f3b9ca28f584ce31b2a8e44164d2e5 /lib/Target/PowerPC/PPCFrameInfo.h
parentffde1de597c40ebecdd6479756f101197a844b46 (diff)
Replace PowerPCPEI.cpp with target independant PrologEpilogInserter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCFrameInfo.h')
-rw-r--r--lib/Target/PowerPC/PPCFrameInfo.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCFrameInfo.h b/lib/Target/PowerPC/PPCFrameInfo.h
new file mode 100644
index 0000000000..ba6209fac5
--- /dev/null
+++ b/lib/Target/PowerPC/PPCFrameInfo.h
@@ -0,0 +1,45 @@
+//===-- PowerPCFrameInfo.h - Define TargetFrameInfo for PowerPC -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+//
+//----------------------------------------------------------------------------
+
+#ifndef POWERPC_FRAMEINFO_H
+#define POWERPC_FRAMEINFO_H
+
+#include "PowerPC.h"
+#include "llvm/Target/TargetFrameInfo.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/MRegisterInfo.h"
+#include <map>
+
+namespace llvm {
+
+class PowerPCFrameInfo: public TargetFrameInfo {
+ const TargetMachine &TM;
+ std::pair<unsigned, int> LR[1];
+
+public:
+
+ PowerPCFrameInfo(const TargetMachine &inTM)
+ : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(inTM) {
+ LR[0].first = PPC::LR;
+ LR[0].second = 8;
+ }
+
+ std::pair<unsigned, int> *
+ getCalleeSaveSpillSlots(unsigned &NumEntries) const {
+ NumEntries = 1;
+ return static_cast<std::pair<unsigned, int> *>(LR);
+ }
+};
+
+} // End llvm namespace
+
+#endif