[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 63/81] target/arm: Implement SVE2 crypto constructive binary o
From: |
Richard Henderson |
Subject: |
[PATCH v5 63/81] target/arm: Implement SVE2 crypto constructive binary operations |
Date: |
Fri, 16 Apr 2021 14:02:22 -0700 |
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 904f5da290..b43fd066ba 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -4246,6 +4246,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 fb4d32691e..7a2770cb0c 100644
--- a/target/arm/sve.decode
+++ b/target/arm/sve.decode
@@ -1522,3 +1522,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 681bbc6174..de8a6b2a15 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -8121,3 +8121,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 v5 64/81] target/arm: Implement SVE2 TBL, TBX, (continued)
- [PATCH v5 64/81] target/arm: Implement SVE2 TBL, TBX, Richard Henderson, 2021/04/16
- [PATCH v5 60/81] target/arm: Implement SVE mixed sign dot product, Richard Henderson, 2021/04/16
- [PATCH v5 68/81] target/arm: Implement SVE2 FLOGB, Richard Henderson, 2021/04/16
- [PATCH v5 69/81] target/arm: Share table of sve load functions, Richard Henderson, 2021/04/16
- [PATCH v5 62/81] target/arm: Implement SVE2 crypto destructive binary operations, Richard Henderson, 2021/04/16
- [PATCH v5 66/81] target/arm: Implement SVE2 FCVTLT, Richard Henderson, 2021/04/16
- [PATCH v5 53/81] target/arm: Implement SVE2 integer multiply-add (indexed), Richard Henderson, 2021/04/16
- [PATCH v5 59/81] target/arm: Implement SVE mixed sign dot product (indexed), Richard Henderson, 2021/04/16
- [PATCH v5 65/81] target/arm: Implement SVE2 FCVTNT, Richard Henderson, 2021/04/16
- [PATCH v5 67/81] target/arm: Implement SVE2 FCVTXNT, FCVTX, Richard Henderson, 2021/04/16
- [PATCH v5 63/81] target/arm: Implement SVE2 crypto constructive binary operations,
Richard Henderson <=
- [PATCH v5 70/81] target/arm: Implement SVE2 LD1RO, Richard Henderson, 2021/04/16
- [PATCH v5 71/81] target/arm: Implement 128-bit ZIP, UZP, TRN, Richard Henderson, 2021/04/16
- [PATCH v5 72/81] target/arm: Implement SVE2 bitwise shift immediate, Richard Henderson, 2021/04/16
- [PATCH v5 73/81] target/arm: Implement SVE2 fp multiply-add long, Richard Henderson, 2021/04/16
- [PATCH v5 75/81] target/arm: Split out do_neon_ddda_fpst, Richard Henderson, 2021/04/16
- [PATCH v5 74/81] target/arm: Implement aarch64 SUDOT, USDOT, Richard Henderson, 2021/04/16
- [PATCH v5 78/81] target/arm: Split decode of VSDOT and VUDOT, Richard Henderson, 2021/04/16
- [PATCH v5 76/81] target/arm: Remove unused fpst from VDOT_scalar, Richard Henderson, 2021/04/16
- [PATCH v5 77/81] target/arm: Fix decode for VDOT (indexed), Richard Henderson, 2021/04/16
- [PATCH v5 79/81] target/arm: Implement aarch32 VSUDOT, VUSDOT, Richard Henderson, 2021/04/16