aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-27 02:01:34 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-27 02:01:34 +0000
commit7a6605d8be0fc30f1846657ee8133387b1b85296 (patch)
tree770ed4321c13b1fd1fe08cf791001bd0475be44a
parente957f537451794225a541ed3fd75bc3c7bb21a6f (diff)
x86_64: Classify __m64 and __m128 "correctly".
- gcc appears to be classifying <1 x double> as INTEGER which is odd. Will investigate later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63086 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGCall.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 9e632c0e27..72ba7f879a 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -450,12 +450,24 @@ void X86_64ABIInfo::classify(QualType Ty,
Lo = X87;
Hi = X87Up;
}
- // FIXME: _Decimal32, _Decimal64, and __m64 are SSE.
- // FIXME: _float128, _Decimal128, and __m128 are (SSE, SSEUp).
+
+ // FIXME: _Decimal32 and _Decimal64 are SSE.
+ // FIXME: _float128 and _Decimal128 are (SSE, SSEUp).
// FIXME: __int128 is (Integer, Integer).
} else if (Ty->isPointerLikeType() || Ty->isBlockPointerType() ||
Ty->isObjCQualifiedInterfaceType()) {
Lo = Integer;
+ } else if (const VectorType *VT = Ty->getAsVectorType()) {
+ unsigned 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;
+ } else if (Size == 128) {
+ Lo = SSE;
+ Hi = SSEUp;
+ }
} else if (const ComplexType *CT = Ty->getAsComplexType()) {
QualType ET = CT->getElementType();