svn commit: r232491 - in head/sys: amd64/include i386/include pc98/include x86/include

David Schultz das at FreeBSD.ORG
Mon Apr 9 16:53:42 UTC 2012


On Sun, Mar 04, 2012, Tijl Coosemans wrote:
> Log:
>   Copy amd64 float.h to x86 and merge with i386 float.h. Replace
>   amd64/i386/pc98 float.h with stubs.
[...]
> --- head/sys/amd64/include/float.h	Sun Mar  4 12:52:48 2012	(r232490, copy source)
> +++ head/sys/x86/include/float.h	Sun Mar  4 14:00:32 2012	(r232491)
> @@ -42,7 +42,11 @@ __END_DECLS
>  #define FLT_RADIX	2		/* b */
>  #define FLT_ROUNDS	__flt_rounds()
>  #if __ISO_C_VISIBLE >= 1999
> +#ifdef _LP64
>  #define	FLT_EVAL_METHOD	0		/* no promotions */
> +#else
> +#define	FLT_EVAL_METHOD	(-1)		/* i387 semantics are...interesting */
> +#endif
>  #define	DECIMAL_DIG	21		/* max precision in decimal digits */
>  #endif

The implication of this code is that FLT_EVAL_METHOD depends on
the size of a long, which it does not.  Instead, it depends on
whether SSE2 support is guaranteed to be present.  If anything,
the test should be something like #ifndef __i386__.

By the way, the #defines for single- and double-precision are
effectively MI and should be in, e.g., ieee754_float.h.  I can
send some old patches to that effect if someone wants to clean
them up and commit them.


More information about the svn-src-all mailing list