I don't think we have to have 4 extra allocated (but unused) bytes on the stack.
authorBrian Gaeke <gaeke@uiuc.edu>
Tue, 13 Apr 2004 18:28:37 +0000 (18:28 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Tue, 13 Apr 2004 18:28:37 +0000 (18:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12905 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcRegisterInfo.cpp
lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/SparcV8/SparcV8RegisterInfo.cpp
lib/Target/SparcV8/SparcV8TargetMachine.cpp

index c377612e64c62b2748002c1f385c920da35f8e15..114e79569cc8f12e6533a23cb9573c57a611ef3a 100644 (file)
@@ -99,7 +99,7 @@ void SparcV8RegisterInfo::emitPrologue(MachineFunction &MF) const {
   MachineFrameInfo *MFI = MF.getFrameInfo();
 
   // Get the number of bytes to allocate from the FrameInfo
-  int NumBytes = (int) MFI->getStackSize() + 4;
+  int NumBytes = (int) MFI->getStackSize();
 
   // Emit the correct save instruction based on the number of bytes in the frame.
   // Minimum stack frame size according to V8 ABI is:
index 9cd97ee496bed9c8ec9e5225bc7c9c918ceeb931..2aaa5d8a8e695eb0ed76a6cc2cc5eff21dd98d7a 100644 (file)
@@ -32,7 +32,7 @@ TargetMachine *llvm::allocateSparcV8TargetMachine(const Module &M,
 SparcV8TargetMachine::SparcV8TargetMachine(const Module &M,
                                            IntrinsicLowering *IL)
   : TargetMachine("SparcV8", IL, true, 4, 4, 4, 4, 4),
-    FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 4), JITInfo(*this) {
+    FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0), JITInfo(*this) {
 }
 
 /// addPassesToEmitAssembly - Add passes to the specified pass manager
index c377612e64c62b2748002c1f385c920da35f8e15..114e79569cc8f12e6533a23cb9573c57a611ef3a 100644 (file)
@@ -99,7 +99,7 @@ void SparcV8RegisterInfo::emitPrologue(MachineFunction &MF) const {
   MachineFrameInfo *MFI = MF.getFrameInfo();
 
   // Get the number of bytes to allocate from the FrameInfo
-  int NumBytes = (int) MFI->getStackSize() + 4;
+  int NumBytes = (int) MFI->getStackSize();
 
   // Emit the correct save instruction based on the number of bytes in the frame.
   // Minimum stack frame size according to V8 ABI is:
index 9cd97ee496bed9c8ec9e5225bc7c9c918ceeb931..2aaa5d8a8e695eb0ed76a6cc2cc5eff21dd98d7a 100644 (file)
@@ -32,7 +32,7 @@ TargetMachine *llvm::allocateSparcV8TargetMachine(const Module &M,
 SparcV8TargetMachine::SparcV8TargetMachine(const Module &M,
                                            IntrinsicLowering *IL)
   : TargetMachine("SparcV8", IL, true, 4, 4, 4, 4, 4),
-    FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 4), JITInfo(*this) {
+    FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0), JITInfo(*this) {
 }
 
 /// addPassesToEmitAssembly - Add passes to the specified pass manager