This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] powerpc: Cleanup fenv_private.h
- From: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Fri, 10 Jun 2016 16:46:45 -0500
- Subject: Re: [PATCH] powerpc: Cleanup fenv_private.h
- Authentication-results: sourceware.org; auth=none
- References: <cffe19b8-a09a-fadb-7dd3-ef5088d58556 at linux dot vnet dot ibm dot com> <575B2229 dot 7070605 at linaro dot org>
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
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
- 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.