[llvm-commits] [llvm] r145952 - /llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
Bill Wendling
isanbard at gmail.com
Tue Dec 6 11:09:06 PST 2011
Author: void
Date: Tue Dec 6 13:09:06 2011
New Revision: 145952
URL: http://llvm.org/viewvc/llvm-project?rev=145952&view=rev
Log:
For a small sized stack, we encode that value directly with no "stack adjust" value.
Modified:
llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameLowering.cpp?rev=145952&r1=145951&r2=145952&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FrameLowering.cpp Tue Dec 6 13:09:06 2011
@@ -565,7 +565,7 @@
if ((FullOffset & 0xFF) == FullOffset) {
// Frameless stack.
CompactUnwindEncoding |= 0x02000000;
- CompactUnwindEncoding |= (FullOffset & 0xFF) << 16;
+ CompactUnwindEncoding |= (CFAOffset & 0xFF) << 16;
} else {
if ((CFAOffset & 0x7) != CFAOffset)
// The extra stack adjustments are too big for us to handle.
@@ -582,6 +582,8 @@
CompactUnwindEncoding |= (CFAOffset & 0x7) << 13;
}
+ CompactUnwindEncoding |= ((6 - SavedRegIdx) & 0x7) << 10;
+
// Get the encoding of the saved registers when we don't have a frame
// pointer.
uint32_t RegEnc = encodeCompactUnwindRegistersWithoutFrame(SavedRegs,
More information about the llvm-commits
mailing list