[Top][All Lists]

[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".

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]