qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility func


From: Taylor Simpson
Subject: RE: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions
Date: Thu, 18 Mar 2021 14:11:03 +0000


> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Thursday, March 18, 2021 8:30 AM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: philmd@redhat.com; alex.bennee@linaro.org; laurent@vivier.eu;
> ale@rev.ng; Brian Cain <bcain@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.henderson@linaro.org>
> >> Sent: Sunday, February 14, 2021 2:57 PM
> >> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> >> Cc: philmd@redhat.com; alex.bennee@linaro.org; laurent@vivier.eu;
> >> ale@rev.ng; Brian Cain <bcain@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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]