From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25725 invoked by alias); 27 Jun 2012 17:58:36 -0000 Received: (qmail 25716 invoked by uid 22791); 27 Jun 2012 17:58:35 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,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-pz0-f41.google.com (HELO mail-pz0-f41.google.com) (209.85.210.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Jun 2012 17:58:14 +0000 Received: by dakp5 with SMTP id p5so1879534dak.0 for ; Wed, 27 Jun 2012 10:58:14 -0700 (PDT) Received: by 10.68.138.169 with SMTP id qr9mr65550414pbb.27.1340819893955; Wed, 27 Jun 2012 10:58:13 -0700 (PDT) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id rg9sm15791853pbc.67.2012.06.27.10.58.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jun 2012 10:58:13 -0700 (PDT) Message-ID: <4FEB49B3.2030602@twiddle.net> Date: Wed, 27 Jun 2012 17:58:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: "Joseph S. Myers" CC: libc-ports@sourceware.org, linux-arm-kernel@lists.infradead.org Subject: Re: Detecting support for trapping floating-point exceptions on ARM 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-06/txt/msg00090.txt.bz2 On 06/12/2012 12:11 PM, Joseph S. Myers wrote: > ARM VFPv3 and VFPv4 do not support trapping floating-point exceptions; > VFPv2, VFPv3U and VFPv4U do. The lack of support causes the glibc > math/test-fenv test to fail on VFPv3 and VFPv4 systems. > > The natural fix for that would be for fesetenv (FE_NOMASK_ENV) to fail on > hardware not supporting trapping exceptions. There is, however, no HWCAP > bit to indicate whether trapping floating-point exceptions is supported. > Could one be added to the kernel, or is there a good way fesetenv could > detect this from userspace without a new HWCAP bit? I don't suppose those SBZ/RAZ bits just so happen to be ignored in actual hardware, so that you can write 1 and read it back and get 0 to see if exceptions are unsupported? Yes, that violates the spec as written, but if it just so happens to work in current hardware that might be good enough convince someone to adjust the spec to be slightly more handy. r~