[llvm-commits] [llvm] r116083 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86TargetMachine.cpp test/CodeGen/X86/win64_params.ll
Cameron Esfahani
dirty at apple.com
Fri Oct 8 12:24:19 PDT 2010
Author: dirty
Date: Fri Oct 8 14:24:18 2010
New Revision: 116083
URL: http://llvm.org/viewvc/llvm-project?rev=116083&view=rev
Log:
Recommit 116056, now with the missing file...
Added:
llvm/trunk/test/CodeGen/X86/win64_params.ll
- copied unchanged from r116062, llvm/trunk/test/CodeGen/X86/win64_params.ll
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=116083&r1=116082&r2=116083&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Oct 8 14:24:18 2010
@@ -1701,8 +1701,12 @@
TotalNumXMMRegs = 0;
if (IsWin64) {
+ const TargetFrameInfo &TFI = *getTargetMachine().getFrameInfo();
+ // Get to the caller-allocated home save location. Add 8 to account
+ // for the return address.
+ int HomeOffset = TFI.getOffsetOfLocalArea() + 8;
FuncInfo->setRegSaveFrameIndex(
- MFI->CreateFixedObject(1, NumIntRegs * 8, false));
+ MFI->CreateFixedObject(1, NumIntRegs * 8 + HomeOffset, false));
FuncInfo->setVarArgsFrameIndex(FuncInfo->getRegSaveFrameIndex());
} else {
// For X86-64, if there are vararg parameters that are passed via
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=116083&r1=116082&r2=116083&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Fri Oct 8 14:24:18 2010
@@ -121,7 +121,8 @@
Subtarget(TT, FS, is64Bit),
FrameInfo(TargetFrameInfo::StackGrowsDown,
Subtarget.getStackAlignment(),
- Subtarget.is64Bit() ? -8 : -4),
+ (Subtarget.isTargetWin64() ? -40 :
+ (Subtarget.is64Bit() ? -8 : -4))),
ELFWriterInfo(is64Bit, true) {
DefRelocModel = getRelocationModel();
More information about the llvm-commits
mailing list