This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ColdFire 59/63] compat-related testsuite fixes for uClinux


When using uClinux flat executables, the data segment is only guaranteed
to have MAX_SHARED_LIBS * sizeof (intptr_t) bytes of alignment.  The
default value of MAX_SHARED_LIBS is 1 if shared libraries are not
enabled, but an alignment of sizeof (intptr_t) is often too low to run
the gcc testsuites.  It's better to run the testsuites with shared
libraries enabled, in which case the usual value of MAX_SHARED_LIBS
is 4.  The maximum data alignment is therefore 16 on most targets.

struct-layout-1 has two types that need more alignment than that, namely
v16sf and u16sf.  The tests are written in such a way that it doesn't
matter whether these types are really 64-byte quantities, so this
patch defines them to v4sf and u4sf on uClinux targets.  This is similar
to the special measures taken for __m64 on non-x86 targets and for all
vector types if SKIP_ATTRIBUTE.  I've equated them to smaller vector
types rather than "int" so that the tests do remain vector tests.

Richard


gcc/testsuite/
	* gcc.dg/compat/struct-layout-1.h (v16sf): Define to v4sf on
	uClinux targets.
	(u16sf): Likewise u4sf.
	* g++.dg/compat/struct-layout-1.h: Likewise.

Index: gcc/testsuite/gcc.dg/compat/struct-layout-1.h
===================================================================
--- gcc/testsuite/gcc.dg/compat/struct-layout-1.h	2007-01-09 13:18:10.000000000 +0000
+++ gcc/testsuite/gcc.dg/compat/struct-layout-1.h	2007-01-09 15:02:31.000000000 +0000
@@ -57,6 +57,11 @@ typedef int __m128;
 typedef int __m64;
 typedef int __m128;
 #endif
+#if defined (__uClinux__)
+/* The maximum achievable alignment on uClinux is usually 16 bytes.  */
+#define v16sf v4sf
+#define u16sf u4sf
+#endif
 
 #define FLDS_MAX	32
 extern struct Info
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.h
===================================================================
--- gcc/testsuite/g++.dg/compat/struct-layout-1.h	2007-01-09 13:18:10.000000000 +0000
+++ gcc/testsuite/g++.dg/compat/struct-layout-1.h	2007-01-09 15:02:31.000000000 +0000
@@ -57,6 +57,11 @@ typedef int __m128;
 typedef int __m64;
 typedef int __m128;
 #endif
+#if defined (__uClinux__)
+/* The maximum achievable alignment on uClinux is usually 16 bytes.  */
+#define v16sf v4sf
+#define u16sf u4sf
+#endif
 
 #define FLDS_MAX	32
 extern struct Info


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]