Skip to content

Commit

Permalink
target/i386: Use aesdec_ISB_ISR_AK
Browse files Browse the repository at this point in the history
This implements the AESDECLAST instruction.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Jul 8, 2023
1 parent cc648f5 commit 00b5c7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions target/i386/ops_sse.h
Original file line number Diff line number Diff line change
Expand Up @@ -2177,12 +2177,12 @@ void glue(helper_aesdec, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s)

void glue(helper_aesdeclast, 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_isbox[st.B(AES_ishifts[i & 15] + (i & ~15))]);
aesdec_ISB_ISR_AK(ad, st, rk, false);
}
}

Expand Down

0 comments on commit 00b5c7b

Please sign in to comment.