blob: ba6209fac5f3c1bd2fb731e5c667e5cd2b90951d [file] [log] [blame]
Nate Begemanca068e82004-08-14 22:16:36 +00001//===-- PowerPCFrameInfo.h - Define TargetFrameInfo for PowerPC -*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10//
11//----------------------------------------------------------------------------
12
13#ifndef POWERPC_FRAMEINFO_H
14#define POWERPC_FRAMEINFO_H
15
16#include "PowerPC.h"
17#include "llvm/Target/TargetFrameInfo.h"
18#include "llvm/Target/TargetMachine.h"
19#include "llvm/Target/MRegisterInfo.h"
20#include <map>
21
22namespace llvm {
23
24class PowerPCFrameInfo: public TargetFrameInfo {
25 const TargetMachine &TM;
26 std::pair<unsigned, int> LR[1];
27
28public:
29
30 PowerPCFrameInfo(const TargetMachine &inTM)
31 : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(inTM) {
32 LR[0].first = PPC::LR;
33 LR[0].second = 8;
34 }
35
36 std::pair<unsigned, int> *
37 getCalleeSaveSpillSlots(unsigned &NumEntries) const {
38 NumEntries = 1;
39 return static_cast<std::pair<unsigned, int> *>(LR);
40 }
41};
42
43} // End llvm namespace
44
45#endif