powerpc64le: ifunc select *f128 routines in multiarch mode
commit33fc34521de970153344cfe1bfa9ce6da7a6efea
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Tue, 7 Apr 2020 21:20:55 +0000 (7 16:20 -0500)
committerPaul E. Murphy <murphyp@linux.ibm.com>
Mon, 30 Nov 2020 15:56:14 +0000 (30 09:56 -0600)
treee327104762da05a3354a89a35122fe26bdb8c439
parentcc5d5852c65eddf92368b0845e1374bd443316e7
powerpc64le: ifunc select *f128 routines in multiarch mode

Programatically generate simple wrappers for interesting libm *f128
objects.  Selected functions are transcendental functions or
those with trivial compiler builtins.  This can result in a 2-3x
speedup (e.g logf128 and expf128).

A second set of implementation files are generated which include
the first implementation encountered along the search path.  This
usually works, except when a wrapper is overriden and makefile
search order slightly diverges from include order.  Likewise,
wrapper object files are created for each generated file.  These
hold the ifunc selection routines which export ABI.

Next, several shared headers are intercepted to control renaming of
asm function redirects are used first, and sometimes macro renames
if the former is impractical.

Notably, if the request machine supports hardware IEEE128 (i.e POWER9
and newer) this ifunc machinery is disabled.  Likewise existing
ifunc support for float128 is consolidated into this (e.g sqrtf128
and fmaf128).

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
16 files changed:
sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile
sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-macros.h [new file with mode: 0644]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-redirect-macros.h [new file with mode: 0644]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-redirects-mp.h [new file with mode: 0644]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc-redirects.h [new file with mode: 0644]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128-ifunc.h [new file with mode: 0644]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/float128_private.h [new file with mode: 0644]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/math-type-macros-float128.h [new file with mode: 0644]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/math_private.h [new file with mode: 0644]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c [deleted file]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c [deleted file]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128.c [deleted file]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/w_sqrtf128-power9.c [deleted file]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/w_sqrtf128-ppc64le.c [deleted file]
sysdeps/powerpc/powerpc64/le/fpu/multiarch/w_sqrtf128.c [deleted file]
sysdeps/powerpc/powerpc64/le/power9/Makeconfig [new file with mode: 0644]