Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/i386: Use aesdec_IMC
This implements the AESIMC 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 00b5c7b commit 5f40edb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions target/i386/ops_sse.h
Expand Up @@ -2215,15 +2215,10 @@ void glue(helper_aesenclast, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s)
#if SHIFT == 1
void glue(helper_aesimc, SUFFIX)(CPUX86State *env, Reg *d, Reg *s)
{
int i;
Reg tmp = *s;
AESState *ad = (AESState *)&d->ZMM_X(0);
AESState *st = (AESState *)&s->ZMM_X(0);

for (i = 0 ; i < 4 ; i++) {
d->L(i) = bswap32(AES_imc[tmp.B(4 * i + 0)][0] ^
AES_imc[tmp.B(4 * i + 1)][1] ^
AES_imc[tmp.B(4 * i + 2)][2] ^
AES_imc[tmp.B(4 * i + 3)][3]);
}
aesdec_IMC(ad, st, false);
}

void glue(helper_aeskeygenassist, SUFFIX)(CPUX86State *env, Reg *d, Reg *s,
Expand Down

0 comments on commit 5f40edb

Please sign in to comment.