[llvm-commits] [llvm-gcc-4.2] r52154 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Dale Johannesen
dalej at apple.com
Mon Jun 9 13:56:58 PDT 2008
Author: johannes
Date: Mon Jun 9 15:56:58 2008
New Revision: 52154
URL: http://llvm.org/viewvc/llvm-project?rev=52154&view=rev
Log:
x86-64 ABI. Handle 16-byte struct where 2nd word
is padding as a return value. Fixes c++/t025.
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=52154&r1=52153&r2=52154&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 Mon Jun 9 15:56:58 2008
@@ -1035,6 +1035,7 @@
// <2 x i64>, or <2 x f64>.
// 4. 1 x SSE + 1 x SSESF, size is 12: 1 x Double, 1 x Float.
// 5. 2 x SSE, size is 16: 2 x Double.
+ // 6. 1 x SSE, 1 x NO: Second is padding, pass as double.
if ((NumClasses-i) == 1) {
if (Bytes == 8) {
Elts.push_back(Type::DoubleTy);
@@ -1088,8 +1089,12 @@
} else if (Class[i+1] == X86_64_INTEGER_CLASS) {
Elts.push_back(VectorType::get(Type::FloatTy, 2));
Elts.push_back(Type::Int64Ty);
- } else
+ } else if (Class[i+1] == X86_64_NO_CLASS) {
+ Elts.push_back(Type::DoubleTy);
+ Bytes -= 16;
+ } else {
assert(0 && "Not yet handled!");
+ }
++i; // Already handled the next one.
} else
assert(0 && "Not yet handled!");
More information about the llvm-commits
mailing list