This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: i386: FLT_EVAL_METHOD fix


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]