Adjust the stack by one pointer size for all frameless stacks.
authorBill Wendling <isanbard@gmail.com>
Wed, 7 Dec 2011 07:58:55 +0000 (07:58 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 7 Dec 2011 07:58:55 +0000 (07:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146030 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FrameLowering.cpp

index c0e86cad642d817a10ff01549e329f93e072e320..036043637fd0c291715510f1f1243a35ae4feeed 100644 (file)
@@ -561,7 +561,8 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
     CompactUnwindEncoding |= (StackAdjust & 0xFF) << 16;
     CompactUnwindEncoding |= RegEnc & 0x7FFF;
   } else {
-    uint32_t TotalStackSize = StackAdjust + StackSize + 1;
+    ++StackAdjust;
+    uint32_t TotalStackSize = StackAdjust + StackSize;
     if ((TotalStackSize & 0xFF) == TotalStackSize) {
       // Frameless stack with a small stack size.
       CompactUnwindEncoding |= 0x02000000;