> -----Original Message----- > From: Richard Henderson <richard.hender...@linaro.org> > Sent: Thursday, March 18, 2021 8:30 AM > To: Taylor Simpson <tsimp...@quicinc.com>; qemu-devel@nongnu.org > Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > a...@rev.ng; Brian Cain <bc...@quicinc.com> > Subject: Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) > utility functions > > On 3/17/21 9:57 PM, Taylor Simpson wrote: > > > > > >> -----Original Message----- > >> From: Richard Henderson <richard.hender...@linaro.org> > >> Sent: Sunday, February 14, 2021 2:57 PM > >> To: Taylor Simpson <tsimp...@quicinc.com>; qemu-devel@nongnu.org > >> Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > >> a...@rev.ng; Brian Cain <bc...@quicinc.com> > >> Subject: Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) > >> utility functions > >> > >> On 2/7/21 9:46 PM, Taylor Simpson wrote: > >>> +uint64_t conv_sf_to_8u(float32 in, float_status *fp_status); > >>> +uint32_t conv_sf_to_4u(float32 in, float_status *fp_status); > >>> +int64_t conv_sf_to_8s(float32 in, float_status *fp_status); > >>> +int32_t conv_sf_to_4s(float32 in, float_status *fp_status); > >>> + > >>> +uint64_t conv_df_to_8u(float64 in, float_status *fp_status); > >>> +uint32_t conv_df_to_4u(float64 in, float_status *fp_status); > >>> +int64_t conv_df_to_8s(float64 in, float_status *fp_status); > >>> +int32_t conv_df_to_4s(float64 in, float_status *fp_status); > >> > >> You need to either use the normal float conversion routines, or document > >> what the differences are. > > > > There are some differences in floating point flags raised, so I could write > something like this: > > if (float32_is_infinity(RsV)) { > > float_raise(float_flag_invalid, &env->fp_status); > > if (float32_is_neg(RsV)) { > > RddV = 0ULL; > > } else { > > RddV = ~0ULL; > > } > > This isn't different from softfloat.c. > > > } else if (float32_is_any_nan(RsV)) { > > float_raise(float_flag_invalid, &env->fp_status); > > RddV = ~0ULL; > > Nor is this.
Actually, softfloat raises inexact instead of invalid. Is there a way to override? Thanks, Taylor