[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] target/arm: Ignore float_flag_input_denorma
From: |
Laurent Desnogues |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] target/arm: Ignore float_flag_input_denormal from fp_status_f16 |
Date: |
Sat, 11 Aug 2018 18:23:02 +0200 |
On Fri, Aug 10, 2018 at 9:31 PM, Richard Henderson
<address@hidden> wrote:
> When FZ is set, input_denormal exceptions are recognized, but this does
> not happen with FZ16. The softfloat code has no way to distinguish
> these bits and will raise such exceptions into fp_status_f16.flags,
> so ignore them when computing the accumulated flags.
>
> Cc: address@hidden (3.0.1)
> Reported-by: Laurent Desnogues <address@hidden>
> Signed-off-by: Richard Henderson <address@hidden>
Tested-by: Laurent Desnogues <address@hidden>
Reviewed-by: Laurent Desnogues <address@hidden>
Laurent
> ---
> target/arm/helper.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 452d5e182a..61454a77ec 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -11314,9 +11314,13 @@ uint32_t HELPER(vfp_get_fpscr)(CPUARMState *env)
> fpscr = (env->vfp.xregs[ARM_VFP_FPSCR] & 0xffc8ffff)
> | (env->vfp.vec_len << 16)
> | (env->vfp.vec_stride << 20);
> +
> i = get_float_exception_flags(&env->vfp.fp_status);
> i |= get_float_exception_flags(&env->vfp.standard_fp_status);
> - i |= get_float_exception_flags(&env->vfp.fp_status_f16);
> + /* FZ16 does not generate an input denormal exception. */
> + i |= (get_float_exception_flags(&env->vfp.fp_status_f16)
> + & ~float_flag_input_denormal);
> +
> fpscr |= vfp_exceptbits_from_host(i);
> return fpscr;
> }
> --
> 2.17.1
>
- [Qemu-devel] [PATCH 0/6] target/arm: More sve-ish fixes, Richard Henderson, 2018/08/10
- [Qemu-devel] [PATCH 1/6] target/arm: Adjust FPCR_MASK for FZ16, Richard Henderson, 2018/08/10
- [Qemu-devel] [PATCH 2/6] target/arm: Ignore float_flag_input_denormal from fp_status_f16, Richard Henderson, 2018/08/10
- Re: [Qemu-devel] [PATCH 2/6] target/arm: Ignore float_flag_input_denormal from fp_status_f16,
Laurent Desnogues <=
- [Qemu-devel] [PATCH 3/6] target/arm: Use fp_status_fp16 for do_fmpa_zpzzz_h, Richard Henderson, 2018/08/10
- [Qemu-devel] [PATCH 5/6] target/arm: Fix aa64 FCADD and FCMLA decode, Richard Henderson, 2018/08/10
- [Qemu-devel] [PATCH 4/6] target/arm: Use FZ not FZ16 for SVE FCVT single-half and double-half, Richard Henderson, 2018/08/10
- [Qemu-devel] [PATCH 6/6] softfloat: Fix missing inexact for floating-point add, Richard Henderson, 2018/08/10
- Re: [Qemu-devel] [PATCH 0/6] target/arm: More sve-ish fixes, Peter Maydell, 2018/08/16