[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/20] target/arm: Rearrange {sve,fp}_check_access assert
From: |
Peter Maydell |
Subject: |
Re: [PATCH 04/20] target/arm: Rearrange {sve,fp}_check_access assert |
Date: |
Mon, 24 Aug 2020 17:59:53 +0100 |
On Sat, 15 Aug 2020 at 02:31, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> We want to ensure that access is checked by the time we ask
> for a specific fp/vector register. We want to ensure that
> we do not emit two lots of code to raise an exception.
>
> But sometimes it's difficult to cleanly organize the code
> such that we never pass through sve_check_access exactly once.
> Allow multiple calls so long as the result is true, that is,
> no exception to be raised.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/arm/translate.h | 1 +
> target/arm/translate-a64.c | 27 ++++++++++++++++-----------
> 2 files changed, 17 insertions(+), 11 deletions(-)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> diff --git a/target/arm/translate.h b/target/arm/translate.h
> index 16f2699ad7..ad7972eb22 100644
> --- a/target/arm/translate.h
> +++ b/target/arm/translate.h
> @@ -64,6 +64,7 @@ typedef struct DisasContext {
> * that it is set at the point where we actually touch the FP regs.
> */
> bool fp_access_checked;
> + bool sve_access_checked;
Is there anywhere it's worthwhile to put in an equivalent
of assert_fp_access_checked() for sve_access_checked, or is
there no point that's both (a) common to SVE accesses and
(b) not common to generic FP accesses ? One could put it
in pred_full_reg_offset() I suppose but I dunno if that
really gains us much. The existing fp_access_checked will
catch "forgot the check entirely" which seems more likely
as a bug than "put in the FP check when we wanted SVE".
thanks
-- PMM
- Re: [PATCH 07/20] target/arm: Use tcg_gen_gvec_bitsel for trans_SEL_pppp, (continued)
- [PATCH 08/20] target/arm: Split out gen_gvec_ool_zzzp, Richard Henderson, 2020/08/15
- [PATCH 17/20] target/arm: Fix sve_punpk_p vs odd vector lengths, Richard Henderson, 2020/08/15
- [PATCH 19/20] target/arm: Convert integer multiply-add (indexed) to gvec for aa64 advsimd, Richard Henderson, 2020/08/15
- [PATCH 11/20] target/arm: Split out gen_gvec_ool_zzz, Richard Henderson, 2020/08/15
- [PATCH 04/20] target/arm: Rearrange {sve,fp}_check_access assert, Richard Henderson, 2020/08/15
- Re: [PATCH 04/20] target/arm: Rearrange {sve,fp}_check_access assert,
Peter Maydell <=
- [PATCH 15/20] target/arm: Fix sve_uzp_p vs odd vector lengths, Richard Henderson, 2020/08/15
- [PATCH 10/20] target/arm: Split out gen_gvec_ool_zzp, Richard Henderson, 2020/08/15
- [PATCH 05/20] target/arm: Merge do_vector2_p into do_mov_p, Richard Henderson, 2020/08/15
- [PATCH 14/20] target/arm: Generalize inl_qrdmlah_* helper functions, Richard Henderson, 2020/08/15