[cfe-commits] r63413 - /cfe/trunk/lib/CodeGen/CGCall.cpp

Daniel Dunbar daniel at zuster.org
Fri Jan 30 11:38:39 PST 2009


Author: ddunbar
Date: Fri Jan 30 13:38:39 2009
New Revision: 63413

URL: http://llvm.org/viewvc/llvm-project?rev=63413&view=rev
Log:
x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but
matches gcc 4.2 (not llvm-gcc).

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=63413&r1=63412&r2=63413&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Jan 30 13:38:39 2009
@@ -521,10 +521,13 @@
   } else if (const VectorType *VT = Ty->getAsVectorType()) {
     uint64_t Size = Context.getTypeSize(VT);
     if (Size == 64) {
-      // FIXME: For some reason, gcc appears to be treating <1 x
-      // double> as INTEGER; this seems wrong, but we will match for
-      // now (icc rejects <1 x double>, so...).
-      Lo = (VT->getElementType() == Context.DoubleTy) ? Integer : SSE;
+      // gcc passes <1 x double> in memory.
+      if (VT->getElementType() == Context.DoubleTy) {
+        Lo = Memory;
+        return;
+      }
+
+      Lo = Integer;
 
       // If this type crosses an eightbyte boundary, it should be
       // split.





More information about the cfe-commits mailing list