[llvm-commits] [llvm] r122934 - /llvm/trunk/lib/Target/X86/X86FrameInfo.cpp
Bill Wendling
isanbard at gmail.com
Wed Jan 5 16:50:34 PST 2011
Author: void
Date: Wed Jan 5 18:50:34 2011
New Revision: 122934
URL: http://llvm.org/viewvc/llvm-project?rev=122934&view=rev
Log:
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!
Modified:
llvm/trunk/lib/Target/X86/X86FrameInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86FrameInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameInfo.cpp?rev=122934&r1=122933&r2=122934&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FrameInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FrameInfo.cpp Wed Jan 5 18:50:34 2011
@@ -566,6 +566,8 @@
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)
More information about the llvm-commits
mailing list