mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
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>
This commit is contained in:
parent
00b5c7bde9
commit
5f40edb71e
1 changed files with 3 additions and 8 deletions
|
@ -2215,15 +2215,10 @@ void glue(helper_aesenclast, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s)
|
||||||
#if SHIFT == 1
|
#if SHIFT == 1
|
||||||
void glue(helper_aesimc, SUFFIX)(CPUX86State *env, Reg *d, Reg *s)
|
void glue(helper_aesimc, SUFFIX)(CPUX86State *env, Reg *d, Reg *s)
|
||||||
{
|
{
|
||||||
int i;
|
AESState *ad = (AESState *)&d->ZMM_X(0);
|
||||||
Reg tmp = *s;
|
AESState *st = (AESState *)&s->ZMM_X(0);
|
||||||
|
|
||||||
for (i = 0 ; i < 4 ; i++) {
|
aesdec_IMC(ad, st, false);
|
||||||
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]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void glue(helper_aeskeygenassist, SUFFIX)(CPUX86State *env, Reg *d, Reg *s,
|
void glue(helper_aeskeygenassist, SUFFIX)(CPUX86State *env, Reg *d, Reg *s,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue