[ColdFire 58/63] XFAIL mul-subnormal-single-1 for ColdFire FPUs

Richard Sandiford richard@codesourcery.com
Wed Jan 10 12:19:00 GMT 2007


gcc.c-torture/execute/ieee/mul-subnormal-single-1.c tests subnormal
support, which must be handled by software emulation when using a
ColdFire FPU.  The linux kernel does not yet support this.

Richard


gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_coldfire_fpu): New
	procedure.
	* gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: XFAIL on
	m68k targets if check_effective_target_coldfire_fpu returns true.

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	2007-01-09 13:18:10.000000000 +0000
+++ gcc/testsuite/lib/target-supports.exp	2007-01-09 15:02:31.000000000 +0000
@@ -1989,6 +1989,16 @@ proc check_effective_target_sync_char_sh
     return $et_sync_char_short_saved
 }
 
+# Return 1 if the target uses a ColdFire FPU.
+
+proc check_effective_target_coldfire_fpu { } {
+    return [check_no_compiler_messages coldfire_fpu assembly {
+	#ifndef __mcffpu__
+	#error FOO
+	#endif
+    }]
+}
+
 # Return 1 if the target matches the effective target 'arg', 0 otherwise.
 # This can be used with any check_* proc that takes no argument and
 # returns only 1 or 0.  It could be used with check_* procs that take
Index: gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x	2007-01-09 13:18:10.000000000 +0000
+++ gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x	2007-01-09 15:02:31.000000000 +0000
@@ -3,4 +3,9 @@ if [istarget "mips-sgi-irix6*"] {
     # isn't expected to work for n32 and n64 on MIPS IV targets.
     return 1
 }
+if {[istarget "m68k-*-linux-gnu*"] && [check_effective_target_coldfire_fpu]} {
+    # ColdFire FPUs require software handling of subnormals.  Linux does
+    # not yet have this.
+    set torture_execute_xfail "m68k-*-linux-gnu*"
+}
 return 0



More information about the Gcc-patches mailing list