From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31585 invoked by alias); 15 Oct 2004 22:23:46 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31577 invoked from network); 15 Oct 2004 22:23:44 -0000 Received: from unknown (HELO mail-out3.apple.com) (17.254.13.22) by sourceware.org with SMTP; 15 Oct 2004 22:23:44 -0000 Received: from mailgate2.apple.com (a17-128-100-204.apple.com [17.128.100.204]) by mail-out3.apple.com (8.12.11/8.12.11) with ESMTP id i9FMSG0a018975 for ; Fri, 15 Oct 2004 15:28:16 -0700 (PDT) Received: from relay4.apple.com (relay4.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.3.14) with ESMTP id ; Fri, 15 Oct 2004 15:23:44 -0700 Received: from greed.local ([17.219.198.120]) by relay4.apple.com (8.12.11/8.12.11) with ESMTP id i9FMNaeB010537; Fri, 15 Oct 2004 15:23:38 -0700 (PDT) Received: by greed.local (Postfix, from userid 501) id EE3BB306CC3; Fri, 15 Oct 2004 15:23:36 -0700 (PDT) To: Aldy Hernandez Cc: gcc@gcc.gnu.org Subject: Re: rfc: constant pool and floats References: <20041015213039.GA7011@redhat.com> From: Geoffrey Keating Date: Fri, 15 Oct 2004 23:57:00 -0000 In-Reply-To: <20041015213039.GA7011@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2004-10/txt/msg00638.txt.bz2 Aldy Hernandez writes: > store_bit_field() changes the floating constant to a const_int > because of the unalignment: > > /* If VALUE is a floating-point mode, access it as an integer of the > corresponding size. This can occur on a machine with 64 bit registers > that uses SFmode for float. This can also occur for unaligned float > structure fields. */ > > All this eventually creates a REG_EQUAL note with a const_int, instead > of a const_double: That's the problem. Clearly, (reg:SF 120) is not equal to the CONST_INT; it's equal to a SFmode CONST_DOUBLE. > (insn 11 10 0 (set (reg:SF 120) > (mem/u/i:SF (lo_sum:SI (reg:SI 121) > (symbol_ref/u:SI ("*.LC0") [flags 0x2])) [0 S4 A32])) -1 (nil) > (expr_list:REG_EQUAL (const_int 1202908642 [0x47b2ede2]) > (nil))) All SFmode constants are CONST_DOUBLEs. If you have a CONST_INT, you can use simplify_subreg to turn it into a CONST_DOUBLE.