Re: [PATCH 0/3] ARM with only 32-bit floats do not have fast 64-bit FMA
Corinna Vinschen via Newlib <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Hi Szabolcs, ok to push? Thanks, Corinna On Aug 8 15:34, Keith Packard via Newlib wrote: > I added some new test configurations to my CI system for picolibc and > discovered that when the new math code was built on 32-bit ARM > processors with only single-precision floating hardware, several math > functions were returning imprecise results. I got the expected results > on processors with no FPU and on processors with both 32- and 64- bit > FPUs. > > I discovered that the affected functions were using the 'fma' function > on this hardware, even though (lacking 64-bit HW support), that > function was being emulated without the required precision. > > This all boiled down to math_config.h incorrectly detecting 64-bit FMA > support on ARM processors. > > This patch series contains three changes: > > 1. fix the fast FMA process so that 32-bit ARM processors without 64-bit FMA > support don't use 'fma' for the new math functions > > 2. Add detection of fast FMAF, which 32-bit ARM processors with only > 32-bit FPUs *do* support. > > 3. Add ARM versions of fma and fmaf which are used when those > instructions are available. > -- Corinna Vinschen Cygwin Maintainer Red Hat