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 RFC 1/3] target/arm: Implement SVE2 AESMC, AESIMC
Date: Fri, 24 Apr 2020 14:41:49 -0700	[thread overview]
Message-ID: <5681d692-6c1c-fa54-1f10-1b96742f9a7e@linaro.org> (raw)
In-Reply-To: <20200423223739.31715-2-steplong@quicinc.com>

On 4/23/20 3:37 PM, Stephen Long wrote:
> +#define DO_CRYPTO_AESMC(NAME, DECRYPT)                          \
> +void HELPER(NAME)(void *vd, void *vn, uint32_t desc)            \
> +{                                                               \
> +    intptr_t i, opr_sz = simd_oprsz(desc);                      \
> +    void *d = vd, *n = vn;                                      \
> +    for (i = 0; i < opr_sz; i += 16) {                          \
> +        HELPER(crypto_aesmc)(vd + i, vn + i, DECRYPT);          \
> +    }
> +}

Better, IMO, is to add a "desc" parameter to crypto_aesmc and move the loop
there.  Then all variants of this operation use the exact same helper.  The
separate decrypt parameter would become simd_data().

Same for the other two patches in this series.


r~


  reply	other threads:[~2020-04-24 21:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 22:37 [PATCH RFC 0/3] target/arm: Implement SVE2 Crypto Extensions Stephen Long
2020-04-23 22:37 ` [PATCH RFC 1/3] target/arm: Implement SVE2 AESMC, AESIMC Stephen Long
2020-04-24 21:41   ` Richard Henderson [this message]
2020-04-23 22:37 ` [PATCH RFC 2/3] target/arm: Implement SVE2 AESE, AESD, SM4E Stephen Long
2020-04-23 22:37 ` [PATCH RFC 3/3] target/arm: Implement SVE2 SM4EKEY, RAX1 Stephen Long

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=5681d692-6c1c-fa54-1f10-1b96742f9a7e@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).