For a small sized stack, we encode that value directly with no "stack adjust" value.

llvm-svn: 145952
This commit is contained in:
Bill Wendling 2011-12-06 19:09:06 +00:00
parent dfb34fcb1a
commit a4e87944a8
1 changed files with 3 additions and 1 deletions

View File

@ -565,7 +565,7 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
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 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
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,