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)
74 andl $0x80000000, %edx
79 fldl MOX(zero_nan, %eax, 1)
82 /* The result is NaN, but we must not raise an exception.
92 /* The first parameter is a NaN. Return it. */
96 /* Return NaN and raise the invalid exception. */