Use pushq / popq instead of subq $8, %rsp / addq $8, %rsp to adjust stack in
authorEvan Cheng <evan.cheng@apple.com>
Mon, 3 Jan 2011 22:53:22 +0000 (22:53 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 3 Jan 2011 22:53:22 +0000 (22:53 +0000)
commit7158e08b8e619f4dcac9834c57f5f8afd6eea2eb
tree49f3021d388b4d92ceeace2b7b648696c88a8bfe
parentfd1ed5f4c4afebf312ecb708280686c49a7d8839
Use pushq / popq instead of subq $8, %rsp / addq $8, %rsp to adjust stack in
prologue and epilogue if the adjustment is 8. Similarly, use pushl / popl if
the adjustment is 4 in 32-bit mode.

In the epilogue, takes care to pop to a caller-saved register that's not live
at the exit (either return or tailcall instruction).
rdar://8771137

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122783 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameInfo.cpp
lib/Target/X86/X86InstrControl.td
test/CodeGen/X86/2009-09-10-SpillComments.ll
test/CodeGen/X86/2010-07-02-asm-alignstack.ll
test/CodeGen/X86/abi-isel.ll
test/CodeGen/X86/licm-symbol.ll
test/CodeGen/X86/tail-opts.ll
test/CodeGen/X86/tailcall-largecode.ll
test/CodeGen/X86/tlv-2.ll