diff options
Diffstat (limited to 'lib/Target/PowerPC/PPCFrameLowering.h')
| -rw-r--r-- | lib/Target/PowerPC/PPCFrameLowering.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCFrameLowering.h b/lib/Target/PowerPC/PPCFrameLowering.h index 6f5f936..9acf129 100644 --- a/lib/Target/PowerPC/PPCFrameLowering.h +++ b/lib/Target/PowerPC/PPCFrameLowering.h @@ -94,6 +94,20 @@ public: return isPPC64 ? -8U : -4U; } + /// getBasePointerSaveOffset - Return the previous frame offset to save the + /// base pointer. + static unsigned getBasePointerSaveOffset(bool isPPC64, bool isDarwinABI, + bool hasFP) { + if (!hasFP) + return getFramePointerSaveOffset(isPPC64, isDarwinABI); + + if (isDarwinABI) + return isPPC64 ? -16U : -8U; + + // SVR4 ABI: First slot in the general register save area. + return isPPC64 ? -16U : -8U; + } + /// getLinkageSize - Return the size of the PowerPC ABI linkage area. /// static unsigned getLinkageSize(bool isPPC64, bool isDarwinABI) { |
