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)
- From: Richard Henderson <rth at twiddle dot net>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-ports at sourceware dot org
- Date: Wed, 21 Nov 2012 13:57:12 -0800
- Subject: Re: Make ARM fesetenv (FE_NOMASK_ENV) detect failure (bug 14866)
- References: <Pine.LNX.4.64.1211212027330.11924@digraph.polyomino.org.uk>
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.
This would seem to do the same thing with fewer assumptions:
if (temp & _FPU_IEEE)
{
unsigned temp2;
_FPU_GETCW (temp2);
if (temp != temp2)
return 1;
}
r~