1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Fix off-by-one error when encoding the stack size for a frameless stack.

llvm-svn: 146029
This commit is contained in:
Bill Wendling 2011-12-07 07:49:49 +00:00
parent 1acd685d87
commit 757cba38ba

View File

@ -561,7 +561,7 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
CompactUnwindEncoding |= (StackAdjust & 0xFF) << 16;
CompactUnwindEncoding |= RegEnc & 0x7FFF;
} else {
uint32_t TotalStackSize = StackAdjust + StackSize;
uint32_t TotalStackSize = StackAdjust + StackSize + 1;
if ((TotalStackSize & 0xFF) == TotalStackSize) {
// Frameless stack with a small stack size.
CompactUnwindEncoding |= 0x02000000;