From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29972 invoked by alias); 7 Nov 2002 15:18:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 29963 invoked from network); 7 Nov 2002 15:18:41 -0000 Received: from unknown (HELO soliton.integrable-solutions.net) (193.51.208.204) by sources.redhat.com with SMTP; 7 Nov 2002 15:18:41 -0000 Received: (from gdr@localhost) by soliton.integrable-solutions.net (8.11.6/8.11.6/SuSE Linux 0.5) id gA7FJin07465; Thu, 7 Nov 2002 16:19:44 +0100 To: Jan Hubicka Cc: Andreas Schwab , gcc-patches@gcc.gnu.org Subject: Re: Converting floor to rint References: <20021106222922.GH1316@atrey.karlin.mff.cuni.cz> <20021107092112.GF7964@kam.mff.cuni.cz> <20021107100359.GI7964@kam.mff.cuni.cz> <20021107125643.GA11315@atrey.karlin.mff.cuni.cz> <20021107150055.GC11315@atrey.karlin.mff.cuni.cz> From: Gabriel Dos Reis In-Reply-To: Jan Hubicka's message of "Thu, 7 Nov 2002 16:00:55 +0100" Organization: Integrable Solutions Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Date: Thu, 07 Nov 2002 07:18:00 -0000 Message-ID: X-SW-Source: 2002-11/txt/msg00459.txt.bz2 Jan Hubicka writes: [...] | > F.7.1 Environment management | > | > [#1] IEC 60559 requires that floating-point operations | > implicitly raise floating-point exception status flags, and | > that rounding control modes can be set explicitly to affect | > result values of floating-point operations. When the state | > for the FENV_ACCESS pragma (defined in ) is ``on'', | > these changes to the floating-point state are treated as | > *side effects* which respect sequence points.304) | > | > (my emphasis) | | So one can not consider rint as "attribute((const))" function and we can | not do that in strict mode. That is exact. | > | > | Otherwise, if | > | __STDC_IEC_559__ is not defined, then no requirements on the exceptions | > | are stated for rint, since 7.12.9.4 does not have a "shall". | Can I detect somehow the cases when __STDC_IEC_559__ is not defined? Also one would need to access thye value of FENV_ACCESS. That is all that I loosenely called "propriate FE exception machinary". | This seems to be done by glibc in all cases, even with -ffast-math. | Perhaps I can do the rint folding only with -ffast-math that would be | enought for majority of 3D software that is about the only case where we | get some oppurtunities for speedup from this transformations? I won't oppose to having it in -funsafe-math. -- Gaby