Fix dumb bug in alignment adjustment code!
authorVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 12 Nov 2001 05:16:39 +0000 (05:16 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 12 Nov 2001 05:16:39 +0000 (05:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1260 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9InstrSelection.cpp

index cd017b6eb27ae5f072719c9a878a35a10c8a5782..266d42435af7d1b6a88d1d114fa7200c29307e78 100644 (file)
@@ -1037,7 +1037,7 @@ GetInstructionsForProlog(BasicBlock* entryBB,
   
   if (unsigned padsz = (staticStackSize %
                         (unsigned) frameInfo.getStackFrameSizeAlignment()))
-    staticStackSize += padsz;
+    staticStackSize += frameInfo.getStackFrameSizeAlignment() - padsz;
   
   assert(target.getInstrInfo().constantFitsInImmedField(SAVE, staticStackSize)
          && "Stack size too large for immediate field of SAVE instruction. Need additional work as described in the comment above");