qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH RFC 1/3] target/arm: Implement SVE2 AESMC, AESIMC


From: Richard Henderson
Subject: Re: [PATCH RFC 1/3] target/arm: Implement SVE2 AESMC, AESIMC
Date: Fri, 24 Apr 2020 14:41:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

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 via email to

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