summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-01-06 00:50:34 +0000
committerBill Wendling <isanbard@gmail.com>2011-01-06 00:50:34 +0000
commit3b949bcaf345d15cb451f54b19bc4c60cf625a3d (patch)
tree222c31a686eb1e1d64c74bf6f19ed1051e2d638f /llvm/lib
parent81d40711f31ca263a370d029116f04d81ba6ddf2 (diff)
downloadbcm5719-llvm-3b949bcaf345d15cb451f54b19bc4c60cf625a3d.tar.gz
bcm5719-llvm-3b949bcaf345d15cb451f54b19bc4c60cf625a3d.zip
PR8919 - LLVM incorrectly generates "_alloca" as the stack probing call. That
works only on MinGW32. On 64-bit, the function to call is "__chkstk". Patch by KS Sreeram! llvm-svn: 122934
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86FrameInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86FrameInfo.cpp b/llvm/lib/Target/X86/X86FrameInfo.cpp
index afadb4c9b3d..5a8d9768f84 100644
--- a/llvm/lib/Target/X86/X86FrameInfo.cpp
+++ b/llvm/lib/Target/X86/X86FrameInfo.cpp
@@ -566,6 +566,8 @@ void X86FrameInfo::emitPrologue(MachineFunction &MF) const {
const char *StackProbeSymbol =
STI.isTargetWindows() ? "_chkstk" : "_alloca";
+ if (Is64Bit && STI.isTargetCygMing())
+ StackProbeSymbol = "__chkstk";
unsigned CallOp = Is64Bit ? X86::CALL64pcrel32 : X86::CALLpcrel32;
if (!isEAXAlive) {
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX)
OpenPOWER on IntegriCloud