From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23649 invoked by alias); 22 Mar 2007 21:46:42 -0000 Received: (qmail 23611 invoked by uid 22791); 22 Mar 2007 21:46:41 -0000 X-Spam-Check-By: sourceware.org Received: from e1.ny.us.ibm.com (HELO e1.ny.us.ibm.com) (32.97.182.141) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Mar 2007 21:46:38 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e1.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l2MLkXdP001775 for ; Thu, 22 Mar 2007 17:46:33 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l2MLkXG7299636 for ; Thu, 22 Mar 2007 17:46:33 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l2MLkX6X026127 for ; Thu, 22 Mar 2007 17:46:33 -0400 Received: from [9.10.86.122] (spokane1.rchland.ibm.com [9.10.86.122]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l2MLkWeO026062; Thu, 22 Mar 2007 17:46:32 -0400 Message-ID: <4602FCE5.7060203@us.ibm.com> Date: Thu, 22 Mar 2007 21:46:00 -0000 From: Steven Munroe User-Agent: Mozilla/5.0 (X11; U; Linux ppc64; en-US; rv:1.8.0.9) Gecko/20060906 SUSE/1.8_seamonkey_1.0.7-1.1 SeaMonkey/1.0.7 MIME-Version: 1.0 To: Jakub Jelinek CC: Ulrich Drepper , Glibc hackers , Peter Eberlein Subject: Re: [PATCH] fenv fixes for x86_64/i386/ia64 References: <20070322145345.GZ1826@sunsite.mff.cuni.cz> In-Reply-To: <20070322145345.GZ1826@sunsite.mff.cuni.cz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00034.txt.bz2 Jakub Jelinek wrote: > Hi! > > feholdexcept is supposed to clear the sticky exception bits: > "The feholdexcept function saves the current floating-point environment in the object > pointed to by envp, clears the floating-point status flags, and then installs a non-stop > (continue on floating-point exceptions) mode, if available, for all floating-point > exceptions." > and > "A floating-point status flag is a system variable whose value is set > (but never cleared) when a floating-point exception is raised, which occurs as a side effect > of exceptional floating-point arithmetic to provide auxiliary information." > > Several feholdexcept implementations didn't handle this right. > Also, e.g. feupdateenv was a stub on x86_64 eventhough it is IMHO easily > implementable and other arches had bugs in it too (e.g. ia64 would rise > wrong exceptions and always return a failure). > I added a new testcase for feholdexcept/feupdateenv (hopefully I haven't > misinterpreted the standard) and I believe other arches (ppc*, s390*, ...) > will need some care too. > powerpc32 and powerpc64 both show two failures with the new test-fenv: Test: feholdexcept_tests FE_DIVBYZERO|FE_INVALID test Fail: Exception "DIVBYZERO" is not set Pass: Exception "INVALID" is set Pass: Exception "INEXACT" is not set Pass: Exception "UNDERFLOW" is not set Pass: Exception "OVERFLOW" is not set and Test: feholdexcept_tests FE_INEXACT|FE_INVALID test Pass: Exception "DIVBYZERO" is not set Fail: Exception "INVALID" is not set Pass: Exception "INEXACT" is set Pass: Exception "UNDERFLOW" is not set Pass: Exception "OVERFLOW" is not set We will look into this.