[PATCH, libquadmath]: Use built-in functions instead of fabsq, copysignq and nanq.

Joseph Myers joseph@codesourcery.com
Tue Jun 14 11:12:00 GMT 2016


On Tue, 14 Jun 2016, Jakub Jelinek wrote:

> Couldn't you instead add into a header inline functions or macros
> that map fabsq to __builtin_fabsq etc.?  Then you could keep the *.c
> files as is.
> What I don't really like on the patch is that it diverges too much from the
> original libc sources (other than replacing suffixes of functions and
> changing types).

Cf. my point that for signbit such a header should do

#undef signbit
#define signbit(x) __builtin_signbit (x)

and likewise for fpclassify, isfinite, isnormal, isnan, isinf.  That way, 
the code can be made *closer* to current glibc sources (libquadmath was 
last updated from glibc in Nov 2012) - current sources now use those 
type-generic macros directly, where previously they called functions such 
as __signbitl, __isinfl etc. (and where libquadmath changed those into 
calls to signbitq etc.).

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list