summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2006-11-10 04:28:35 +0000
committerTanya Lattner <tonic@nondot.org>2006-11-10 04:28:35 +0000
commit56237d03c7fd8158a0b919706190c7c6a4e1389e (patch)
tree2a95a7a6298baed08b75ff347bb9119b93edfcbf
parentdf39322c24eb700290dbf146c12841bc55562a8d (diff)
downloadllvm-56237d03c7fd8158a0b919706190c7c6a4e1389e.tar.gz
Merging from mainline
llvm-svn: 31626
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index ac7327f9e953..b2d25b6793d1 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -516,10 +516,9 @@ SDOperand X86TargetLowering::LowerCCCArguments(SDOperand Op, SelectionDAG &DAG)
BytesToPopOnReturn = 0; // Callee pops nothing.
BytesCallerReserves = ArgOffset;
- // If this is a struct return on Darwin/X86, the callee pops the hidden struct
- // pointer.
- if (MF.getFunction()->getCallingConv() == CallingConv::CSRet &&
- Subtarget->isTargetDarwin())
+ // If this is a struct return on, the callee pops the hidden struct
+ // pointer. This is common for Darwin/X86, Linux & Mingw32 targets.
+ if (MF.getFunction()->getCallingConv() == CallingConv::CSRet)
BytesToPopOnReturn = 4;
// Return the new list of results.
@@ -680,9 +679,10 @@ SDOperand X86TargetLowering::LowerCCCCallTo(SDOperand Op, SelectionDAG &DAG) {
// Create the CALLSEQ_END node.
unsigned NumBytesForCalleeToPush = 0;
- // If this is is a call to a struct-return function on Darwin/X86, the callee
+ // If this is is a call to a struct-return function, the callee
// pops the hidden struct pointer, so we have to push it back.
- if (CallingConv == CallingConv::CSRet && Subtarget->isTargetDarwin())
+ // This is common for Darwin/X86, Linux & Mingw32 targets.
+ if (CallingConv == CallingConv::CSRet)
NumBytesForCalleeToPush = 4;
NodeTys.clear();