This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 04/28] powerpc: ceil/ceilf refactor
- From: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 2 May 2019 15:41:36 -0300
- Subject: Re: [PATCH 04/28] powerpc: ceil/ceilf refactor
- References: <20190329133529.22523-1-adhemerval.zanella@linaro.org> <20190329133529.22523-5-adhemerval.zanella@linaro.org> <20190425015655.c2wckfwowa4xboc4@tereshkova> <83c7cdd1-0042-fa33-36f4-93d732fedba0@linaro.org>
On Thu, Apr 25 2019, Adhemerval Zanella wrote:
> On 24/04/2019 22:56, Gabriel F. T. Gomes wrote:
>
> > What would be a runtime check to use DFP syntax? Are you referring to
> > the optional third parameter (W) to mtfsfi? I don't see such mechanism
> > in __fesetround_inline, so I'm not sure I understand this
> > comment/comparison.
>
> The comment is not clear indeed, to use mtfsfi correctly one should
> check hwcap for PPC_FEATURE_HAS_DFP as fesetenv_register do. I changed
> comment to:
>
> /* Same as __fesetround_inline, however without runtime check to use DFP
> mtfsfi syntax (as relax_fenv_state) or if round value is valid. */
Aha, now I get it, thanks. With this change, the patch looks good to me.
Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
> >> +enum round_mode
> >> +{
> >> + CEIL,
> >> + FLOOR,
> >> + ROUND,
> >> + TRUNC,
> >> + NEARBYINT,
> >> +};
> >
> > OK. To be used in following patches.
>
> In fact I think it would be better to add each round_mode on each
> patch it implements. I have changed it locally.
OK.