Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2012 12:53:35 -0400
From:      David Schultz <das@FreeBSD.ORG>
To:        Tijl Coosemans <tijl@FreeBSD.ORG>
Cc:        svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG
Subject:   Re: svn commit: r232491 - in head/sys: amd64/include i386/include pc98/include x86/include
Message-ID:  <20120409165335.GA13177@zim.MIT.EDU>
In-Reply-To: <201203041400.q24E0WcS037398@svn.freebsd.org>
References:  <201203041400.q24E0WcS037398@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120409165335.GA13177>