2004-08-14 22:16:36 +00:00
|
|
|
//===-- PowerPCFrameInfo.h - Define TargetFrameInfo for PowerPC -*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef POWERPC_FRAMEINFO_H
|
|
|
|
#define POWERPC_FRAMEINFO_H
|
|
|
|
|
|
|
|
#include "PowerPC.h"
|
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
#include "llvm/Target/MRegisterInfo.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class PowerPCFrameInfo: public TargetFrameInfo {
|
|
|
|
const TargetMachine &TM;
|
|
|
|
std::pair<unsigned, int> LR[1];
|
|
|
|
|
|
|
|
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
|