This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

[PATCH] PCC use __CPU_HAS_FSQRT in e_fsqrt 2nd try


Updated patch without offending ()'s

2006-04-07  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/fpu/bits/mathinline.h
	[__WORDSIZE == 64 || _ARCH_PWR4]: Define __CPU_HAS_FSQRT.
	(__ieee754_sqrt): Fix comment.
	(__ieee754_sqrtf): Fix comment.

	* sysdeps/powerpc/fpu/e_sqrt.c (__ieee754_sqrt): Fix comment.
	Check __CPU_HAS_FSQRT instead of dl_hwcap.
	* sysdeps/powerpc/fpu/e_sqrtf.c (__ieee754_sqrtf): Fix comment.
	Check __CPU_HAS_FSQRT instead of dl_hwcap.

diff -urN libc24-cvstip-20060406/sysdeps/powerpc/fpu/bits/mathinline.h libc24/sysdeps/powerpc/fpu/bits/mathinline.h
--- libc24-cvstip-20060406/sysdeps/powerpc/fpu/bits/mathinline.h	2006-01-21 13:40:59.000000000 -0600
+++ libc24/sysdeps/powerpc/fpu/bits/mathinline.h	2006-04-07 16:25:33.913017504 -0500
@@ -129,7 +129,7 @@
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
 
-# if __WORDSIZE == 64
+# if __WORDSIZE == 64 || defined _ARCH_PWR4
 #  define __CPU_HAS_FSQRT 1
 # else
 #  define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
@@ -141,7 +141,7 @@
 {
   double __z;
 
-  /* If the CPU is 64-bit we can use the optional FP instructions we.  */
+  /* If the CPU is 64-bit we can use the optional FP instructions.  */
   if (__CPU_HAS_FSQRT)
   {
     /* Volatile is required to prevent the compiler from moving the
@@ -163,7 +163,7 @@
 {
   float __z;
 
-  /* If the CPU is 64-bit we can use the optional FP instructions we.  */
+  /* If the CPU is 64-bit we can use the optional FP instructions.  */
   if (__CPU_HAS_FSQRT)
   {
     /* Volatile is required to prevent the compiler from moving the
diff -urN libc24-cvstip-20060406/sysdeps/powerpc/fpu/e_sqrt.c libc24/sysdeps/powerpc/fpu/e_sqrt.c
--- libc24-cvstip-20060406/sysdeps/powerpc/fpu/e_sqrt.c	2005-11-17 17:33:52.000000000 -0600
+++ libc24/sysdeps/powerpc/fpu/e_sqrt.c	2006-04-07 16:25:57.727990208 -0500
@@ -169,8 +169,8 @@
 {
   double z;
 
-  /* If the CPU is 64-bit we can use the optional FP instructions we.  */
-  if ((GLRO (dl_hwcap) & PPC_FEATURE_64) != 0)
+  /* If the CPU is 64-bit we can use the optional FP instructions.  */
+  if (__CPU_HAS_FSQRT)
     {
       /* Volatile is required to prevent the compiler from moving the 
          fsqrt instruction above the branch.  */
diff -urN libc24-cvstip-20060406/sysdeps/powerpc/fpu/e_sqrtf.c libc24/sysdeps/powerpc/fpu/e_sqrtf.c
--- libc24-cvstip-20060406/sysdeps/powerpc/fpu/e_sqrtf.c	2005-11-17 17:33:52.000000000 -0600
+++ libc24/sysdeps/powerpc/fpu/e_sqrtf.c	2006-04-07 16:26:22.424963608 -0500
@@ -146,8 +146,8 @@
 {
   double z;
 
-  /* If the CPU is 64-bit we can use the optional FP instructions we.  */
-  if ((GLRO (dl_hwcap) & PPC_FEATURE_64) != 0)
+  /* If the CPU is 64-bit we can use the optional FP instructions.  */
+  if (__CPU_HAS_FSQRT)
     {
       /* Volatile is required to prevent the compiler from moving the 
          fsqrt instruction above the branch.  */

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