[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 12/45] target/arm: Mark gather prefetch as non-streaming
From: |
Richard Henderson |
Subject: |
[PATCH v4 12/45] target/arm: Mark gather prefetch as non-streaming |
Date: |
Tue, 28 Jun 2022 09:50:44 +0530 |
Mark these as a non-streaming instructions, which should trap if full
a64 support is not enabled in streaming mode. In this case, introduce
PRF_ns (prefetch non-streaming) to handle the checks.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/sme-fa64.decode | 3 ---
target/arm/sve.decode | 10 +++++-----
target/arm/translate-sve.c | 11 +++++++++++
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/target/arm/sme-fa64.decode b/target/arm/sme-fa64.decode
index 711636ed30..bc41aa2e2a 100644
--- a/target/arm/sme-fa64.decode
+++ b/target/arm/sme-fa64.decode
@@ -58,10 +58,7 @@ FAIL 1100 1110 ---- ---- ---- ---- ---- ---- # Advanced
SIMD cryptography e
# --11 1100 --1- ---- ---- ---- ---- --10 # Load/store FP register
(register offset)
# --11 1101 ---- ---- ---- ---- ---- ---- # Load/store FP register
(scaled imm)
-FAIL 1000 010- -00- ---- 111- ---- ---- ---- # SVE 32-bit gather prefetch
(vector+imm)
-FAIL 1000 0100 0-1- ---- 0--- ---- ---- ---- # SVE 32-bit gather prefetch
(scalar+vector)
FAIL 1010 010- ---- ---- 011- ---- ---- ---- # SVE contiguous FF load
(scalar+scalar)
FAIL 1010 010- ---1 ---- 101- ---- ---- ---- # SVE contiguous NF load
(scalar+imm)
FAIL 1010 010- -10- ---- 000- ---- ---- ---- # SVE load & replicate 32
bytes (scalar+scalar)
FAIL 1010 010- -100 ---- 001- ---- ---- ---- # SVE load & replicate 32
bytes (scalar+imm)
-FAIL 1100 010- ---- ---- ---- ---- ---- ---- # SVE 64-bit gather
load/prefetch
diff --git a/target/arm/sve.decode b/target/arm/sve.decode
index a54feb2f61..908643d7d9 100644
--- a/target/arm/sve.decode
+++ b/target/arm/sve.decode
@@ -1183,10 +1183,10 @@ LD1RO_zpri 1010010 .. 01 0.... 001 ... ..... .....
\
@rpri_load_msz nreg=0
# SVE 32-bit gather prefetch (scalar plus 32-bit scaled offsets)
-PRF 1000010 00 -1 ----- 0-- --- ----- 0 ----
+PRF_ns 1000010 00 -1 ----- 0-- --- ----- 0 ----
# SVE 32-bit gather prefetch (vector plus immediate)
-PRF 1000010 -- 00 ----- 111 --- ----- 0 ----
+PRF_ns 1000010 -- 00 ----- 111 --- ----- 0 ----
# SVE contiguous prefetch (scalar plus immediate)
PRF 1000010 11 1- ----- 0-- --- ----- 0 ----
@@ -1223,13 +1223,13 @@ LD1_zpiz 1100010 .. 01 ..... 1.. ... ..... .....
\
@rpri_g_load esz=3
# SVE 64-bit gather prefetch (scalar plus 64-bit scaled offsets)
-PRF 1100010 00 11 ----- 1-- --- ----- 0 ----
+PRF_ns 1100010 00 11 ----- 1-- --- ----- 0 ----
# SVE 64-bit gather prefetch (scalar plus unpacked 32-bit scaled offsets)
-PRF 1100010 00 -1 ----- 0-- --- ----- 0 ----
+PRF_ns 1100010 00 -1 ----- 0-- --- ----- 0 ----
# SVE 64-bit gather prefetch (vector plus immediate)
-PRF 1100010 -- 00 ----- 111 --- ----- 0 ----
+PRF_ns 1100010 -- 00 ----- 111 --- ----- 0 ----
### SVE Memory Store Group
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index a50b2f485b..9c58902b6e 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -5971,6 +5971,17 @@ static bool trans_PRF_rr(DisasContext *s, arg_PRF_rr *a)
return true;
}
+static bool trans_PRF_ns(DisasContext *s, arg_PRF_ns *a)
+{
+ if (!dc_isar_feature(aa64_sve, s)) {
+ return false;
+ }
+ /* Prefetch is a nop within QEMU. */
+ s->is_nonstreaming = true;
+ (void)sve_access_check(s);
+ return true;
+}
+
/*
* Move Prefix
*
--
2.34.1
- [PATCH v4 01/45] target/arm: Handle SME in aarch64_cpu_dump_state, (continued)
- [PATCH v4 01/45] target/arm: Handle SME in aarch64_cpu_dump_state, Richard Henderson, 2022/06/28
- [PATCH v4 02/45] target/arm: Add infrastructure for disas_sme, Richard Henderson, 2022/06/28
- [PATCH v4 03/45] target/arm: Trap non-streaming usage when Streaming SVE is active, Richard Henderson, 2022/06/28
- [PATCH v4 04/45] target/arm: Mark ADR as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 05/45] target/arm: Mark RDFFR, WRFFR, SETFFR as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 06/45] target/arm: Mark BDEP, BEXT, BGRP, COMPACT, FEXPA, FTSSEL as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 07/45] target/arm: Mark PMULL, FMMLA as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 08/45] target/arm: Mark FTSMUL, FTMAD, FADDA as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 09/45] target/arm: Mark SMMLA, UMMLA, USMMLA as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 10/45] target/arm: Mark string/histo/crypto as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 12/45] target/arm: Mark gather prefetch as non-streaming,
Richard Henderson <=
- [PATCH v4 11/45] target/arm: Mark gather/scatter load/store as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 13/45] target/arm: Mark LDFF1 and LDNF1 as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 14/45] target/arm: Mark LD1RO as non-streaming, Richard Henderson, 2022/06/28
- [PATCH v4 15/45] target/arm: Add SME enablement checks, Richard Henderson, 2022/06/28
- [PATCH v4 16/45] target/arm: Handle SME in sve_access_check, Richard Henderson, 2022/06/28
- [PATCH v4 17/45] target/arm: Implement SME RDSVL, ADDSVL, ADDSPL, Richard Henderson, 2022/06/28
- [PATCH v4 19/45] target/arm: Implement SME MOVA, Richard Henderson, 2022/06/28
- [PATCH v4 18/45] target/arm: Implement SME ZERO, Richard Henderson, 2022/06/28
- [PATCH v4 20/45] target/arm: Implement SME LD1, ST1, Richard Henderson, 2022/06/28
- [PATCH v4 21/45] target/arm: Export unpredicated ld/st from translate-sve.c, Richard Henderson, 2022/06/28