This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386: FLT_EVAL_METHOD fix
- From: Jan Hubicka <jh at suse dot cz>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Apr 2003 17:33:43 +0200
- Subject: Re: i386: FLT_EVAL_METHOD fix
- References: <Pine.LNX.4.33.0303311520170.3646-100000@wotan.suse.de>
> Hi,
>
> the below patch corrects the default value for FLT_EVAL_METHOD on x86-64.
> If SSE is in use float_t is float and double_t is double, which requires
> that this value is 0. 1 is wrong in every case.
>
> Tested on x86-64-linux, with 3.3 and HEAD. OK for both?
>
>
> Ciao,
> Michael.
> --
> * config/i386/i386.h (TARGET_FLT_EVAL_METHOD): Change 1 into 0.
>
> --- gcc/config/i386/i386.h.orig Fri Mar 14 14:13:20 2003
> +++ gcc/config/i386/i386.h Fri Mar 14 14:13:34 2003
> @@ -694,7 +694,7 @@ extern int x86_prefetch_sse;
> the rounding precision is indeterminate, since either may be chosen
> apparently at random. */
> #define TARGET_FLT_EVAL_METHOD \
> - (TARGET_MIX_SSE_I387 ? -1 : TARGET_SSE_MATH ? 1 : 2)
> + (TARGET_MIX_SSE_I387 ? -1 : TARGET_SSE_MATH ? 0 : 2)
Thanks for fixing this, however you need also to test TARGET_SSE_MATH &&
!TARGET_SSE2 and return -1 for this case too, as our behaviour is to do
float arithmetic in SSE and double in x87.
Honza
>
> #define SHORT_TYPE_SIZE 16
> #define INT_TYPE_SIZE 32