mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-18 14:31:27 +00:00
Fix off-by-one error when encoding the stack size for a frameless stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146029 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a96b3dad2
commit
c61751373a
@ -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…
x
Reference in New Issue
Block a user