[PATCH v3 4/6] math: Optimize float ilogb/llogb

Wilco Dijkstra Wilco.Dijkstra@arm.com
Fri May 30 14:19:22 GMT 2025


Hi Adhemerval,

> It removes the wrapper by moving the error/EDOM handling to an
> out-of-line implementation (__math_invalidf_i/__math_invalidf_li).
> Also, __glibc_unlikely is used on errors case since it helps
> code generation on recent gcc.

>  * i386 and m68k requires to use the template version, since
>    both provide __ieee754_ilogb implementatations.
>
>  * loongarch uses a custom implementation as well.
>
>   * powerpc64le also has a custom implementation for POWER9, which
>     is also used for float and float128 version.  The generic
>     e_ilogb.c implementation is moved on powerpc to keep the
>     current code as-is.

Looks good, similar to 2/6. Note the "sbunormal" typo again.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>

Cheers,
Wilco


More information about the Libc-alpha mailing list