x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but

matches gcc 4.2 (not llvm-gcc).

llvm-svn: 63413
This commit is contained in:
Daniel Dunbar 2009-01-30 19:38:39 +00:00
parent 0b0a64830a
commit 4d22eaeb44
1 changed files with 7 additions and 4 deletions

View File

@ -521,10 +521,13 @@ void X86_64ABIInfo::classify(QualType Ty,
} else if (const VectorType *VT = Ty->getAsVectorType()) { } else if (const VectorType *VT = Ty->getAsVectorType()) {
uint64_t Size = Context.getTypeSize(VT); uint64_t Size = Context.getTypeSize(VT);
if (Size == 64) { if (Size == 64) {
// FIXME: For some reason, gcc appears to be treating <1 x // gcc passes <1 x double> in memory.
// double> as INTEGER; this seems wrong, but we will match for if (VT->getElementType() == Context.DoubleTy) {
// now (icc rejects <1 x double>, so...). Lo = Memory;
Lo = (VT->getElementType() == Context.DoubleTy) ? Integer : SSE; return;
}
Lo = Integer;
// If this type crosses an eightbyte boundary, it should be // If this type crosses an eightbyte boundary, it should be
// split. // split.