[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 66/78] target/arm: Implement SVE2 crypto constructive binary o
From: |
Richard Henderson |
Subject: |
[PATCH v4 66/78] target/arm: Implement SVE2 crypto constructive binary operations |
Date: |
Tue, 9 Mar 2021 08:20:29 -0800 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/cpu.h | 5 +++++
target/arm/sve.decode | 4 ++++
target/arm/translate-sve.c | 16 ++++++++++++++++
3 files changed, 25 insertions(+)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 8c482f229b..1c5ad44bad 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -4213,6 +4213,11 @@ static inline bool isar_feature_aa64_sve2_bitperm(const
ARMISARegisters *id)
return FIELD_EX64(id->id_aa64zfr0, ID_AA64ZFR0, BITPERM) != 0;
}
+static inline bool isar_feature_aa64_sve2_sha3(const ARMISARegisters *id)
+{
+ return FIELD_EX64(id->id_aa64zfr0, ID_AA64ZFR0, SHA3) != 0;
+}
+
static inline bool isar_feature_aa64_sve2_sm4(const ARMISARegisters *id)
{
return FIELD_EX64(id->id_aa64zfr0, ID_AA64ZFR0, SM4) != 0;
diff --git a/target/arm/sve.decode b/target/arm/sve.decode
index bbb1dbd990..26385a9c2f 100644
--- a/target/arm/sve.decode
+++ b/target/arm/sve.decode
@@ -1564,3 +1564,7 @@ AESMC 01000101 00 10000011100 decrypt:1 00000
rd:5
AESE 01000101 00 10001 0 11100 0 ..... ..... @rdn_rm_e0
AESD 01000101 00 10001 0 11100 1 ..... ..... @rdn_rm_e0
SM4E 01000101 00 10001 1 11100 0 ..... ..... @rdn_rm_e0
+
+# SVE2 crypto constructive binary operations
+SM4EKEY 01000101 00 1 ..... 11110 0 ..... ..... @rd_rn_rm_e0
+RAX1 01000101 00 1 ..... 11110 1 ..... ..... @rd_rn_rm_e0
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 14360b2b08..6ee4d10ece 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -8172,3 +8172,19 @@ static bool trans_SM4E(DisasContext *s, arg_rrr_esz *a)
{
return do_sm4(s, a, gen_helper_crypto_sm4e);
}
+
+static bool trans_SM4EKEY(DisasContext *s, arg_rrr_esz *a)
+{
+ return do_sm4(s, a, gen_helper_crypto_sm4ekey);
+}
+
+static bool trans_RAX1(DisasContext *s, arg_rrr_esz *a)
+{
+ if (!dc_isar_feature(aa64_sve2_sha3, s)) {
+ return false;
+ }
+ if (sve_access_check(s)) {
+ gen_gvec_fn_zzz(s, gen_gvec_rax1, MO_64, a->rd, a->rn, a->rm);
+ }
+ return true;
+}
--
2.25.1
- [PATCH v4 62/78] target/arm: Implement SVE mixed sign dot product (indexed), (continued)
- [PATCH v4 62/78] target/arm: Implement SVE mixed sign dot product (indexed), Richard Henderson, 2021/03/09
- [PATCH v4 51/78] target/arm: Split out formats for 3 vectors + 1 index, Richard Henderson, 2021/03/09
- [PATCH v4 52/78] target/arm: Implement SVE2 integer multiply (indexed), Richard Henderson, 2021/03/09
- [PATCH v4 56/78] target/arm: Implement SVE2 integer multiply long (indexed), Richard Henderson, 2021/03/09
- [PATCH v4 53/78] target/arm: Implement SVE2 integer multiply-add (indexed), Richard Henderson, 2021/03/09
- [PATCH v4 59/78] target/arm: Implement SVE2 saturating multiply high (indexed), Richard Henderson, 2021/03/09
- [PATCH v4 63/78] target/arm: Implement SVE mixed sign dot product, Richard Henderson, 2021/03/09
- [PATCH v4 57/78] target/arm: Implement SVE2 saturating multiply (indexed), Richard Henderson, 2021/03/09
- [PATCH v4 58/78] target/arm: Implement SVE2 signed saturating doubling multiply high, Richard Henderson, 2021/03/09
- [PATCH v4 65/78] target/arm: Implement SVE2 crypto destructive binary operations, Richard Henderson, 2021/03/09
- [PATCH v4 66/78] target/arm: Implement SVE2 crypto constructive binary operations,
Richard Henderson <=
- [PATCH v4 67/78] target/arm: Implement SVE2 TBL, TBX, Richard Henderson, 2021/03/09
- [PATCH v4 68/78] target/arm: Implement SVE2 FCVTNT, Richard Henderson, 2021/03/09
- [PATCH v4 64/78] target/arm: Implement SVE2 crypto unary operations, Richard Henderson, 2021/03/09
- [PATCH v4 61/78] target/arm: Implement SVE2 complex integer multiply-add (indexed), Richard Henderson, 2021/03/09
- [PATCH v4 60/78] target/arm: Implement SVE2 multiply-add long (indexed), Richard Henderson, 2021/03/09
- [PATCH v4 74/78] target/arm: Implement 128-bit ZIP, UZP, TRN, Richard Henderson, 2021/03/09
- [PATCH v4 70/78] target/arm: Implement SVE2 FCVTXNT, FCVTX, Richard Henderson, 2021/03/09
- [PATCH v4 78/78] target/arm: Enable SVE2 and some extensions, Richard Henderson, 2021/03/09
- [PATCH v4 77/78] target/arm: Implement SVE2 complex integer dot product, Richard Henderson, 2021/03/09
- [PATCH v4 72/78] target/arm: Share table of sve load functions, Richard Henderson, 2021/03/09