[PATCH 05/12] i386: Remove fmax/fmin assembly implementation
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Jan 22 17:41:42 GMT 2026
On 22/01/26 11:16, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
>> Because it never proper worked on i386 due ABI and compiler constraints [1]
>> and although we have an open bug to try fix at least the sNaN in function
>> call arguments [2], I think it is unlikely this will be ever be done.
>
> Thanks, so it's another issue with x87...
>
>> That's why I added an arch-specific implementation, it keep the current
>> semantic of just ignoring sNaN handling. I can add a proper comment about
>> these limitations.
>
> But there isn't one for other cases that have special handling for sNaN. Eg. for
> fmaxmag or any other math function that uses issignaling. And if the generic code
> produces the same (incorrect) results, why not use the generic code in all cases?
>
That was my original approach, but the generated code on i386 using
the generic implementation was really bad (compared to the arch-specific
ones) so I added these as middle ground.
But I don't have a strong preference, I think fmax and alike would not
be a hotspot in any meaningful code people are running on i386 nowadays.
I will remove them in the next version.
More information about the Libc-alpha
mailing list