[prev in list] [next in list] [prev in thread] [next in thread] 

List:       glibc-alpha
Subject:    [PATCH] PCC use __CPU_HAS_FSQRT in e_fsqrt 2nd try
From:       Steven Munroe <munroesj () us ! ibm ! com>
Date:       2006-04-11 22:52:33
Message-ID: 443C3331.3020507 () us ! ibm ! com
[Download RAW message or body]

Updated patch without offending ()'s


["ppc-sqrt-20060404.txt" (text/plain)]

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.  */



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic