From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126243 invoked by alias); 13 Sep 2016 12:46:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 126203 invoked by uid 89); 13 Sep 2016 12:46:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Sep 2016 12:45:50 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1bjn5w-0002QT-9H from joseph_myers@mentor.com ; Tue, 13 Sep 2016 05:45:48 -0700 Received: from digraph.polyomino.org.uk (137.202.0.87) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 13 Sep 2016 13:45:45 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.86_2) (envelope-from ) id 1bjn5p-0007Ox-Fj; Tue, 13 Sep 2016 12:45:41 +0000 Date: Tue, 13 Sep 2016 12:48:00 -0000 From: Joseph Myers To: Tamar Christina CC: GCC Patches , "jakub@redhat.com" , "rguenther@suse.de" , "law@redhat.com" , nd Subject: Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible In-Reply-To: <55159053-25db-4a46-332c-3816eaa4fc37@arm.com> Message-ID: References: <55159053-25db-4a46-332c-3816eaa4fc37@arm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2016-09/txt/msg00723.txt.bz2 On Tue, 13 Sep 2016, Tamar Christina wrote: > On 12/09/16 23:41, Joseph Myers wrote: > > Are you making endianness assumptions - specifically, does the > > reinterpretation as an integer require that WORDS_BIG_ENDIAN and > > FLOAT_WORDS_BIG_ENDIAN are the same? If so, I think that's OK (in that > > the only target where they aren't the same seems to be pdp11 which doesn't > > use IEEE formats), but probably the code should check explicitly. > > > No, if I understood the question correctly then this should be ok, > since I always access the float as an integer of equivalent precision. > So a 64bit float will be addressed as a 64bit int. My point is that there are theoretically systems where the order of words in a 64-bit float is not the same as the order of words in a 64-bit integer. Though it may be the case in practice that no such targets in GCC use IEEE formats (and that pdp11 is the only target without all of BYTES_BIG_ENDIAN, WORDS_BIG_ENDIAN and FLOAT_WORDS_BIG_ENDIAN the same). -- Joseph S. Myers joseph@codesourcery.com