2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
4 * Adapted for x86-64 by Andreas Jaeger <aj@suse.de>.
8 #include <machine/asm.h>
10 ENTRY(__ieee754_ilogbl)
12 /* I added the following ugly construct because ilogb(+-Inf) is
13 required to return INT_MAX in ISO C99.
14 -- jakub@redhat.com. */
15 fxam /* Is NaN or +-Inf? */
20 je 1f /* Is +-Inf, jump. */
22 je 2f /* Is +-Inf, jump. */
34 movl $0x7fffffff, %eax
37 movl $0x80000000, %eax /* FP_ILOGB0 */
39 END (__ieee754_ilogbl)