summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-29 07:22:20 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-29 07:22:20 +0000
commit8e6652affceeb34237bf9470296ff22be3ee9891 (patch)
treef0e192a77746c963abea908174af09bf08283c87 /clang/lib/CodeGen/CGCall.cpp
parent36790cf29a4cae524feac7f6f72f26f0173c9704 (diff)
downloadbcm5719-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.cpp8
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;
OpenPOWER on IntegriCloud