[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/35] target/i386: Use aesdec_ISB_ISR
From: |
Richard Henderson |
Subject: |
[PATCH 11/35] target/i386: Use aesdec_ISB_ISR |
Date: |
Fri, 2 Jun 2023 19:34:02 -0700 |
This implements the AESDECLAST instruction.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/ops_sse.h | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h
index 31e1f6edc7..036eabdf95 100644
--- a/target/i386/ops_sse.h
+++ b/target/i386/ops_sse.h
@@ -2177,12 +2177,14 @@ 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);
+ AESState t;
- 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(&t, st, false);
+ ad->v = t.v ^ rk->v;
}
}
--
2.34.1
- [PATCH 03/35] crypto/aes: Add constants for ShiftRows, InvShiftRows, (continued)
- [PATCH 03/35] crypto/aes: Add constants for ShiftRows, InvShiftRows, Richard Henderson, 2023/06/02
- [PATCH 05/35] target/i386: Use aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 06/35] target/arm: Demultiplex AESE and AESMC, Richard Henderson, 2023/06/02
- [PATCH 07/35] target/arm: Use aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 10/35] crypto: Add aesdec_ISB_ISR, Richard Henderson, 2023/06/02
- [PATCH 08/35] target/ppc: Use aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 12/35] target/arm: Use aesdec_ISB_ISR, Richard Henderson, 2023/06/02
- [PATCH 09/35] target/riscv: Use aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 11/35] target/i386: Use aesdec_ISB_ISR,
Richard Henderson <=
- [PATCH 13/35] target/ppc: Use aesdec_ISB_ISR, Richard Henderson, 2023/06/02
- [PATCH 17/35] crypto: Add aesdec_IMC, Richard Henderson, 2023/06/02
- [PATCH 21/35] crypto: Add aesenc_SB_SR_MC_AK, Richard Henderson, 2023/06/02
- [PATCH 23/35] target/ppc: Use aesenc_SB_SR_MC_AK, Richard Henderson, 2023/06/02
- [PATCH 24/35] target/riscv: Use aesenc_SB_SR_MC_AK, Richard Henderson, 2023/06/02
- [PATCH 26/35] target/i386: Use aesdec_ISB_ISR_IMC_AK, Richard Henderson, 2023/06/02
- [PATCH 25/35] crypto: Add aesdec_ISB_ISR_IMC_AK, Richard Henderson, 2023/06/02
- [PATCH 14/35] target/riscv: Use aesdec_ISB_ISR, Richard Henderson, 2023/06/02
- [PATCH 27/35] target/riscv: Use aesdec_ISB_ISR_IMC_AK, Richard Henderson, 2023/06/02
- [PATCH 30/35] host/include/i386: Implement aes-round.h, Richard Henderson, 2023/06/02