2 * Written by J.T. Conklin <jtc@netbsd.org>.
5 * Correct handling of y==-inf <drepper@gnu>
8 #include <machine/asm.h>
10 RCSID("$NetBSD: e_scalb.S,v 1.4 1995/05/08 23:49:52 jtc Exp $")
19 ASM_TYPE_DIRECTIVE(zero_nan,@object)
22 nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
24 .byte 0, 0, 0, 0, 0, 0, 0, 0x80
25 .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
26 ASM_SIZE_DIRECTIVE(zero_nan)
30 #define MO(op) op##@GOTOFF(%ecx)
31 #define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
34 #define MOX(op,x,f) op(,x,f)
38 ENTRY(__ieee754_scalb)
69 addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
76 andl $0x80000000, %edx
81 fldl MOX(zero_nan, %eax, 1)
84 /* The result is NaN, but we must not raise an exception.
91 addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
96 /* The first parameter is a NaN. Return it. */
100 /* Return NaN and raise the invalid exception. */