Proposal: Remove or reduce math-finite.h

Steve Ellcey sellcey@marvell.com
Thu Mar 21 16:18:00 GMT 2019


On Thu, 2019-03-21 at 15:49 +0000, Wilco Dijkstra wrote:
> Hi,
> 
> Note that removing math-finite.h has no effect inside GLIBC itself -
> internal math calls use wrappers which continue to be used.
> 
> Only external C/C++ code would be affected. Since all commonly
> used functions already have their wrappers removed, this won't have
> any effect on performance. Any other functions deemed performance
> critical can have their wrappers merged on an as needed basis.
> 
> So I don't see any point going for something half-way which only
> increases complexity further. Removing it (and all other odd math
> inlines) is the right way forward - and long overdue.
> 
> Wilco

I ran build-many-glibcs.py to build all of the glibs that are defined
to build by that script and excluding csky which failed to build (PR
24371), here are the places where the pow, powf, log, logf, log2,
log2f, exp, expf, exp2, and exp2f are not aliases of the _finite
version of the matching routine.

i486/i586/i686
        On these platforms pow, log, log2, exp, and exp2 are not
	aliases of the finite versions.
x86_64
        On these platforms pow_finite, log_finite, and exp_finite are
        IFUNCs but the non-finite versions of those routines are
	regular functions.
m68k
        On this platform none of the functions are aliases.
powerpc
        On this platform ONLY expf and __expf_finite are not aliases.


Steve Ellcey
sellcey@marvell.com


More information about the Libc-alpha mailing list