[llvm-commits] [llvm-gcc-4.2] r49746 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Devang Patel
dpatel at apple.com
Tue Apr 15 15:18:41 PDT 2008
Author: dpatel
Date: Tue Apr 15 17:18:40 2008
New Revision: 49746
URL: http://llvm.org/viewvc/llvm-project?rev=49746&view=rev
Log:
Handle test cases from gcc.target/x86-64/abi/test_struct_return.c
Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=49746&r1=49745&r2=49746&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Tue Apr 15 17:18:40 2008
@@ -843,6 +843,15 @@
Elts.push_back(Type::DoubleTy);
Elts.push_back(Type::DoubleTy);
Bytes -= 16;
+ } else if (Class[i+1] == X86_64_SSEDF_CLASS && Bytes == 16) {
+ // struct {float f[2]; double d; } should be returned in SSE registers.
+ Elts.push_back(Type::DoubleTy);
+ Elts.push_back(Type::DoubleTy);
+ } else if (Class[i+1] == X86_64_INTEGER_CLASS) {
+ // struct { float f[2]; char c; } should be returned in SSE(low)
+ // and INT (high).
+ Elts.push_back(VectorType::get(Type::FloatTy, 2));
+ Elts.push_back(Type::DoubleTy);
} else
assert(0 && "Not yet handled!");
++i; // Already handled the next one.
More information about the llvm-commits
mailing list