X86: Fix frameescape when not using an FP
authorReid Kleckner <reid@kleckner.net>
Tue, 24 Mar 2015 23:46:01 +0000 (23:46 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 24 Mar 2015 23:46:01 +0000 (23:46 +0000)
commitd639e1975d9360ee0cf9ce9a458ae890eebea0de
tree80c6e33ae007e23bc3427628adcd8be391b9db75
parentfa71fb34adfbe2638dacad68ce1a63ed5a98b6d5
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
lib/CodeGen/MachineFunction.cpp
lib/Target/X86/X86RegisterInfo.cpp
test/CodeGen/X86/frameescape.ll