Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 31 May 2024 17:37:33 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: James Y Knight <jyknight@...gle.com>
Cc: musl@...ts.openwall.com,
	Nikolaos Chatzikonstantinou <nchatz314@...il.com>
Subject: Re: Re: Implementing csqrtl()

* James Y Knight <jyknight@...gle.com> [2024-05-29 11:13:12 -0400]:
> There is no impact on benchmarks by implementing fenv correctly, because,
> per the C standard, it is undefined behavior to access the floating-point
> status flags or to execute any code with non-default floating-point control
> modes in effect unless "fenv_access" is enabled -- either using "#pragma
> STDC FENV_ACCESS ON" in the code, or via an implementation-defined
> mechanism to set the default to on (in clang, the command-line option
> "-ffp-model=strict"). Because it's opt-in, only the code which actually
> requires it takes the performance hit.

note: the libc *must* opt-in if it tries to conform to c99 annex f.
(at least for library calls that are expected to work in non-default
rounding mode and math code that is specified to set exception flags.)

so fenv correctness has an impact on libc and thus on code that calls
into libc.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.