qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v12 08/65] target/arm: tcg: split m_helper user-only and sysemu


From: Alex Bennée
Subject: Re: [RFC v12 08/65] target/arm: tcg: split m_helper user-only and sysemu-only parts
Date: Thu, 08 Apr 2021 18:34:58 +0100
User-agent: mu4e 1.5.11; emacs 28.0.50

Claudio Fontana <cfontana@suse.de> writes:

> in the process remove a few CONFIG_TCG that are superfluous now.
>
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/tcg/m_helper.h         |   21 +
>  target/arm/tcg/m_helper.c         | 2766 +----------------------------
>  target/arm/tcg/sysemu/m_helper.c  | 2655 +++++++++++++++++++++++++++
>  target/arm/tcg/user/m_helper.c    |   97 +
>  target/arm/tcg/sysemu/meson.build |    1 +
>  target/arm/tcg/user/meson.build   |    1 +
>  6 files changed, 2780 insertions(+), 2761 deletions(-)
>  create mode 100644 target/arm/tcg/m_helper.h
>  create mode 100644 target/arm/tcg/sysemu/m_helper.c
>  create mode 100644 target/arm/tcg/user/m_helper.c
>
> diff --git a/target/arm/tcg/m_helper.h b/target/arm/tcg/m_helper.h
> new file mode 100644
> index 0000000000..9da106aa65
> --- /dev/null
> +++ b/target/arm/tcg/m_helper.h
> @@ -0,0 +1,21 @@
> +/*
> + * ARM v7m generic helpers.
> + *
> + * This code is licensed under the GNU GPL v2 or later.
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#ifndef M_HELPER_H
> +#define M_HELPER_H
> +
> +#include "cpu.h"
> +
> +void v7m_msr_xpsr(CPUARMState *env, uint32_t mask,
> +                  uint32_t reg, uint32_t val);
> +
> +uint32_t v7m_mrs_xpsr(CPUARMState *env, uint32_t reg, unsigned el);
> +
> +uint32_t v7m_mrs_control(CPUARMState *env, uint32_t secure);
> +
> +#endif /* M_HELPER_H */
> diff --git a/target/arm/tcg/m_helper.c b/target/arm/tcg/m_helper.c
> index d63ae465e1..8f3763155f 100644
> --- a/target/arm/tcg/m_helper.c
> +++ b/target/arm/tcg/m_helper.c
> @@ -1,5 +1,5 @@
>  /*
> - * ARM generic helpers.
> + * ARM v7m generic helpers.
>   *
>   * This code is licensed under the GNU GPL v2 or later.
>   *
> @@ -7,35 +7,11 @@
>   */
<snip>
>  
> -static void v7m_msr_xpsr(CPUARMState *env, uint32_t mask,
> -                         uint32_t reg, uint32_t val)
> +void v7m_msr_xpsr(CPUARMState *env, uint32_t mask, uint32_t reg, uint32_t 
> val)
>  {
>      /* Only APSR is actually writable */
>      if (!(reg & 4)) {
> @@ -51,7 +27,7 @@ static void v7m_msr_xpsr(CPUARMState *env, uint32_t mask,
>      }
>  }
<snip>

I guess there is a question about why the helpers can't just exist in
the header and maintain their static and become inlines in the the one
place they are included. But this is M-profile and I doubt the
difference is measurable so:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée



reply via email to

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