aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-30 19:38:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-30 19:38:39 +0000
commitd4cd1b07169c698bd003be102bd73a7da7e24b25 (patch)
tree6f727c34129fefb6533de72df367c2c4afb1ab8c /lib/CodeGen/CGCall.cpp
parent1e2b1fc4c4ae775adb2b236a8190f5a93b09ea12 (diff)
x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but
matches gcc 4.2 (not llvm-gcc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 21eccdc2a3..cf4f60e366 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -521,10 +521,13 @@ void X86_64ABIInfo::classify(QualType Ty,
} else if (const VectorType *VT = Ty->getAsVectorType()) {
uint64_t Size = Context.getTypeSize(VT);
if (Size == 64) {
- // FIXME: For some reason, gcc appears to be treating <1 x
- // double> as INTEGER; this seems wrong, but we will match for
- // now (icc rejects <1 x double>, so...).
- Lo = (VT->getElementType() == Context.DoubleTy) ? Integer : SSE;
+ // gcc passes <1 x double> in memory.
+ if (VT->getElementType() == Context.DoubleTy) {
+ Lo = Memory;
+ return;
+ }
+
+ Lo = Integer;
// If this type crosses an eightbyte boundary, it should be
// split.