diff options
Diffstat (limited to 'sysdeps/x86_64/fpu')
-rw-r--r-- | sysdeps/x86_64/fpu/e_ilogbl.S (renamed from sysdeps/x86_64/fpu/s_ilogbl.S) | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sysdeps/x86_64/fpu/s_ilogbl.S b/sysdeps/x86_64/fpu/e_ilogbl.S index f59040c11e..44f92159a8 100644 --- a/sysdeps/x86_64/fpu/s_ilogbl.S +++ b/sysdeps/x86_64/fpu/e_ilogbl.S @@ -7,7 +7,7 @@ #include <machine/asm.h> -ENTRY(__ilogbl) +ENTRY(__ieee754_ilogbl) fldt 8(%rsp) /* I added the following ugly construct because ilogb(+-Inf) is required to return INT_MAX in ISO C99. @@ -18,6 +18,8 @@ ENTRY(__ilogbl) andb %ah, %dh cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ + cmpb $0x40, %dh + je 2f /* Is +-Inf, jump. */ fxtract fstp %st @@ -31,5 +33,8 @@ ENTRY(__ilogbl) 1: fstp %st movl $0x7fffffff, %eax ret -END (__ilogbl) -weak_alias (__ilogbl, ilogbl) +2: fstp %st + movl $0x80000000, %eax /* FP_ILOGB0 */ + ret +END (__ieee754_ilogbl) +weak_alias (__ieee754_ilogbl, __ilogbl_finite) |