[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/20] target/arm: Fix arm_current_el for user-o
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 06/20] target/arm: Fix arm_current_el for user-only |
Date: |
Fri, 17 Aug 2018 17:03:22 +0100 |
On 9 August 2018 at 05:21, Richard Henderson
<address@hidden> wrote:
> Saves about 12k code size in qemu-aarch64.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> target/arm/cpu.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/target/arm/cpu.h b/target/arm/cpu.h
> index 2d6d7d03aa..aedaf2631e 100644
> --- a/target/arm/cpu.h
> +++ b/target/arm/cpu.h
> @@ -1958,6 +1958,9 @@ static inline bool arm_v7m_is_handler_mode(CPUARMState
> *env)
> */
> static inline int arm_current_el(CPUARMState *env)
> {
> +#ifdef CONFIG_USER_ONLY
> + return 0;
> +#else
> if (arm_feature(env, ARM_FEATURE_M)) {
> return arm_v7m_is_handler_mode(env) ||
> !(env->v7m.control[env->v7m.secure] & 1);
> @@ -1984,6 +1987,7 @@ static inline int arm_current_el(CPUARMState *env)
>
> return 1;
> }
> +#endif
Again, the #ifdeffery here should be unnecessary ? env->pstate,
env->uncached_cpsr, etc should be set so that we return the
right thing.
thanks
-- PMM
- [Qemu-devel] [PATCH 01/20] target/arm: Set ISAR bits for -cpu max, (continued)
- [Qemu-devel] [PATCH 01/20] target/arm: Set ISAR bits for -cpu max, Richard Henderson, 2018/08/09
- [Qemu-devel] [PATCH 03/20] target/arm: Define ID_AA64ZFR0_EL1, Richard Henderson, 2018/08/09
- [Qemu-devel] [PATCH 02/20] target/arm: Set ID_AA64PFR0 bits for SVE for -cpu max, Richard Henderson, 2018/08/09
- [Qemu-devel] [PATCH 04/20] target/arm: Adjust sve_exception_el, Richard Henderson, 2018/08/09
- [Qemu-devel] [PATCH 05/20] target/arm: Fix arm_cpu_data_is_big_endian for aa64 user-only, Richard Henderson, 2018/08/09
- [Qemu-devel] [PATCH 06/20] target/arm: Fix arm_current_el for user-only, Richard Henderson, 2018/08/09
- Re: [Qemu-devel] [PATCH 06/20] target/arm: Fix arm_current_el for user-only,
Peter Maydell <=
- [Qemu-devel] [PATCH 08/20] target/arm: Pass in current_el to fp and sve_exception_el, Richard Henderson, 2018/08/09
- [Qemu-devel] [PATCH 07/20] target/arm: Fix is_a64 for user-only, Richard Henderson, 2018/08/09
- [Qemu-devel] [PATCH 09/20] target/arm: Handle SVE vector length changes in system mode, Richard Henderson, 2018/08/09