From 581ac2723c5cb5182114092591eb5e21ceea2e77 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 6 Dec 2011 21:34:01 +0000 Subject: [PATCH] Encode the total stack if there isn't a frame. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145969 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86FrameLowering.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp index 5bf8132db29..6e2b3df7a4a 100644 --- a/lib/Target/X86/X86FrameLowering.cpp +++ b/lib/Target/X86/X86FrameLowering.cpp @@ -564,12 +564,13 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const { CompactUnwindEncoding |= (StackAdjust & 0xFF) << 16; CompactUnwindEncoding |= RegEnc & 0x7FFF; } else { - if ((StackSize & 0xFF) == StackSize) { + uint32_t TotalStackSize = StackAdjust + StackSize; + if ((TotalStackSize & 0xFF) == TotalStackSize) { // Frameless stack with a small stack size. CompactUnwindEncoding |= 0x02000000; // Encode the stack size. - CompactUnwindEncoding |= (StackSize & 0xFF) << 16; + CompactUnwindEncoding |= (TotalStackSize & 0xFF) << 16; } else { if ((StackAdjust & 0x7) != StackAdjust) // The extra stack adjustments are too big for us to handle.