2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
7 #include <machine/asm.h>
11 ENTRY(__ieee754_ilogbl)
13 /* I added the following ugly construct because ilogb(+-Inf) is
14 required to return INT_MAX in ISO C99.
15 -- jakub@redhat.com. */
16 fxam /* Is NaN or +-Inf? */
21 je 1f /* Is +-Inf, jump. */
23 je 2f /* Is +-0, jump. */
27 cfi_adjust_cfa_offset (4)
33 cfi_adjust_cfa_offset (-4)
38 movl $0x7fffffff, %eax
41 movl $0x80000000, %eax /* FP_ILOGB0 */
43 END (__ieee754_ilogbl)