diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-12-06 19:09:06 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-12-06 19:09:06 +0000 |
commit | a4e87944a8735e438bd71ffb924c099c3ec1931a (patch) | |
tree | e61c2b368730f0d5f91df10e5bb784007987418c /llvm/lib/Target/X86/X86FrameLowering.cpp | |
parent | dfb34fcb1abec24f037ea908ef959783dd361b79 (diff) | |
download | bcm5719-llvm-a4e87944a8735e438bd71ffb924c099c3ec1931a.tar.gz bcm5719-llvm-a4e87944a8735e438bd71ffb924c099c3ec1931a.zip |
For a small sized stack, we encode that value directly with no "stack adjust" value.
llvm-svn: 145952
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp index 7f3c13391d3..09aa114f1b6 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -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, |