summaryrefslogtreecommitdiff
path: root/lib/Target/Sparc/SparcFrameLowering.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-09 04:37:47 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-09 04:37:47 +0000
commit6ed9284c2bcfb81fa0303409c6bd4366bc1e822a (patch)
treef1d8a9b711712b4b8c63f4c199e5ae892f7c52b8 /lib/Target/Sparc/SparcFrameLowering.h
parent8faf7df1447ca6ea4a3ff8f82789923d1839fb54 (diff)
downloadllvm-6ed9284c2bcfb81fa0303409c6bd4366bc1e822a.tar.gz
llvm-6ed9284c2bcfb81fa0303409c6bd4366bc1e822a.tar.bz2
llvm-6ed9284c2bcfb81fa0303409c6bd4366bc1e822a.tar.xz
Compute correct frame sizes for SPARC v9 64-bit frames.
The save area is twice as big and there is no struct return slot. The stack pointer is always 16-byte aligned (after adding the bias). Also eliminate the stack adjustment instructions around calls when the function has a reserved stack frame. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcFrameLowering.h')
-rw-r--r--lib/Target/Sparc/SparcFrameLowering.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/Sparc/SparcFrameLowering.h b/lib/Target/Sparc/SparcFrameLowering.h
index 464233e7da..c375662016 100644
--- a/lib/Target/Sparc/SparcFrameLowering.h
+++ b/lib/Target/Sparc/SparcFrameLowering.h
@@ -22,10 +22,12 @@ namespace llvm {
class SparcSubtarget;
class SparcFrameLowering : public TargetFrameLowering {
+ const SparcSubtarget &SubTarget;
public:
- explicit SparcFrameLowering(const SparcSubtarget &/*sti*/)
- : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 8, 0) {
- }
+ explicit SparcFrameLowering(const SparcSubtarget &ST)
+ : TargetFrameLowering(TargetFrameLowering::StackGrowsDown,
+ ST.is64Bit() ? 16 : 8, 0, ST.is64Bit() ? 16 : 8),
+ SubTarget(ST) {}
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
/// the function.