qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Stephen Long <steplong@quicinc.com>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, apazos@quicinc.com
Subject: Re: [PATCH] target/arm: Implement SVE2 fp multiply-add long
Date: Wed, 17 Jun 2020 21:05:45 -0700	[thread overview]
Message-ID: <76ea3eb3-4139-0268-9e5d-ccd4ee6deb1d@linaro.org> (raw)
In-Reply-To: <20200504171240.11220-1-steplong@quicinc.com>

On 5/4/20 10:12 AM, Stephen Long wrote:
> +void HELPER(sve2_fmlal_zzzw_s)(void *vd, void *vn, void *vm, void *va,
> +                               void *status, uint32_t desc)
> +{
> +    intptr_t i, opr_sz = simd_oprsz(desc);
> +    intptr_t sel1 = simd_data(desc) * sizeof(float16);
> +    for (i = 0; i < opr_sz; i += sizeof(float32)) {
> +        float16 nn_16 = *(float16 *)(vn + H1_2(i + sel1));
> +        float16 mm_16 = *(float16 *)(vm + H1_2(i + sel1));
> +
> +        float32 nn = float16_to_float32(nn_16, true, status);
> +        float32 mm = float16_to_float32(mm_16, true, status);
> +        float32 aa = *(float32 *)(va + H1_4(i));
> +        *(float32 *)(vd + H1_4(i)) = float32_muladd(nn, mm, aa, 0, status);
> +    }
> +}

This isn't quite right.  The float16 to float32 conversion cannot raise any
exceptions -- this is an exact operation.

We already have an implementation of this function in vec_helper.c --
float16_to_float32_by_bits, used by the AdvSIMD version of this same operation.

I've rearranged the helpers to match AdvSIMD, and queued the patch.


r~


      reply	other threads:[~2020-06-18  4:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 17:12 [PATCH] target/arm: Implement SVE2 fp multiply-add long Stephen Long
2020-06-18  4:05 ` Richard Henderson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76ea3eb3-4139-0268-9e5d-ccd4ee6deb1d@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=apazos@quicinc.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steplong@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).