From: Daniel Dunbar Date: Thu, 29 Jan 2009 07:22:20 +0000 (+0000) Subject: x86_64 ABI: Classify _Complex ints as integer. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eac48dc189154eea5067310c5dd257dfe07c29aa;p=clang x86_64 ABI: Classify _Complex ints as integer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63283 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 72ba7f879a..6d21622b16 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -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;