Message ID | 20150727124637.GA12017@domone |
---|---|
State | New |
Headers | show |
LGTM, thanks for checking on that. On 27-07-2015 09:46, Ondřej Bílka wrote: > Hi, > > I decided to read powerpc code that according to statements only people > with good intuition could understand so I was curious what these experts > do to get good performance. > > Here its most elementary problem, it wasn't turned on. Fixing that is > obvious, add implementation to ifunc. > > * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Fix ifunc. > > diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c > index a5e1c03..3a25cf8 100644 > --- a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c > +++ b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c > @@ -24,10 +24,13 @@ > > extern __typeof (__stpcpy) __stpcpy_ppc attribute_hidden; > extern __typeof (__stpcpy) __stpcpy_power7 attribute_hidden; > +extern __typeof (__stpcpy) __stpcpy_power8 attribute_hidden; > > libc_ifunc (__stpcpy, > - (hwcap & PPC_FEATURE_HAS_VSX) > - ? __stpcpy_power7 > + (hwcap2 & PPC_FEATURE2_ARCH_2_07) > + ? __stpcpy_power8 : > + (hwcap & PPC_FEATURE_HAS_VSX) > + ? __stpcpy_power7 > : __stpcpy_ppc); > > weak_alias (__stpcpy, stpcpy) >
Ondřej Bílka <neleai@seznam.cz> writes:
> * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Fix ifunc.
LGTM.
Thanks!!
I pushed this upstream as 5011051da35a91577d262040791cbe5a868cffbd On 05-08-2015 14:39, Tulio Magno Quites Machado Filho wrote: > Ondřej Bílka <neleai@seznam.cz> writes: > >> * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Fix ifunc. > > LGTM. > > Thanks!! >
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c index a5e1c03..3a25cf8 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c +++ b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c @@ -24,10 +24,13 @@ extern __typeof (__stpcpy) __stpcpy_ppc attribute_hidden; extern __typeof (__stpcpy) __stpcpy_power7 attribute_hidden; +extern __typeof (__stpcpy) __stpcpy_power8 attribute_hidden; libc_ifunc (__stpcpy, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __stpcpy_power7 + (hwcap2 & PPC_FEATURE2_ARCH_2_07) + ? __stpcpy_power8 : + (hwcap & PPC_FEATURE_HAS_VSX) + ? __stpcpy_power7 : __stpcpy_ppc); weak_alias (__stpcpy, stpcpy)