[PATCH] PowerPC - logb/ilogb optimization for POWER7

Joseph S. Myers joseph@codesourcery.com
Tue Apr 10 16:03:00 GMT 2012


On Tue, 10 Apr 2012, Adhemerval Zanella wrote:

> +#if defined TEST_FLOAT
> +  TEST_f_i (ilogb, 1.701412e+38, 127);
> +#endif

This appears to be correct for all floating-point formats, so should not 
have the #if conditional at all.

> +#if defined TEST_DOUBLE
> +  TEST_f_i (ilogb, 8.988466e+307, 1023);
> +#endif

And this should be #ifndef TEST_FLOAT (it's applicable to all long double 
formats as well as double).

Do these optimized versions raise exceptions as specified by current 
POSIX?  If not, then when bug 6794 is fixed (and associated testcases 
added / existing tests made stricter about what exceptions are raised) 
they will need to be fixed as well....

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list