From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22111 invoked by alias); 21 Nov 2012 21:57:25 -0000 Received: (qmail 22093 invoked by uid 22791); 21 Nov 2012 21:57:24 -0000 X-SWARE-Spam-Status: No, hits=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ia0-f169.google.com (HELO mail-ia0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Nov 2012 21:57:15 +0000 Received: by mail-ia0-f169.google.com with SMTP id r4so6533021iaj.0 for ; Wed, 21 Nov 2012 13:57:15 -0800 (PST) Received: by 10.50.0.204 with SMTP id 12mr988830igg.54.1353535035287; Wed, 21 Nov 2012 13:57:15 -0800 (PST) Received: from anchor.twiddle.home (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id rd10sm665700igb.1.2012.11.21.13.57.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 13:57:14 -0800 (PST) Message-ID: <50AD4E38.4010301@twiddle.net> Date: Wed, 21 Nov 2012 21:57:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: "Joseph S. Myers" CC: libc-ports@sourceware.org Subject: Re: Make ARM fesetenv (FE_NOMASK_ENV) detect failure (bug 14866) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00101.txt.bz2 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~