diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-06-20 10:52:02 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-06-27 11:18:17 +0100 |
commit | 6ca54aa9a882ece5a6bcf5879f25bdcd7a95331f (patch) | |
tree | 06145c33b4f3445679f3346829f1dc469a33e6a5 /target/arm/cpu.h | |
parent | e74c097638d38b46d9c68f11565432034afc0ad0 (diff) | |
download | qemu-6ca54aa9a882ece5a6bcf5879f25bdcd7a95331f.zip qemu-6ca54aa9a882ece5a6bcf5879f25bdcd7a95331f.tar.gz qemu-6ca54aa9a882ece5a6bcf5879f25bdcd7a95331f.tar.bz2 |
target/arm: Introduce sve_vqm1_for_el_sm
When Streaming SVE mode is enabled, the size is taken from
SMCR_ELx instead of ZCR_ELx. The format is shared, but the
set of vector lengths is not. Further, Streaming SVE does
not require any particular length to be supported.
Adjust sve_vqm1_for_el to pass the current value of PSTATE.SM
to the new function.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220620175235.60881-19-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/cpu.h')
-rw-r--r-- | target/arm/cpu.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c018f97..0295e85 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1154,13 +1154,18 @@ int sve_exception_el(CPUARMState *env, int cur_el); int sme_exception_el(CPUARMState *env, int cur_el); /** - * sve_vqm1_for_el: + * sve_vqm1_for_el_sm: * @env: CPUARMState * @el: exception level + * @sm: streaming mode * - * Compute the current SVE vector length for @el, in units of + * Compute the current vector length for @el & @sm, in units of * Quadwords Minus 1 -- the same scale used for ZCR_ELx.LEN. + * If @sm, compute for SVL, otherwise NVL. */ +uint32_t sve_vqm1_for_el_sm(CPUARMState *env, int el, bool sm); + +/* Likewise, but using @sm = PSTATE.SM. */ uint32_t sve_vqm1_for_el(CPUARMState *env, int el); static inline bool is_a64(CPUARMState *env) |