[llvm-commits] [llvm-gcc-4.2] r48475 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h
Dale Johannesen
dalej at apple.com
Mon Mar 17 17:20:54 PDT 2008
Author: johannes
Date: Mon Mar 17 19:20:53 2008
New Revision: 48475
URL: http://llvm.org/viewvc/llvm-project?rev=48475&view=rev
Log:
Revert passing of large _Complex objects as int
on x86-64. The code generated for these is incompatible
with gcc, i.e. wrong, but at least it doesn't crash.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-abi.h
Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=48475&r1=48474&r2=48475&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Mon Mar 17 19:20:53 2008
@@ -244,7 +244,13 @@
// Return scalar values normally.
C.HandleScalarResult(Ty);
} else if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST &&
- !aggregate_value_p(type, current_function_decl)) {
+ !aggregate_value_p(type, current_function_decl)
+#if defined(TARGET_386) && defined(TARGET_64BIT)
+ // FIXME without this, _Complex long double crashes. With it, we
+ // just produce incorrect code.
+ && TREE_INT_CST_LOW(TYPE_SIZE_UNIT(type))<=8
+#endif
+ ) {
tree SingleElt = LLVM_SHOULD_RETURN_STRUCT_AS_SCALAR(type);
if (SingleElt && TYPE_SIZE(SingleElt) &&
TREE_CODE(TYPE_SIZE(SingleElt)) == INTEGER_CST &&
More information about the llvm-commits
mailing list