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 v2] target/arm: Implement SVE2 FMMLA
Date: Wed, 22 Apr 2020 09:42:04 -0700 [thread overview]
Message-ID: <399f890b-8265-2a82-f9de-ab1d7b95f6cc@linaro.org> (raw)
In-Reply-To: <20200422141516.7977-1-steplong@quicinc.com>
On 4/22/20 7:15 AM, Stephen Long wrote:
> Signed-off-by: Stephen Long <steplong@quicinc.com>
>
> I'm guessing endianness doesn't matter because we are writing to the
> corresponding 32-bit/64-bit in the destination register.
> ---
> target/arm/cpu.h | 10 +++++++++
> target/arm/helper-sve.h | 3 +++
> target/arm/sve.decode | 4 ++++
> target/arm/sve_helper.c | 44 ++++++++++++++++++++++++++++++++++++++
> target/arm/translate-sve.c | 29 +++++++++++++++++++++++++
> 5 files changed, 90 insertions(+)
Endianness does matter for 32-bit, as we are writing into a host-endian 64-bit
quantity. I was being over-brief in my earlier reply.
> + TYPE p0, p1, results[4]; \
> + \
> + /* i = 0, j = 0 */ \
> + p0 = MUL(n00, m00, status); \
> + p1 = MUL(n01, m01, status); \
> + results[0] = ADD(a[0], ADD(p0, p1, status), status); \
> + \
> + /* i = 0, j = 1 */ \
> + p0 = MUL(n00, m10, status); \
> + p1 = MUL(n01, m11, status); \
> + results[1] = ADD(a[1], ADD(p0, p1, status), status); \
> + \
> + /* i = 1, j = 0 */ \
> + p0 = MUL(n10, m00, status); \
> + p1 = MUL(n11, m01, status); \
> + results[2] = ADD(a[2], ADD(p0, p1, status), status); \
> + \
> + /* i = 1, j = 1 */ \
> + p0 = MUL(n10, m10, status); \
> + p1 = MUL(n11, m11, status); \
> + results[3] = ADD(a[3], ADD(p0, p1, status), status); \
> + \
> + memcpy(d, results, sizeof(TYPE) * 4); \
There's no need for the result array -- we have already read the inputs, so we
can write back the result straight away.
r~
prev parent reply other threads:[~2020-04-22 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 14:15 [PATCH v2] target/arm: Implement SVE2 FMMLA Stephen Long
2020-04-22 16:42 ` 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=399f890b-8265-2a82-f9de-ab1d7b95f6cc@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).