On 18 April 2011 22:00, Aurelien Jarno <aurel...@aurel32.net> wrote:
> +++ b/target-i386/op_helper.c
> @@ -3440,9 +3440,10 @@ static void fpu_set_exception(int mask)
>
>  static inline CPU86_LDouble helper_fdiv(CPU86_LDouble a, CPU86_LDouble b)
>  {
> -    if (b == 0.0)
> +    if (floatx_is_zero(b)) {
>         fpu_set_exception(FPUS_ZE);
> -    return a / b;
> +    }
> +    return floatx_div(a, b, &env->fp_status);
>  }

When we get rid of softfloat-native we should be able to just
use softfloat's flag-raising code and get rid of this special
case of zero, right?

Reviewed-by: Peter Maydell <peter.mayd...@linaro.org>

-- PMM

Reply via email to