2 * Written by J.T. Conklin <jtc@netbsd.org>.
4 * Adapted for float type by Ulrich Drepper <drepper@cygnus.com>.
6 * Correct handling of y==-inf <drepper@gnu>
9 #include <machine/asm.h>
20 ASM_TYPE_DIRECTIVE(zero_nan,@object)
23 nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
25 .byte 0, 0, 0, 0, 0, 0, 0, 0x80
26 .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
27 ASM_SIZE_DIRECTIVE(zero_nan)
31 #define MO(op) op##@GOTOFF(%ecx)
32 #define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
35 #define MOX(op,x,f) op(,x,f)
40 ENTRY(__ieee754_scalbf)
71 addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
78 andl $0x80000000, %edx
83 fldl MOX(zero_nan, %eax, 1)
86 /* The result is NaN, but we must not raise an exception.
93 addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
98 /* The first parameter is a NaN. Return it. */
102 /* Return NaN and raise the invalid exception. */
108 END(__ieee754_scalbf)