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]

Re: [PATCH,testsuite] fix gcc.target/mips/fpr-moves-{5,6}.c for mips*-sde-elf


On Sat, Jul 04, 2009 at 07:59:50AM +0100, Richard Sandiford wrote:
> Nathan Froyd <froydnj@codesourcery.com> writes:
> > gcc.target/mips/fpr-moves-{5,6}.c test whether the compiler generates
> > the right code for moving long doubles about.  The test assumes 128-bit
> > long doubles, which are supposedly enabled by the -mabi=64 flag
> > (cf. mips.h:LONG_DOUBLE_TYPE_SIZE).  However, mips*-sde-elf only has
> > 64-bit long doubles, so several of the scan-assembler tests fail.
> > Rather than identifying which scan-assemblers work by chance on
> > mips*-sde-elf and which don't, I think it would be better to just state
> > that the test requires a large_long_double target.
> 
> This is a bit too broad.  large_long_double checks the current multilib,
> not the effect of -mabi=64, so it will disable the test on any run that
> isn't already using n32 or n64.  You should instead take a copy of
> check_effective_target_large_long_double (suggest calling it
> check_effective_target_mips_newabi_large_long_double) and add
> an "-mabi=64" argument to the check_no_compiler_messages call.
> 
> OK with that change, thanks.

Thanks, this is what I committed after retesting.

-Nathan

2009-07-06  Nathan Froyd  <froydnj@codesourcery.com>

	* lib/target-supports.exp
	(check_effective_target_mips_newabi_large_long_double): New.
	* gcc.target/mips/fpr-moves-5.c: Require mips_newabi_large_long_double
	target.
	* gcc.target/mips/fpr-moves-6.c: Likewise.

Index: gcc.target/mips/fpr-moves-5.c
===================================================================
--- gcc.target/mips/fpr-moves-5.c	(revision 149285)
+++ gcc.target/mips/fpr-moves-5.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-options "-mabi=64 -mhard-float -O2 -EL" } */
+/* { dg-require-effective-target mips_newabi_large_long_double } */
 
 NOMIPS16 void
 foo (long double d, long double *x)
Index: gcc.target/mips/fpr-moves-6.c
===================================================================
--- gcc.target/mips/fpr-moves-6.c	(revision 149285)
+++ gcc.target/mips/fpr-moves-6.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-options "-mabi=64 -mhard-float -O2 -EB" } */
+/* { dg-require-effective-target mips_newabi_large_long_double } */
 
 NOMIPS16 void
 foo (long double d, long double *x)
Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 149285)
+++ lib/target-supports.exp	(working copy)
@@ -734,6 +734,15 @@ proc check_effective_target_mips16_attri
     } [add_options_for_mips16_attribute ""]]
 }
 
+# Return 1 if the target supports long double larger than double when
+# using the new ABI, 0 otherwise.
+
+proc check_effective_target_mips_newabi_large_long_double { } {
+    return [check_no_compiler_messages mips_newabi_large_long_double object {
+	int dummy[sizeof(long double) > sizeof(double) ? 1 : -1];
+    } "-mabi=64"]
+}
+
 # Return 1 if the current multilib does not generate PIC by default.
 
 proc check_effective_target_nonpic { } {


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