mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
X86: Fix frameescape when not using an FP
We can't use TargetFrameLowering::getFrameIndexOffset directly, because Win64 really wants the offset from the stack pointer at the end of the prologue. Instead, use X86FrameLowering::getFrameIndexOffsetFromSP(), which is a pretty close approximiation of that. It fails to handle cases with interestingly large stack alignments, which is pretty uncommon on Win64 and is TODO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233137 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -584,14 +584,6 @@ int MachineFrameInfo::CreateFixedSpillStackObject(uint64_t Size,
|
||||
return -++NumFixedObjects;
|
||||
}
|
||||
|
||||
int MachineFrameInfo::CreateFrameAllocation(uint64_t Size) {
|
||||
// Force the use of a frame pointer. The intention is that this intrinsic be
|
||||
// used in conjunction with unwind mechanisms that leak the frame pointer.
|
||||
setFrameAddressIsTaken(true);
|
||||
Size = RoundUpToAlignment(Size, StackAlignment);
|
||||
return CreateStackObject(Size, StackAlignment, false);
|
||||
}
|
||||
|
||||
BitVector
|
||||
MachineFrameInfo::getPristineRegs(const MachineBasicBlock *MBB) const {
|
||||
assert(MBB && "MBB must be valid");
|
||||
|
Reference in New Issue
Block a user