[PATCH] math: Remove ldbl-128/s_fma.c

Wilco Dijkstra Wilco.Dijkstra@arm.com
Mon Nov 10 20:10:13 GMT 2025


Hi Joseph,

>> Remove ldbl-128/s_fma.c - it makes no sense to use emulated float128
>> operations to emulate FMA.  Benchmarking shows dbl-64/s_fma.c is about
>> twice as fast.
>
> Do all architectures supported by glibc with non-emulated binary128 also
> support hardware fma for binary64?  I think that's key information for
> evaluating this patch.

Emulation of 64-bit FMA applies to older architectures, and those won't
have 128-bit float hardware. In fact there are several targets which explicitly
force the faster dbl-64 version, so the slow ldbl-128 variant must have
caused issues before.

If you have native 128-bit float hardware, you definitely have 64-bit FMA
(both s390 and powerpc unconditionally set USE_FMA_BUILTIN 1).

Cheers,
Wilco


More information about the Libc-alpha mailing list