forked from OSchip/llvm-project
Fix off-by-one error when encoding the stack size for a frameless stack.
llvm-svn: 146029
This commit is contained in:
parent
2493e92530
commit
3c86459997
|
|
@ -561,7 +561,7 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
|
||||||
CompactUnwindEncoding |= (StackAdjust & 0xFF) << 16;
|
CompactUnwindEncoding |= (StackAdjust & 0xFF) << 16;
|
||||||
CompactUnwindEncoding |= RegEnc & 0x7FFF;
|
CompactUnwindEncoding |= RegEnc & 0x7FFF;
|
||||||
} else {
|
} else {
|
||||||
uint32_t TotalStackSize = StackAdjust + StackSize;
|
uint32_t TotalStackSize = StackAdjust + StackSize + 1;
|
||||||
if ((TotalStackSize & 0xFF) == TotalStackSize) {
|
if ((TotalStackSize & 0xFF) == TotalStackSize) {
|
||||||
// Frameless stack with a small stack size.
|
// Frameless stack with a small stack size.
|
||||||
CompactUnwindEncoding |= 0x02000000;
|
CompactUnwindEncoding |= 0x02000000;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue