diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-12-06 17:42:06 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-12-06 17:42:06 +0000 |
commit | 51fe9d9aa432cbde6497cad4ea5c8f0276c67b82 (patch) | |
tree | 0714a1300eb3390a802c8aafc6a8c160f9627824 /lib/Target/PowerPC/PPCFrameInfo.h | |
parent | 392b1b2ef3ace82b5104ba4c9280fc7957c669d4 (diff) | |
download | llvm-51fe9d9aa432cbde6497cad4ea5c8f0276c67b82.tar.gz llvm-51fe9d9aa432cbde6497cad4ea5c8f0276c67b82.tar.bz2 llvm-51fe9d9aa432cbde6497cad4ea5c8f0276c67b82.tar.xz |
Make it easier for gdb to find the return address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCFrameInfo.h')
-rw-r--r-- | lib/Target/PowerPC/PPCFrameInfo.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/Target/PowerPC/PPCFrameInfo.h b/lib/Target/PowerPC/PPCFrameInfo.h index 1330034f5a..22b945ea20 100644 --- a/lib/Target/PowerPC/PPCFrameInfo.h +++ b/lib/Target/PowerPC/PPCFrameInfo.h @@ -21,26 +21,18 @@ namespace llvm { class PPCFrameInfo: public TargetFrameInfo { const TargetMachine &TM; - std::pair<unsigned, int> LR[1]; public: PPCFrameInfo(const TargetMachine &tm, bool LP64) : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) { - if (LP64) { - LR[0].first = PPC::LR8; - LR[0].second = 16; - } else { - LR[0].first = PPC::LR; - LR[0].second = 8; - } } - const std::pair<unsigned, int> * - getCalleeSaveSpillSlots(unsigned &NumEntries) const { - NumEntries = 1; - return &LR[0]; + /// getReturnSaveOffset - Return the previous frame offset to save the + /// return address. + static unsigned getReturnSaveOffset(bool LP64) { + return LP64 ? 16 : 8; } - + /// getFramePointerSaveOffset - Return the previous frame offset to save the /// frame pointer. static unsigned getFramePointerSaveOffset(bool LP64) { |