This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix fmod for subnormals (bug 14048)


From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Mon, 28 May 2012 23:53:43 +0000 (UTC)

> (I'd think all these fmod/fmodf/fmodl implementations would be better
> using __builtin_clz / __builtin_clzll to find the exponents of
> subnormals, but such an optimization is a separate issue and probably
> shouldn't be backported to 2.15.)

I notice this kind of scheme used in the soft-fp code too.

However, this generates terrible code on sparc which lacks any kind of
clz instructions until very recently.  It's mainly calls to libgcc and
C implementations unless you explicitly compile targetting very recent
cpus.

In these cases where I see it used, some knowledge of the input data
could be used to speed things up compared to what the clz builtins
ends up doing.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]