x86: Fix large model calls to __chkstk for dynamic allocas
authorReid Kleckner <reid@kleckner.net>
Thu, 29 Jan 2015 23:58:04 +0000 (23:58 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 29 Jan 2015 23:58:04 +0000 (23:58 +0000)
commitc9fbc97e9553b257d35ba4507a478bc8fc9459fb
tree2331bf4ba0b5d06b4f121854b04f3ccfede41c0a
parent5d51c0ee04b0b00a198cb94a562e4aaeec59d3e2
x86: Fix large model calls to __chkstk for dynamic allocas

In the large code model, we now put __chkstk in %r11 before calling it.

Refactor the code so that we only do this once. Simplify things by using
__chkstk_ms instead of __chkstk on cygming. We already use that symbol
in the prolog emission, and it simplifies our logic.

Second half of PR18582.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227519 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/inalloca-stdcall.ll
test/CodeGen/X86/win64_alloca_dynalloca.ll