[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp

Anton Korobeynikov asl at math.spbu.ru
Thu Nov 9 16:48:28 PST 2006



Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.288 -> 1.289
---
Log message:

Fixing PR990: http://llvm.org/PR990 : http://llvm.org/PR990: http://llvm.org/PR990 .
This should unbreak csretcc on Linux & mingw targets. Several tests from 
llvm-test should be also restored (fftbench, bigfib).


---
Diffs of the changes:  (+6 -6)

 X86ISelLowering.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.288 llvm/lib/Target/X86/X86ISelLowering.cpp:1.289
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.288	Tue Nov  7 16:14:24 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp	Thu Nov  9 18:48:12 2006
@@ -516,10 +516,9 @@
   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 @@
   // 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();






More information about the llvm-commits mailing list