blob: 3c7777ceccaf9ec4fbcd17afbc1fede0a5c981aa [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
Alkis Evlogimenos8c9b4de2004-08-15 09:18:55 +000036 const std::pair<unsigned, int> *
Nate Begemanca068e82004-08-14 22:16:36 +000037 getCalleeSaveSpillSlots(unsigned &NumEntries) const {
38 NumEntries = 1;
Chris Lattnerb6482062004-08-16 05:09:58 +000039 return &LR[0];
Nate Begemanca068e82004-08-14 22:16:36 +000040 }
41};
42
43} // End llvm namespace
44
45#endif