[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 12/37] target/i386: Use aesdec_ISB_ISR_AK
From: |
Richard Henderson |
Subject: |
[PATCH v3 12/37] target/i386: Use aesdec_ISB_ISR_AK |
Date: |
Tue, 20 Jun 2023 13:07:33 +0200 |
This implements the AESDECLAST instruction.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/ops_sse.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h
index 63fdecbe03..0a37bde595 100644
--- a/target/i386/ops_sse.h
+++ b/target/i386/ops_sse.h
@@ -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);
}
}
--
2.34.1
- [PATCH v3 04/37] crypto/aes: Add constants for ShiftRows, InvShiftRows, (continued)
- [PATCH v3 04/37] crypto/aes: Add constants for ShiftRows, InvShiftRows, Richard Henderson, 2023/06/20
- [PATCH v3 06/37] target/i386: Use aesenc_SB_SR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 05/37] crypto: Add aesenc_SB_SR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 07/37] target/arm: Demultiplex AESE and AESMC, Richard Henderson, 2023/06/20
- [PATCH v3 09/37] target/ppc: Use aesenc_SB_SR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 08/37] target/arm: Use aesenc_SB_SR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 10/37] target/riscv: Use aesenc_SB_SR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 11/37] crypto: Add aesdec_ISB_ISR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 12/37] target/i386: Use aesdec_ISB_ISR_AK,
Richard Henderson <=
- [PATCH v3 13/37] target/arm: Use aesdec_ISB_ISR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 15/37] target/riscv: Use aesdec_ISB_ISR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 16/37] crypto: Add aesenc_MC, Richard Henderson, 2023/06/20
- [PATCH v3 14/37] target/ppc: Use aesdec_ISB_ISR_AK, Richard Henderson, 2023/06/20
- [PATCH v3 18/37] crypto: Add aesdec_IMC, Richard Henderson, 2023/06/20
- [PATCH v3 19/37] target/i386: Use aesdec_IMC, Richard Henderson, 2023/06/20
- [PATCH v3 17/37] target/arm: Use aesenc_MC, Richard Henderson, 2023/06/20
- [PATCH v3 21/37] target/riscv: Use aesdec_IMC, Richard Henderson, 2023/06/20