qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 07/20] target/arm: Fix is_a64 for user-only


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 07/20] target/arm: Fix is_a64 for user-only
Date: Fri, 17 Aug 2018 17:03:52 +0100

On 9 August 2018 at 05:21, Richard Henderson
<address@hidden> wrote:
> Saves about 8k code size in qemu-aarch64.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
>  target/arm/cpu.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/target/arm/cpu.h b/target/arm/cpu.h
> index aedaf2631e..ed51a2f5aa 100644
> --- a/target/arm/cpu.h
> +++ b/target/arm/cpu.h
> @@ -918,7 +918,15 @@ void aarch64_sync_64_to_32(CPUARMState *env);
>
>  static inline bool is_a64(CPUARMState *env)
>  {
> +#ifdef CONFIG_USER_ONLY
> +# ifdef TARGET_AARCH64
> +    return true;
> +# else
> +    return false;
> +# endif
> +#else
>      return env->aarch64;
> +#endif
>  }

And again. I don't want to pepper the code with ifdefs if
we can do the right thing without them.

thanks
-- PMM



reply via email to

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