[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 07/33] target/alpha: Tidy helper_fp_exc_raise_s
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v3 07/33] target/alpha: Tidy helper_fp_exc_raise_s |
Date: |
Thu, 26 Sep 2019 00:30:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 9/24/19 11:00 PM, Alex Bennée wrote:
> From: Richard Henderson <address@hidden>
>
> Remove a redundant masking of ignore. Once that's gone it is
> obvious that the system-mode inner test is redundant with the
> outer test. Move the fpcr_exc_enable masking up and tidy.
>
> No functional change.
>
> Signed-off-by: Richard Henderson <address@hidden>
> Signed-off-by: Alex Bennée <address@hidden>
> Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> target/alpha/fpu_helper.c | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/target/alpha/fpu_helper.c b/target/alpha/fpu_helper.c
> index 62a066d9020..df8b58963ba 100644
> --- a/target/alpha/fpu_helper.c
> +++ b/target/alpha/fpu_helper.c
> @@ -90,25 +90,18 @@ void helper_fp_exc_raise_s(CPUAlphaState *env, uint32_t
> ignore, uint32_t regno)
> uint32_t exc = env->error_code & ~ignore;
> if (exc) {
> env->fpcr |= exc;
> - exc &= ~ignore;
> -#ifdef CONFIG_USER_ONLY
> - /*
> - * In user mode, the kernel's software handler only
> - * delivers a signal if the exception is enabled.
> - */
> - if (!(exc & env->fpcr_exc_enable)) {
> - return;
> - }
> -#else
> + exc &= env->fpcr_exc_enable;
> /*
> * In system mode, the software handler gets invoked
> * for any non-ignored exception.
> + * In user mode, the kernel's software handler only
> + * delivers a signal if the exception is enabled.
> */
> +#ifdef CONFIG_USER_ONLY
> if (!exc) {
> return;
> }
> #endif
> - exc &= env->fpcr_exc_enable;
> fp_exc_raise1(env, GETPC(), exc, regno, EXC_M_SWC);
> }
> }
>
- [PATCH v3 00/33] testing/next (docker,tcg, alpha ;-), Alex Bennée, 2019/09/24
- [PATCH v3 01/33] target/alpha: Use array for FPCR_DYN conversion, Alex Bennée, 2019/09/24
- [PATCH v3 02/33] target/alpha: Fix SWCR_MAP_UMZ, Alex Bennée, 2019/09/24
- [PATCH v3 07/33] target/alpha: Tidy helper_fp_exc_raise_s, Alex Bennée, 2019/09/24
- Re: [PATCH v3 07/33] target/alpha: Tidy helper_fp_exc_raise_s,
Philippe Mathieu-Daudé <=
- [PATCH v3 03/33] target/alpha: Fix SWCR_TRAP_ENABLE_MASK, Alex Bennée, 2019/09/24
- [PATCH v3 05/33] target/alpha: Write to fpcr_flush_to_zero once, Alex Bennée, 2019/09/24
- [PATCH v3 11/33] target/ppc: fix signal delivery for ppc64abi32, Alex Bennée, 2019/09/24
- [PATCH v3 21/33] tests/tcg: add simple record/replay smoke test for aarch64, Alex Bennée, 2019/09/24
- [PATCH v3 06/33] target/alpha: Mask IOV exception with INV for user-only, Alex Bennée, 2019/09/24
- [PATCH v3 13/33] tests/docker: fix DOCKER_PARTIAL_IMAGES, Alex Bennée, 2019/09/24
- [PATCH v3 04/33] target/alpha: Handle SWCR_MAP_DMZ earlier, Alex Bennée, 2019/09/24
- [PATCH v3 15/33] tests/docker: reduce scary warnings by cleaning up clean up, Alex Bennée, 2019/09/24