diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-01-29 07:22:20 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-01-29 07:22:20 +0000 |
commit | 8e6652affceeb34237bf9470296ff22be3ee9891 (patch) | |
tree | f0e192a77746c963abea908174af09bf08283c87 /clang/lib/CodeGen/CGCall.cpp | |
parent | 36790cf29a4cae524feac7f6f72f26f0173c9704 (diff) | |
download | bcm5719-llvm-8e6652affceeb34237bf9470296ff22be3ee9891.tar.gz bcm5719-llvm-8e6652affceeb34237bf9470296ff22be3ee9891.zip |
x86_64 ABI: Classify _Complex ints as integer.
llvm-svn: 63283
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 72ba7f879af..6d21622b166 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/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; |