From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25463 invoked by alias); 21 Nov 2012 22:09:04 -0000 Received: (qmail 25407 invoked by uid 22791); 21 Nov 2012 22:09:02 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Nov 2012 22:08:55 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TbITW-0005qG-De from joseph_myers@mentor.com ; Wed, 21 Nov 2012 14:08:54 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 21 Nov 2012 14:08:54 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Wed, 21 Nov 2012 22:08:52 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1TbITT-0004TQ-17; Wed, 21 Nov 2012 22:08:51 +0000 Date: Wed, 21 Nov 2012 22:09:00 -0000 From: "Joseph S. Myers" To: Richard Henderson CC: Subject: Re: Make ARM fesetenv (FE_NOMASK_ENV) detect failure (bug 14866) In-Reply-To: <50AD4E38.4010301@twiddle.net> Message-ID: References: <50AD4E38.4010301@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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/msg00104.txt.bz2 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