This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc: Cleanup fenv_private.h

On 06/10/2016 03:25 PM, Adhemerval Zanella wrote:
> It seems a nice cleanup and about the wrong code, I presume it is
> the one that might use _FPU_MASK_FRAC_INEX_RET_CC (which was indeed
> wrongly defined). Does it trigger any user visible issue in math
> tests?

I didn't see any.  Joseph has done a good job fixing them with the
slew of new test cases he has been adding.  This was the result of my
attempt to understand how all these macros fit together (or don't).

That mask was one minor issue.  Though, now that you point it out,
this does assume the DRN bits don't change.  I suppose one could
contrive a case where this might be problem.  Though, this patch
shouldn't change the status quo.

The more immediate issue was this macro and its usage:

-#define _FPU_MASK_ROUNDING 0xffffffff00000007LL

Which does not actually mask the roundings bits.  The pathologic
case being:

-  new.l = (old.l & _FPU_MASK_ROUNDING) | r;

Thus the resulting rounding mode may not always end up being the
desired one.  Though, as far as I can tell, both instances only
occur in functions that aren't used.

Likewise, as far as I could tell, the libc_feholdexcept_setround_ctx
macros are never used via any SET_RESTORE_* macros.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]