aboutsummaryrefslogtreecommitdiff
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
commita99ec28134c2fd0a21c446a58bf6406b8aa1a580 (patch)
tree1c592c4c9e343b7a9efffd231b378233a3a6e72c
parent78d15761e40a542b992ac811b4e3909c33d1513a (diff)
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122934 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86FrameInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/X86/X86FrameInfo.cpp b/lib/Target/X86/X86FrameInfo.cpp
index afadb4c9b3..5a8d9768f8 100644
--- a/lib/Target/X86/X86FrameInfo.cpp
+++ b/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)