From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20481 invoked by alias); 4 Sep 2015 23:04:26 -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 20472 invoked by uid 89); 4 Sep 2015 23:04:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 04 Sep 2015 23:04:24 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id t84N4GHF028645; Fri, 4 Sep 2015 18:04:16 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id t84N4Fpx028644; Fri, 4 Sep 2015 18:04:15 -0500 Date: Fri, 04 Sep 2015 23:08:00 -0000 From: Segher Boessenkool To: Rich Felker Cc: Joseph Myers , gcc-patches@gcc.gnu.org Subject: Re: Reviving SH FDPIC target Message-ID: <20150904230415.GA23901@gate.crashing.org> References: <20150902183650.GA16052@brightrain.aerifal.cx> <20150902210535.GM17773@brightrain.aerifal.cx> <20150903005101.GN17773@brightrain.aerifal.cx> <20150903155345.GQ17773@brightrain.aerifal.cx> <20150904201640.GU17773@brightrain.aerifal.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150904201640.GU17773@brightrain.aerifal.cx> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00387.txt.bz2 On Fri, Sep 04, 2015 at 04:16:40PM -0400, Rich Felker wrote: > One thing I've noticed that's odd is that gcc -mfdpic -fPIC produces > different (less efficient) code from just gcc -mfdpic, which seems > wrong, but agrees with sh.c which has a number of checks for flag_pic > not matched with a TARGET_FDPIC check. Generic code tests flag_pic in important places as well. > I'm thinking all of these > should either be flag_pic||TARGET_PIC or flag_pic&&!TARGET_FDPIC, > depending on whether the code applies to all PIC or is specific to the > non-FDPIC PIC model where r12 is call-saved. Does this sound correct? > I think we need spurious -fPIC to work (although it could be handled > with spec magic) and not pessimize code, since most library builds > will use -fPIC. If you never want -fPIC (or -fpic) if fdpic is enabled, you can disable it (in sh_option_override)? Segher