[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 21/37] target/i386: Use aesdec_IMC
From: |
Richard Henderson |
Subject: |
[PATCH v4 21/37] target/i386: Use aesdec_IMC |
Date: |
Mon, 3 Jul 2023 12:05:04 +0200 |
This implements the AESIMC instruction.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/ops_sse.h | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h
index 0a37bde595..893913ebf8 100644
--- a/target/i386/ops_sse.h
+++ b/target/i386/ops_sse.h
@@ -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,
--
2.34.1
- Re: [PATCH v4 17/37] target/ppc: Use aesenc_SB_SR_MC_AK, (continued)
- [PATCH v4 19/37] target/i386: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/03
- [PATCH v4 15/37] target/ppc: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/03
- [PATCH v4 10/37] crypto: Add aesdec_ISB_ISR_IMC_AK, Richard Henderson, 2023/07/03
- [PATCH v4 02/37] tests/multiarch: Add test-aes, Richard Henderson, 2023/07/03
- [PATCH v4 14/37] host/include/ppc: Implement aes-round.h, Richard Henderson, 2023/07/03
- [PATCH v4 07/37] crypto: Add aesenc_MC, Richard Henderson, 2023/07/03
- [PATCH v4 05/37] crypto: Add aesenc_SB_SR_AK, Richard Henderson, 2023/07/03
- [PATCH v4 21/37] target/i386: Use aesdec_IMC,
Richard Henderson <=
- [PATCH v4 22/37] target/i386: Use aesenc_SB_SR_MC_AK, Richard Henderson, 2023/07/03
- [PATCH v4 03/37] target/arm: Move aesmc and aesimc tables to crypto/aes.c, Richard Henderson, 2023/07/03
- [PATCH v4 18/37] target/ppc: Use aesdec_ISB_ISR_AK_IMC, Richard Henderson, 2023/07/03
- [PATCH v4 11/37] crypto: Add aesdec_ISB_ISR_AK_IMC, Richard Henderson, 2023/07/03
- [PATCH v4 12/37] host/include/i386: Implement aes-round.h, Richard Henderson, 2023/07/03
- [PATCH v4 20/37] target/i386: Use aesdec_ISB_ISR_AK, Richard Henderson, 2023/07/03
- [PATCH v4 24/37] target/arm: Demultiplex AESE and AESMC, Richard Henderson, 2023/07/03
- [PATCH v4 25/37] target/arm: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/03