From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31236 invoked by alias); 14 Oct 2010 16:40:14 -0000 Received: (qmail 31075 invoked by uid 22791); 14 Oct 2010 16:40:12 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Oct 2010 16:40:02 +0000 From: "ramana.radhakrishnan at arm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/43129] Simplify global variable's address loading with option -fpic X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ramana.radhakrishnan at arm dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 14 Oct 2010 16:40:00 -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 X-SW-Source: 2010-10/txt/msg01210.txt.bz2 Message-ID: <20101014164000.EpldL26OL3qZnjYlaGp9SM0UATMa4l0NN8FRHupHE00@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43129 --- Comment #9 from ramana.radhakrishnan at arm dot com 2010-10-14 16:39:26 UTC --- On Thu, 2010-10-14 at 16:33 +0000, stephen.clarke at st dot com wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43129 > > Stephen Clarke changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |stephen.clarke at st dot > | |com > > --- Comment #8 from Stephen Clarke 2010-10-14 16:32:56 UTC --- > For arm instruction set, could you fold pc into the indexing > to save an instruction? > > foo: > ldr r3, .L2 // C > .LPIC0: > ldr r3, [r3,pc] // C You'll find that the ARM-ARM thinks that PC in any of the 3 locations in this instruction form is *unpredictable*. Thus this form of the instruction should not be used. cheers Ramana