]> granicus.if.org Git - clang/commitdiff
x86_64 ABI: Classify _Complex ints as integer.
authorDaniel Dunbar <daniel@zuster.org>
Thu, 29 Jan 2009 07:22:20 +0000 (07:22 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 29 Jan 2009 07:22:20 +0000 (07:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63283 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp

index 72ba7f879af52a45aa283be70a376132a6fbe17b..6d21622b166fe6921ccce470d4590bd034d7fff0 100644 (file)
@@ -471,7 +471,13 @@ void X86_64ABIInfo::classify(QualType Ty,
   } else if (const ComplexType *CT = Ty->getAsComplexType()) {
     QualType ET = CT->getElementType();
     
-    if (ET == Context.FloatTy) 
+    if (ET->isIntegerType()) {
+      unsigned Size = Context.getTypeSize(Ty);
+      if (Size <= 64)
+        Lo = Integer;
+      else if (Size <= 128)
+        Lo = Hi = Integer;
+    } else if (ET == Context.FloatTy) 
       Lo = SSE;
     else if (ET == Context.DoubleTy)
       Lo = Hi = SSE;