diff options
Diffstat (limited to 'sysdeps/i386/fpu/e_scalbf.S')
-rw-r--r-- | sysdeps/i386/fpu/e_scalbf.S | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/i386/fpu/e_scalbf.S b/sysdeps/i386/fpu/e_scalbf.S index 4b5b0d07b3..d41c29327d 100644 --- a/sysdeps/i386/fpu/e_scalbf.S +++ b/sysdeps/i386/fpu/e_scalbf.S @@ -58,7 +58,7 @@ ENTRY(__ieee754_scalbf) fcomp %st(2) fnstsw sahf - jne 2f + jne 4f fscale fstp %st(1) ret @@ -77,6 +77,7 @@ ENTRY(__ieee754_scalbf) fstp %st andl $0x80000000, %edx andl $8, %eax + jnz 4f shrl $27, %edx addl %edx, %eax fldl MOX(zero_nan, %eax, 1) @@ -97,4 +98,11 @@ ENTRY(__ieee754_scalbf) /* The first parameter is a NaN. Return it. */ 3: fstp %st(1) ret + + /* Return NaN and raise the invalid exception. */ +4: fstp %st + fstp %st + fldz + fdiv %st + ret END(__ieee754_scalbf) |