This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Make ARM fesetenv (FE_NOMASK_ENV) detect failure (bug 14866)
On Wed, 21 Nov 2012, Richard Henderson wrote:
> On 11/21/2012 12:28 PM, Joseph S. Myers wrote:
> > + if (envp == FE_NOMASK_ENV)
> > + {
> > + /* VFPv3 and VFPv4 do not support trapping exceptions, so
> > + test whether the relevant bits were set and fail if
> > + not. */
> > + _FPU_GETCW (temp);
> > + if ((temp & _FPU_IEEE) != _FPU_IEEE)
> > + return 1;
> > + }
>
> Why test vs FE_NOMASK_ENV explicitly? In theory the exception value
> could have come from just about anywhere.
The fesetenv argument must either be one of the macros from fenv.h, or an
environment previously obtained from one of the fenv.h functions in the
same execution of the same program (and in the latter case, if these bits
are set it means the processor supports them).
--
Joseph S. Myers
joseph@codesourcery.com