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