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: [PATCH 3/4] Add ILP32 support to aarch64


Steve Ellecy wrote:
> I hadn't considered that.  So maybe I could save the environment
> (feholdexcept), do the calculation and see which exceptions, if any,
> got raised.  Then restore the original environment (fesetenv) and raise
> one or the other exceptions if needed.  Does that sound like a workable
> solution?

The fenv calls are slow on fast OoO cores so are a bad idea in fast paths.
The generic implementation may well be faster... I'm not sure where the
requirement of not raising inexact comes from (I don't see it in the definition
of lrint, and we generally don't care since inexact is set by almost every FP
calculation), but if it is absolutely required you'd special case values larger
than LONG_MAX.

Wilco

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