NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/45310: some mixed int/float computations are wrong on mips64



On Wed, Aug 31, 2011 at 10:05:27PM +0200, Manuel Bouyer wrote:
>
> -     if (__predict_false(exp < 0 || exp - mant_dig > sizeof(UINTXX_T)*8-1))
> +     if (__predict_false(exp < 0 ||
> +         exp - (long)mant_dig > (long)sizeof(UINTXX_T)*8-1))
>               return 0;

As a complete aside to the problem being discussed, I discovered that
the __predict_false() above won't necessarily have the desired effect.

I had to change some code to (effectively):
        if (__predict_false(exp < 0) ||
            __predict_false(exp - (long)mant_dig > (long)sizeof(UINTXX_T)*8-1)))
in order to get the desired static branch prediction.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index