summaryrefslogtreecommitdiffstats
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
commit4d22eaeb44dbca67d974bb8dc893bf46888ce4a5 (patch)
treeae89f6dc128c99cb6c05ff64d59e046d2b656c7e
parent0b0a64830a8f8517545190db1305c6a82d75a367 (diff)
downloadbcm5719-llvm-4d22eaeb44dbca67d974bb8dc893bf46888ce4a5.tar.gz
bcm5719-llvm-4d22eaeb44dbca67d974bb8dc893bf46888ce4a5.zip
x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but
matches gcc 4.2 (not llvm-gcc). llvm-svn: 63413
-rw-r--r--clang/lib/CodeGen/CGCall.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 21eccdc2a36..cf4f60e3665 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud