[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/35] target/ppc: Use aesdec_ISB_ISR
From: |
Richard Henderson |
Subject: |
[PATCH 13/35] target/ppc: Use aesdec_ISB_ISR |
Date: |
Fri, 2 Jun 2023 19:34:04 -0700 |
This implements the VNCIPHERLAST instruction.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/ppc/int_helper.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
index b49e17685b..444beb1779 100644
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -2979,13 +2979,13 @@ void helper_vncipher(ppc_avr_t *r, ppc_avr_t *a,
ppc_avr_t *b)
void helper_vncipherlast(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
{
- ppc_avr_t result;
- int i;
+ AESState *ad = (AESState *)r;
+ AESState *st = (AESState *)a;
+ AESState *rk = (AESState *)b;
+ AESState t;
- VECTOR_FOR_INORDER_I(i, u8) {
- result.VsrB(i) = b->VsrB(i) ^ (AES_isbox[a->VsrB(AES_ishifts[i])]);
- }
- *r = result;
+ aesdec_ISB_ISR(&t, st, true);
+ ad->v = t.v ^ rk->v;
}
void helper_vshasigmaw(ppc_avr_t *r, ppc_avr_t *a, uint32_t st_six)
--
2.34.1
- Re: [PATCH 02/35] target/arm: Move aesmc and aesimc tables to crypto/aes.c, (continued)
- [PATCH 03/35] crypto/aes: Add constants for ShiftRows, InvShiftRows, Richard Henderson, 2023/06/02
- [PATCH 04/35] crypto: Add aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 07/35] target/arm: Use aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 08/35] target/ppc: Use aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 06/35] target/arm: Demultiplex AESE and AESMC, Richard Henderson, 2023/06/02
- [PATCH 13/35] target/ppc: Use aesdec_ISB_ISR,
Richard Henderson <=
- [PATCH 09/35] target/riscv: Use aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 10/35] crypto: Add aesdec_ISB_ISR, Richard Henderson, 2023/06/02
- [PATCH 05/35] target/i386: Use aesenc_SB_SR, Richard Henderson, 2023/06/02
- [PATCH 11/35] target/i386: Use aesdec_ISB_ISR, Richard Henderson, 2023/06/02
- [PATCH 14/35] target/riscv: Use aesdec_ISB_ISR, Richard Henderson, 2023/06/02
- [PATCH 15/35] crypto: Add aesenc_MC, Richard Henderson, 2023/06/02
- [PATCH 16/35] target/arm: Use aesenc_MC, Richard Henderson, 2023/06/02
- [PATCH 12/35] target/arm: Use aesdec_ISB_ISR, Richard Henderson, 2023/06/02
- [PATCH 18/35] target/i386: Use aesdec_IMC, Richard Henderson, 2023/06/02
- [PATCH 21/35] crypto: Add aesenc_SB_SR_MC_AK, Richard Henderson, 2023/06/02