LLVM API Documentation

PPCFrameInfo.h

Go to the documentation of this file.
00001 //===-- PPCFrameInfo.h - Define TargetFrameInfo for PowerPC -----*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the LLVM research group and is distributed under
00006 // the University of Illinois Open Source License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 //
00011 //===----------------------------------------------------------------------===//
00012 
00013 #ifndef POWERPC_FRAMEINFO_H
00014 #define POWERPC_FRAMEINFO_H
00015 
00016 #include "PPC.h"
00017 #include "llvm/Target/TargetFrameInfo.h"
00018 #include "llvm/Target/TargetMachine.h"
00019 
00020 namespace llvm {
00021 
00022 class PPCFrameInfo: public TargetFrameInfo {
00023   const TargetMachine &TM;
00024   std::pair<unsigned, int> LR[1];
00025 
00026 public:
00027   PPCFrameInfo(const TargetMachine &tm, bool LP64)
00028     : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) {
00029     LR[0].first = PPC::LR;
00030     LR[0].second = LP64 ? 16 : 8;
00031   }
00032 
00033   const std::pair<unsigned, int> *
00034   getCalleeSaveSpillSlots(unsigned &NumEntries) const {
00035     NumEntries = 1;
00036     return &LR[0];
00037   }
00038 };
00039 
00040 } // End llvm namespace
00041 
00042 #endif