[PATCH 4/4] powerpc64le: ifunc (almost) all *f128 routines in multiarch mode
Joseph Myers
joseph@codesourcery.com
Tue May 5 00:07:37 GMT 2020
On Mon, 4 May 2020, Paul E. Murphy via Libc-alpha wrote:
> A set of additional headers are included which primarily rely
> on asm redirects to rename, and less frequently macro renames
> where an asm redirect is not possible. These intercept several
> common headers to install redirect and disable macros at specific
> times. This works surprisingly well. Notably, some ugliness
> occurs when header inclusion must be coerced at certain times
> before turning off aliasing and plt bypass wrappers.
>
> Notably, the only special case is s_significandf128.c. It is
> doubly special as exists to support ldouble redirects, and
> exposes subtle difference between makefile rules and search path
> orders. Commentary is inlined.
>
> Admittedly, this makes shared maintenance a tiny bit more
> difficult, but lays groundwork for supporting more optimized
> float128 routines which very overtly assume a soft-fp runtime.
> Changes to internal float128 API should fail at compile time,
> thus build-many-glibcs.py should readily catch any divergence.
Please ensure that every new macro (F128_MP_REDIR_R, F128_MP_REDIR,
F128_C_REDIR, F128_TRIG_REDIR, etc.) has a detailed comment explaining its
semantics and when it should be used.
Some detailed documentation is also needed, in a checked-in file, maybe
sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile, not just in a commit
message, of the overall design of this ifunc system. That documentation
needs to make clear what the rules are that determine, for any new libm
function (so no compat symbols involved), exactly what redirects etc.
should be present in what files for this ifunc system to work correctly
for that function.
> +# Only enable this for generic (P8 or older) multiarch builds
> +ifeq ($(cflags-cpu),"")
> +do_f128_multiarch = yes
Although not a requirement for this patch, I'd like to remind people that
--with-cpu= (which sets cflags-cpu) is an obsolescent way of configuring
CPU optimizations and automatic detection of the CPU selected by $CC
$CFLAGS $CPPFLAGS is preferred. See
<https://sourceware.org/legacy-ml/libc-alpha/2017-02/msg00154.html> for a
previous submission of a patch (needing revision) to start moving powerpc
to the preferred system.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list