Hi Corinna, > I pushed this patch: > > https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=29ba52da9553 > > Please test the latest developer snapshot from https://cygwin.com/snapshots/
I can't test it easily. But the code looks good; only the comments could be improved; patch attached. Bruno
diff --git a/winsup/cygwin/math/ilogbl.S b/winsup/cygwin/math/ilogbl.S index a4fe503..e4a2660 100644 --- a/winsup/cygwin/math/ilogbl.S +++ b/winsup/cygwin/math/ilogbl.S @@ -17,14 +17,14 @@ __MINGW_USYMBOL(ilogbl): #ifdef __x86_64__ fldt (%rcx) - fxam /* Is NaN or +-Inf? */ + fxam /* Is NaN or +-Inf or +-0? */ fstsw %ax movb $0x45, %dh andb %ah, %dh cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ cmpb $0x40, %dh - je 2f /* Is +-Inf, jump. */ + je 2f /* Is +-0, jump. */ fxtract pushq %rax @@ -47,14 +47,14 @@ __MINGW_USYMBOL(ilogbl): /* I added the following ugly construct because ilogb(+-Inf) is required to return INT_MAX in ISO C99. -- ja...@redhat.com. */ - fxam /* Is NaN or +-Inf? */ + fxam /* Is NaN or +-Inf or +-0? */ fstsw %ax movb $0x45, %dh andb %ah, %dh cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ cmpb $0x40, %dh - je 2f /* Is +-Inf, jump. */ + je 2f /* Is +-0, jump. */ fxtract pushl %eax
-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple