2004-08-14 22:16:36 +00:00
|
|
|
//===-- PowerPCFrameInfo.h - Define TargetFrameInfo for PowerPC -*- C++ -*-===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-08-14 22:16:36 +00:00
|
|
|
// 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.
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-08-14 22:16:36 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef POWERPC_FRAMEINFO_H
|
|
|
|
#define POWERPC_FRAMEINFO_H
|
|
|
|
|
2005-10-14 23:51:18 +00:00
|
|
|
#include "PPC.h"
|
2004-08-14 22:16:36 +00:00
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class PowerPCFrameInfo: public TargetFrameInfo {
|
|
|
|
const TargetMachine &TM;
|
|
|
|
std::pair<unsigned, int> LR[1];
|
2005-04-21 23:30:14 +00:00
|
|
|
|
2004-08-14 22:16:36 +00:00
|
|
|
public:
|
2004-08-19 21:36:14 +00:00
|
|
|
PowerPCFrameInfo(const TargetMachine &tm, bool LP64)
|
2004-08-17 05:09:39 +00:00
|
|
|
: TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) {
|
2004-08-14 22:16:36 +00:00
|
|
|
LR[0].first = PPC::LR;
|
2004-08-19 21:36:14 +00:00
|
|
|
LR[0].second = LP64 ? 16 : 8;
|
2004-08-14 22:16:36 +00:00
|
|
|
}
|
|
|
|
|
2004-08-15 09:18:55 +00:00
|
|
|
const std::pair<unsigned, int> *
|
2004-08-14 22:16:36 +00:00
|
|
|
getCalleeSaveSpillSlots(unsigned &NumEntries) const {
|
|
|
|
NumEntries = 1;
|
2004-08-16 05:09:58 +00:00
|
|
|
return &LR[0];
|
2004-08-14 22:16:36 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|