summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcISelLowering.cpp
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
commit2cfe46fd34158610e8456b7f894bdd5574f0eaee (patch)
treeacbfa814362178c9fa190b66cc3f661d9845b05e /llvm/lib/Target/Sparc/SparcISelLowering.cpp
parent54d770cb1fedf23466eb75e7f34fa561e8d63d23 (diff)
downloadbcm5719-llvm-2cfe46fd34158610e8456b7f894bdd5574f0eaee.tar.gz
bcm5719-llvm-2cfe46fd34158610e8456b7f894bdd5574f0eaee.zip
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. llvm-svn: 179083
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcISelLowering.cpp')
-rw-r--r--llvm/lib/Target/Sparc/SparcISelLowering.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
index eb01c5ef318..9dc5c1ffffd 100644
--- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp
+++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
@@ -912,8 +912,9 @@ SparcTargetLowering::LowerCall_64(TargetLowering::CallLoweringInfo &CLI,
// Get the size of the outgoing arguments stack space requirement.
// The stack offset computed by CC_Sparc64 includes all arguments.
- // We always allocate space for 6 arguments in the prolog.
- unsigned ArgsSize = std::max(6*8u, CCInfo.getNextStackOffset()) - 6*8u;
+ // Called functions expect 6 argument words to exist in the stack frame, used
+ // or not.
+ unsigned ArgsSize = std::max(6*8u, CCInfo.getNextStackOffset());
// Keep stack frames 16-byte aligned.
ArgsSize = RoundUpToAlignment(ArgsSize, 16);
OpenPOWER on IntegriCloud