From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6611 invoked by alias); 17 Sep 2014 06:32:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6551 invoked by uid 48); 17 Sep 2014 06:32:28 -0000 From: "amodra at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/63281] powerpc64le creates 64 bit constants from scratch instead of loading them Date: Wed, 17 Sep 2014 06:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amodra at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-09/txt/msg01741.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63281 --- Comment #2 from Alan Modra --- Created attachment 33504 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33504&action=edit this moves constants from the toc to rodata For -mcmodel=medium it is just as efficient to load a constant from .rodata as it is from .toc, so keep all constants out of the TOC. (FP is already excluded by defauls selected for -mcmodel=medium). These constants are actually put into .rodata.cst8, so there is some chance they might be merged with an identical constant in another object file, which is a win over putting them in .toc. Also, this means .toc should only contain addresses, necessary for the current ppc64 linux kernel that wants to relocate .toc en masse.