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] |

*From*: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>*To*: libc-alpha at sourceware dot org*Date*: Sun, 17 Mar 2013 19:44:13 -0300*Subject*: Re: PowerPC's math_ldbl.h*References*: <87ehg9akpn.fsf@kepler.schwinge.homeip.net> <512626E1.4090801@linux.vnet.ibm.com> <5126DF54.4020806@linux.vnet.ibm.com> <Pine.LNX.4.64.1302221545410.6146@digraph.polyomino.org.uk> <5127C2DD.4090406@linux.vnet.ibm.com> <Pine.LNX.4.64.1302222119210.10719@digraph.polyomino.org.uk> <512835E4.70108@linux.vnet.ibm.com> <Pine.LNX.4.64.1303160028510.6194@digraph.polyomino.org.uk> <5143DE75.9040605@linux.vnet.ibm.com>

On 03/15/2013 11:52 PM, Adhemerval Zanella wrote: > On 03/15/2013 09:34 PM, Joseph S. Myers wrote: >> On Sat, 23 Feb 2013, Adhemerval Zanella wrote: >> >>> Also, the big change for fpu related code selection is >>> sysdeps/powerpc/fpu now up to sysdeps/ieee754/ldlb-128ibm and >>> sysdeps/ieee754/ldlb-opt (which also made sense). This currently does >>> not change anything, because sysdeps/powerpc/fpu does not have any >>> specific implementation for long double. >> In a powerpc64 build, I see ABI test failures because sqrtl, version >> GLIBC_2.3 (the compat alias to sqrt) is no longer exported from libm. >> sysdeps/powerpc/fpu/w_sqrt.c is used, where I think >> sysdeps/ieee754/ldbl-opt/w_sqrt.c would have been used before to provide >> that compat symbol. >> >> Could you please fix this ABI failure if it was indeed caused by your >> change and, if so, review the sysdeps orderings again to identify any >> other cases of files that are now being found from a different directory >> from before that your logic above may have missed? >> >> (Note: I haven't done tests before and after your commit to confirm it's >> responsible, but it certainly looks likely to be.) >> > I believe my patch in fact uncover an issue with sysdeps/powerpc/fpu/w_sqrt.c: > different from sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c it does *not* have: > > #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) > compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); > #endif > > Which is basically what sysdeps/ieee754/ldbl-opt/w_sqrt.c does. Also, I think there > is not need to neither sysdeps/powerpc/fpu/w_sqrt.c or > ./sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c anymore: the latter was added to > inline the ISA 2.03 fsqrt instruction and math_private.h already has an inline version > that is used on math/w_sqrt.c. > > I'll recheck it tomorrow, but I'm sure we can delete both sysdeps/powerpc/fpu/w_sqrt.c > and sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c and use the default math/w_sqrt.c > instead. And the fsqrt inline optimization will be include since it is defined at > math_private.h. > > Thanks for spotting it, I usually just test build for power4+. > This patch fixes the ABI issue. I though about make a cleanup of the multiple w_sqrt version on PPC, but I add in a TODO list. Ok to apply? -- 2013-03-17 Adhemerval Zanella <azanella@linux.vnet.ibm.com> * sysdeps/powerpc/fpu/w_sqrt.c (compat_symbol): Add sqrtl compat symbol. -- diff --git a/sysdeps/powerpc/fpu/w_sqrt.c b/sysdeps/powerpc/fpu/w_sqrt.c index 2488ad9..70f28dd 100644 --- a/sysdeps/powerpc/fpu/w_sqrt.c +++ b/sysdeps/powerpc/fpu/w_sqrt.c @@ -19,6 +19,7 @@ #include <math.h> #include <math_private.h> #include <fenv_libc.h> +#include <math_ldbl_opt.h> double __sqrt (double x) /* wrapper sqrt */ @@ -42,3 +43,6 @@ weak_alias (__sqrt, sqrt) #ifdef NO_LONG_DOUBLE strong_alias (__sqrt, __sqrtl) weak_alias (__sqrt, sqrtl) #endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); +#endif -- 1.7.1

**Follow-Ups**:**Re: PowerPC's math_ldbl.h***From:*Adhemerval Zanella

**References**:**Re: PowerPC's math_ldbl.h***From:*Joseph S. Myers

**Re: PowerPC's math_ldbl.h***From:*Adhemerval Zanella

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |