Move XForm instructions over to the auto-generated asm writer
[oota-llvm.git] / lib / Target / PowerPC / PPCFrameInfo.h
1 //===-- 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
21 namespace llvm {
22
23 class PowerPCFrameInfo: public TargetFrameInfo {
24   const TargetMachine &TM;
25   std::pair<unsigned, int> LR[1];
26   
27 public:
28   PowerPCFrameInfo(const TargetMachine &tm, bool LP64)
29     : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) {
30     LR[0].first = PPC::LR;
31     LR[0].second = LP64 ? 16 : 8;
32   }
33
34   const std::pair<unsigned, int> *
35   getCalleeSaveSpillSlots(unsigned &NumEntries) const {
36     NumEntries = 1;
37     return &LR[0];
38   }
39 };
40
41 } // End llvm namespace
42
43 #endif