[PATCH] arm: Add ARM VFPv4 VFMA instruction support in fma/fmaf (BZ 15503)

Wilco Dijkstra Wilco.Dijkstra@arm.com
Mon Nov 3 16:01:10 GMT 2025


Hi Adhemerval/Joseph,

> I was thinking it in using as a skeleton and add the required exceptions
> handling (and not use the current soft-fp macros).  The idea is to use 
> integer operations instead of the quite complex and slow generic
> implementation that requires exception and rounding change that has
> really bad performance.

It's best to use dedicated code for this since FP emulation code is really
slow. Using dbl-64/s_fma.c instead of ldbl-128/s_fma.c gives a 2x speedup
(so I'm not sure why we have that code at all since float128 is emulated on
almost all targets...). A dedicated integer version should be another 5x faster.

Switching off rounding mode changes makes s_fmaf.c 15x faster, so again
the best solution is doing it using integer arithmetic.

Cheers,
Wilco


More information about the Libc-alpha mailing list