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)
commitca9b9feb2c6d85d6de4e63ab3956275d2a290ebb
treefe9cffb6770d9905e77ed5a5b6fd5c0518c7821f
parent28f353c7d0d31fbaf6176704cd37001086b94a6e
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.

llvm-svn: 227519
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86FrameLowering.h
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/inalloca-stdcall.ll
llvm/test/CodeGen/X86/win64_alloca_dynalloca.ll