[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 32/37] target/riscv: Use aesenc_SB_SR_MC_AK
From: |
Richard Henderson |
Subject: |
[PULL 32/37] target/riscv: Use aesenc_SB_SR_MC_AK |
Date: |
Sun, 9 Jul 2023 14:59:40 +0100 |
This implements the AES64ESM instruction.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/riscv/crypto_helper.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/target/riscv/crypto_helper.c b/target/riscv/crypto_helper.c
index 505166ce5a..c036fe8632 100644
--- a/target/riscv/crypto_helper.c
+++ b/target/riscv/crypto_helper.c
@@ -198,7 +198,12 @@ static inline target_ulong aes64_operation(target_ulong
rs1, target_ulong rs2,
target_ulong HELPER(aes64esm)(target_ulong rs1, target_ulong rs2)
{
- return aes64_operation(rs1, rs2, true, true);
+ AESState t;
+
+ t.d[HOST_BIG_ENDIAN] = rs1;
+ t.d[!HOST_BIG_ENDIAN] = rs2;
+ aesenc_SB_SR_MC_AK(&t, &t, &aes_zero, false);
+ return t.d[HOST_BIG_ENDIAN];
}
target_ulong HELPER(aes64es)(target_ulong rs1, target_ulong rs2)
--
2.34.1
- [PULL 30/37] target/riscv: Use aesdec_ISB_ISR_AK, (continued)
- [PULL 30/37] target/riscv: Use aesdec_ISB_ISR_AK, Richard Henderson, 2023/07/09
- [PULL 35/37] crypto: Implement aesdec_IMC with AES_imc_rot, Richard Henderson, 2023/07/09
- [PULL 31/37] target/riscv: Use aesdec_IMC, Richard Henderson, 2023/07/09
- [PULL 19/37] target/i386: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/09
- [PULL 21/37] target/i386: Use aesdec_IMC, Richard Henderson, 2023/07/09
- [PULL 23/37] target/i386: Use aesdec_ISB_ISR_IMC_AK, Richard Henderson, 2023/07/09
- [PULL 25/37] target/arm: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/09
- [PULL 26/37] target/arm: Use aesdec_ISB_ISR_AK, Richard Henderson, 2023/07/09
- [PULL 28/37] target/arm: Use aesdec_IMC, Richard Henderson, 2023/07/09
- [PULL 33/37] target/riscv: Use aesdec_ISB_ISR_IMC_AK, Richard Henderson, 2023/07/09
- [PULL 32/37] target/riscv: Use aesenc_SB_SR_MC_AK,
Richard Henderson <=
- [PULL 15/37] target/ppc: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/09
- [PULL 01/37] util: Add cpuinfo-ppc.c, Richard Henderson, 2023/07/09
- [PULL 29/37] target/riscv: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/09
- [PULL 37/37] crypto: Unexport AES_*_rot, AES_TeN, AES_TdN, Richard Henderson, 2023/07/09
- [PULL 36/37] crypto: Remove AES_imc, Richard Henderson, 2023/07/09
- [PULL 14/37] host/include/ppc: Implement aes-round.h, Richard Henderson, 2023/07/09
- Re: [PULL 00/37] crypto: Provide aes-round.h and host accel, Richard Henderson, 2023/07/09