qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 4/4] target-arm: Implement ARMv8 SIMD VMAXNM


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v6 4/4] target-arm: Implement ARMv8 SIMD VMAXNM and VMINNM instructions.
Date: Fri, 29 Nov 2013 15:32:16 +0000

On 28 November 2013 17:07, Will Newton <address@hidden> wrote:
> +uint32_t HELPER(neon_maxnm_f32)(uint32_t a, uint32_t b, void *fpstp)
> +{
> +    float_status *fpst = fpstp;
> +    float32 af = make_float32(a);
> +    float32 bf = make_float32(b);
> +    if (float32_is_quiet_nan(af) && !float32_is_quiet_nan(bf))
> +        return b;
> +    else if (float32_is_quiet_nan(bf) && !float32_is_quiet_nan(af))
> +        return a;
> +    return float32_val(float32_max(af, bf, fpst));
> +}
> +
> +uint32_t HELPER(neon_minnm_f32)(uint32_t a, uint32_t b, void *fpstp)
> +{
> +    float_status *fpst = fpstp;
> +    float32 af = make_float32(a);
> +    float32 bf = make_float32(b);
> +    if (float32_is_quiet_nan(af) && !float32_is_quiet_nan(bf))
> +        return b;
> +    else if (float32_is_quiet_nan(bf) && !float32_is_quiet_nan(af))
> +        return a;
> +    return float32_val(float32_min(af, bf, fpst));
> +}

Forgot to mention -- these are identical to the helpers
in patch 3. We don't need duplicates...

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]