From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foWfQ-00070S-WB for qemu-devel@nongnu.org; Sat, 11 Aug 2018 12:23:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foWfQ-0008MP-33 for qemu-devel@nongnu.org; Sat, 11 Aug 2018 12:23:04 -0400 MIME-Version: 1.0 In-Reply-To: <20180810193129.1556-3-richard.henderson@linaro.org> References: <20180810193129.1556-1-richard.henderson@linaro.org> <20180810193129.1556-3-richard.henderson@linaro.org> From: Laurent Desnogues Date: Sat, 11 Aug 2018 18:23:02 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH 2/6] target/arm: Ignore float_flag_input_denormal from fp_status_f16 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: "qemu-devel@nongnu.org" , Peter Maydell , =?UTF-8?B?QWxleCBCZW5uw6ll?= , qemu-stable@nongnu.org On Fri, Aug 10, 2018 at 9:31 PM, Richard Henderson 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: qemu-stable@nongnu.org (3.0.1) > Reported-by: Laurent Desnogues > Signed-off-by: Richard Henderson Tested-by: Laurent Desnogues Reviewed-by: Laurent Desnogues 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 >