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: [PATCH] Fix real_maxval for IBM long double (PR target/36904)


On Mon, Sep 01, 2008 at 02:20:13PM -0400, Jakub Jelinek wrote:
> --- gcc/real.c.jj	2008-08-19 14:20:31.000000000 +0200
> +++ gcc/real.c	2008-09-01 19:15:51.000000000 +0200
> @@ -2417,7 +2417,7 @@ real_maxval (REAL_VALUE_TYPE *r, int sig
>  	   required to be the value of the long double rounded to the
>  	   nearest double.  Rounding means we need a slightly smaller
>  	   value for LDBL_MAX.  */
> -        clear_significand_bit (r, SIGNIFICAND_BITS - fmt->pnan);
> +	clear_significand_bit (r, SIGNIFICAND_BITS - fmt->pnan - 1);
>      }
>  }

This looks good to me.  If I can count bits properly, it is even the
correct bit.  :)

-- 
Alan Modra
Australia Development Lab, IBM


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