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]

[commit, spu, testsuite] Disable complex float tests that rely on signed zeros


Hello,

a large number of complex float test cases fail on SPU due to lack of
signed zeros in the SPU single-precision floating point format.

The following patch disables those tests, similarly to other math tests
that used to fail for the same reason.

Tested on spu-elf, committed to mainline.

Bye,
Ulrich


ChangeLog:

	Disable float tests for __SPU__ targets due to lack of signed zero:
	* c-c++-common/torture/complex-sign-add.c (check_add_float).
	* c-c++-common/torture/complex-sign-sub.c (check_sub_float).
	* c-c++-common/torture/complex-sign-mul.c (check_mul_float).
	* c-c++-common/torture/complex-sign-mul-one.c (check_mul_float).
	* c-c++-common/torture/complex-sign-mul-minus-one.c (check_mul_float).
	* c-c++-common/torture/complex-sign-mixed-add.c (check_add_float).
	* c-c++-common/torture/complex-sign-mixed-sub.c (check_sub_float).
	* c-c++-common/torture/complex-sign-mixed-mul.c (check_mul_float).
	* c-c++-common/torture/complex-sign-mixed-div.c (check_div_float).

Index: gcc/testsuite/c-c++-common/torture/complex-sign-mixed-add.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-mixed-add.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-mixed-add.c	(working copy)
***************
*** 28,34 ****
--- 28,36 ----
  void
  check_add_float (void)
  {
+ #ifndef __SPU__
    CHECK_ADD (float, __builtin_copysignf, 0.0f, 0.0if);
+ #endif
  }
  
  void
Index: gcc/testsuite/c-c++-common/torture/complex-sign-mul-one.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-mul-one.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-mul-one.c	(working copy)
***************
*** 36,42 ****
--- 36,44 ----
  void
  check_mul_float (void)
  {
+ #ifndef __SPU__
    CHECK_MUL (float, __builtin_copysignf, 0.0f, 0.0if, 1.0f);
+ #endif
  }
  
  void
Index: gcc/testsuite/c-c++-common/torture/complex-sign-mixed-sub.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-mixed-sub.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-mixed-sub.c	(working copy)
***************
*** 28,34 ****
--- 28,36 ----
  void
  check_sub_float (void)
  {
+ #ifndef __SPU__
    CHECK_SUB (float, __builtin_copysignf, 0.0f, 0.0if);
+ #endif
  }
  
  void
Index: gcc/testsuite/c-c++-common/torture/complex-sign-mul.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-mul.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-mul.c	(working copy)
***************
*** 28,34 ****
--- 28,36 ----
  void
  check_mul_float (void)
  {
+ #ifndef __SPU__
    CHECK_MUL (float, __builtin_copysignf, 0.0f, 0.0if);
+ #endif
  }
  
  void
Index: gcc/testsuite/c-c++-common/torture/complex-sign-mixed-mul.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-mixed-mul.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-mixed-mul.c	(working copy)
***************
*** 28,34 ****
--- 28,36 ----
  void
  check_mul_float (void)
  {
+ #ifndef __SPU__
    CHECK_MUL (float, __builtin_copysignf, 0.0f, 0.0if);
+ #endif
  }
  
  void
Index: gcc/testsuite/c-c++-common/torture/complex-sign-mul-minus-one.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-mul-minus-one.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-mul-minus-one.c	(working copy)
***************
*** 36,42 ****
--- 36,44 ----
  void
  check_mul_float (void)
  {
+ #ifndef __SPU__
    CHECK_MUL (float, __builtin_copysignf, 0.0f, 0.0if, 1.0f);
+ #endif
  }
  
  void
Index: gcc/testsuite/c-c++-common/torture/complex-sign-mixed-div.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-mixed-div.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-mixed-div.c	(working copy)
***************
*** 20,26 ****
--- 20,28 ----
  void
  check_div_float (void)
  {
+ #ifndef __SPU__
    CHECK_DIV (float, __builtin_copysignf, 0.0f, 0.0if, 1.0f);
+ #endif
  }
  
  void
Index: gcc/testsuite/c-c++-common/torture/complex-sign-add.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-add.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-add.c	(working copy)
***************
*** 28,34 ****
--- 28,36 ----
  void
  check_add_float (void)
  {
+ #ifndef __SPU__
    CHECK_ADD (float, __builtin_copysignf, 0.0f, 0.0if);
+ #endif
  }
  
  void
Index: gcc/testsuite/c-c++-common/torture/complex-sign-sub.c
===================================================================
*** gcc/testsuite/c-c++-common/torture/complex-sign-sub.c	(revision 162222)
--- gcc/testsuite/c-c++-common/torture/complex-sign-sub.c	(working copy)
***************
*** 28,34 ****
--- 28,36 ----
  void
  check_sub_float (void)
  {
+ #ifndef __SPU__
    CHECK_SUB (float, __builtin_copysignf, 0.0f, 0.0if);
+ #endif
  }
  
  void
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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