aboutsummaryrefslogtreecommitdiff
path: root/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
commiteac48dc189154eea5067310c5dd257dfe07c29aa (patch)
tree6c26d018e83f84af126573a15630c7d1257ae79f /lib/CodeGen/CGCall.cpp
parent88eccaf06f9d88191723e71bdf5ca68409393be6 (diff)
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
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp8
1 files changed, 7 insertions, 1 deletions
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;