Re: Please revert b2e843161d

Adrian Chadd <[email protected]> Sat, 27 Jun 2026 11:49:40 -0700
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <CAJ-VmokWyd-QEjDYiA4sz8Njfhj7N8qNo8wWXrB13cM0N8ZFng@mail.gmail.com>
[cc'ing pkubaj about this, as it started with him and landing some
ppc64le float size changes]

On Fri, 26 Jun 2026 at 10:20, Steve Kargl <[email protected]> wrote:

> My point is that a compiler will use its builtin if one is available
> in lieu of a function in libm.  One does not need to pollute the msun
> source code with "#ifdef __builtin_XXX() #else ... #endif".  It simply
> clutters comparisons to the libm code in NetBSD, OpenBSD, and Openlibm.
> I do recognize that one may need to specify a compiler option such
> as -mfma for gcc on amd64 to get a builtin.  That is due to the lack
> of an fma instruction in the original amd64 instruction set.
>
> Can you at least add a cautionary comment in the source code that
> USE_BUILTIN_FMA[F] have only been tested on arm64 and may lead to
> segfaults on other architectures?

So pkubaj@ changed the ppc64le long double from 64 -> 128 bits, and
there was a bunch of fallout from that.

See https://reviews.freebsd.org/D57388 for more information.

There's also some missing functions he's found we also need, and that
is in https://reviews.freebsd.org/D57850 .

So I/we would really like some guidance on what/where to do here.
I wonder if we would benefit from a "math" library group in reviews
so we can include that for some very targeted feedback.

Steve, would you mind helping us navigate this? I'd super duper
appreciate it!

(And if you have tests for us to run on ppc64le then please do share!)



-adrian