On Sat, Sep 10, 2016 at 09:47:55PM -0700, Philip Guenther wrote: > > On systems that don't have a native version, we use an implementation of > sqrtl() (square-root of long double) that -- to do its job -- pokes at the > floating-point exception state and rounding mode. In particular, at a key > point it clears any previous "inexact" exception and sets the rounding > mode to "toward zero" and then does a division. It then tests whether > that raised an "inexact" exception and fixes the result up based on that, > and finally restores the rounding mode before returning. > > The current version does that using the old, non-standard fp* routines: > fp{set,get}sticky() and fpsetround(). This diff switches it to the new, > standardized fe* routines: fe{clear,test}except() and fe{get,set}round(). > > (Why bother? The fp* routines are defined in libc, while the fe* routines > are defined inside libm itself...which means that with some symbol > redirection they can be made to call directly, without going through the > PLT. This diff is thus a prelude to the larger diff I have sitting in my > tree to do exactly that, reducing 136 PLT entries to just 22 on amd64, for > example. Even on a HW-FP-poor arch like mips64 it gets reduced from 204 > to only 56 PLT entries.) > > ok? >
looks correct to me, ok tb