diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCFrameInfo.h')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCFrameInfo.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCFrameInfo.h b/llvm/lib/Target/PowerPC/PPCFrameInfo.h new file mode 100644 index 00000000000..d1bae8b1aa1 --- /dev/null +++ b/llvm/lib/Target/PowerPC/PPCFrameInfo.h @@ -0,0 +1,42 @@ +//===-- 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 "PPC.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]; + +public: + PowerPCFrameInfo(const TargetMachine &tm, bool LP64) + : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) { + LR[0].first = PPC::LR; + LR[0].second = LP64 ? 16 : 8; + } + + const std::pair<unsigned, int> * + getCalleeSaveSpillSlots(unsigned &NumEntries) const { + NumEntries = 1; + return &LR[0]; + } +}; + +} // End llvm namespace + +#endif |