|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v2 07/38] target/i386: Use aesenc_SB_SR_AK |
Date: | Mon, 19 Jun 2023 12:43:21 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 |
On 9/6/23 04:23, Richard Henderson wrote:
This implements the AESENCLAST instruction. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/i386/ops_sse.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
void glue(helper_aesenclast, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { - int i; - Reg st = *v; - Reg rk = *s; + for (int i = 0; i < SHIFT; i++) { + AESState *ad = (AESState *)&d->ZMM_X(i); + AESState *st = (AESState *)&v->ZMM_X(i); + AESState *rk = (AESState *)&s->ZMM_X(i);- for (i = 0; i < 8 << SHIFT; i++) {- d->B(i) = rk.B(i) ^ (AES_sbox[st.B(AES_shifts[i & 15] + (i & ~15))]); + aesenc_SB_SR_AK(ad, st, rk, false);
Why not use aesenc_SB_SR_AK_gen(ad, st, rk)? Regardless: Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
} }
[Prev in Thread] | Current Thread | [Next in Thread] |