[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 7/9] target/arm: Implement SVE2 crypto unary operations
From: |
Richard Henderson |
Subject: |
[PATCH v3 7/9] target/arm: Implement SVE2 crypto unary operations |
Date: |
Wed, 29 Apr 2020 19:03:01 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/sve.decode | 6 ++++++
target/arm/translate-sve.c | 14 ++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/target/arm/sve.decode b/target/arm/sve.decode
index b73b64c3f2..04985d2bb8 100644
--- a/target/arm/sve.decode
+++ b/target/arm/sve.decode
@@ -1551,3 +1551,9 @@ STNT1_zprz 1110010 .. 00 ..... 001 ... ..... ..... \
# SVE2 32-bit scatter non-temporal store (vector plus scalar)
STNT1_zprz 1110010 .. 10 ..... 001 ... ..... ..... \
@rprr_scatter_store xs=0 esz=2 scale=0
+
+### SVE2 Crypto Extensions
+
+# SVE2 crypto unary operations
+# AESMC and AESIMC
+AESMC 01000101 00 10000011100 decrypt:1 00000 rd:5
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 413000df3b..44dd1fe2b0 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -8174,3 +8174,17 @@ static bool trans_USDOT_zzzz(DisasContext *s,
arg_USDOT_zzzz *a)
}
return true;
}
+
+static bool trans_AESMC(DisasContext *s, arg_AESMC *a)
+{
+ if (!dc_isar_feature(aa64_sve2_aes, s)) {
+ return false;
+ }
+ if (sve_access_check(s)) {
+ unsigned vsz = vec_full_reg_size(s);
+ unsigned rd = vec_full_reg_offset(s, a->rd);
+ tcg_gen_gvec_2_ool(rd, rd, vsz, vsz, a->decrypt,
+ gen_helper_crypto_aesmc);
+ }
+ return true;
+}
--
2.20.1
- [PATCH v3 0/9] target/arm: Implement SVE2 Crypto Extensions, Richard Henderson, 2020/04/29
- [PATCH v3 1/9] target/arm: Convert aes and sm4 to gvec helpers, Richard Henderson, 2020/04/29
- [PATCH v3 2/9] target/arm: Convert rax1 to gvec helpers, Richard Henderson, 2020/04/29
- [PATCH v3 4/9] target/arm: Convert sha1 and sha256 to gvec helpers, Richard Henderson, 2020/04/29
- [PATCH v3 3/9] target/arm: Convert sha512 and sm3 to gvec helpers, Richard Henderson, 2020/04/29
- [PATCH v3 6/9] target/arm: Split helper_crypto_sm3tt, Richard Henderson, 2020/04/29
- [PATCH v3 8/9] target/arm: Implement SVE2 crypto destructive binary operations, Richard Henderson, 2020/04/29
- [PATCH v3 5/9] target/arm: Split helper_crypto_sha1_3reg, Richard Henderson, 2020/04/29
- [PATCH v3 9/9] target/arm: Implement SVE2 crypto constructive binary operations, Richard Henderson, 2020/04/29
- [PATCH v3 7/9] target/arm: Implement SVE2 crypto unary operations,
Richard Henderson <=