mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 03:30:28 +00:00
For a small sized stack, we encode that value directly with no "stack adjust" value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145952 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c7ffb6a7e
commit
75e14e0ebd
@ -565,7 +565,7 @@ uint32_t X86FrameLowering::getCompactUnwindEncoding(MachineFunction &MF) const {
|
|||||||
if ((FullOffset & 0xFF) == FullOffset) {
|
if ((FullOffset & 0xFF) == FullOffset) {
|
||||||
// Frameless stack.
|
// Frameless stack.
|
||||||
CompactUnwindEncoding |= 0x02000000;
|
CompactUnwindEncoding |= 0x02000000;
|
||||||
CompactUnwindEncoding |= (FullOffset & 0xFF) << 16;
|
CompactUnwindEncoding |= (CFAOffset & 0xFF) << 16;
|
||||||
} else {
|
} else {
|
||||||
if ((CFAOffset & 0x7) != CFAOffset)
|
if ((CFAOffset & 0x7) != CFAOffset)
|
||||||
// The extra stack adjustments are too big for us to handle.
|
// 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 |= (CFAOffset & 0x7) << 13;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CompactUnwindEncoding |= ((6 - SavedRegIdx) & 0x7) << 10;
|
||||||
|
|
||||||
// Get the encoding of the saved registers when we don't have a frame
|
// Get the encoding of the saved registers when we don't have a frame
|
||||||
// pointer.
|
// pointer.
|
||||||
uint32_t RegEnc = encodeCompactUnwindRegistersWithoutFrame(SavedRegs,
|
uint32_t RegEnc = encodeCompactUnwindRegistersWithoutFrame(SavedRegs,
|
||||||
|
Loading…
Reference in New Issue
Block a user