From: Dan Gohman Date: Tue, 1 Jun 2010 21:09:47 +0000 (+0000) Subject: Fix the allocation of shadow space for the Win64 calling convention X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d8acddda587cda98d46edb6d5fc71edd79a41654;p=oota-llvm.git Fix the allocation of shadow space for the Win64 calling convention in X86FastISel. Patch by Jan Sjodin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105290 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 33a1919cce6..47ee820b286 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -1391,6 +1391,12 @@ bool X86FastISel::X86SelectCall(const Instruction *I) { // Analyze operands of the call, assigning locations to each operand. SmallVector ArgLocs; CCState CCInfo(CC, false, TM, ArgLocs, I->getParent()->getContext()); + + // Allocate shadow area for Win64 + if (Subtarget->isTargetWin64()) { + CCInfo.AllocateStack(32, 8); + } + CCInfo.AnalyzeCallOperands(ArgVTs, ArgFlags, CCAssignFnForCall(CC)); // Get a count of how many bytes are to be pushed on the stack.