From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1936 invoked by alias); 27 Aug 2014 21:39:20 -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 1873 invoked by uid 89); 27 Aug 2014 21:39:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 27 Aug 2014 21:39:18 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7RLdFw5027091 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Aug 2014 17:39:15 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-40.phx2.redhat.com [10.3.113.40]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7RLdE1U011117; Wed, 27 Aug 2014 17:39:14 -0400 Message-ID: <53FE5002.6040005@redhat.com> Date: Wed, 27 Aug 2014 21:39:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Ilya Enkovich , Vladimir Makarov CC: gcc@gnu.org, gcc-patches , Evgeny Stupachenko , Richard Biener , Uros Bizjak Subject: Re: Enable EBX for x86 in 32bits PIC code References: <20140707114750.GB31640@tucnak.redhat.com> <20140822121151.GA60032@msticlxl57.ims.intel.com> <53FB5184.3030500@redhat.com> <53FCA6F5.7020405@redhat.com> <20140826213712.GA39451@msticlxl57.ims.intel.com> In-Reply-To: <20140826213712.GA39451@msticlxl57.ims.intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg02517.txt.bz2 On 08/26/14 15:42, Ilya Enkovich wrote: > diff --git a/gcc/calls.c b/gcc/calls.c > index 4285ec1..85dae6b 100644 > --- a/gcc/calls.c > +++ b/gcc/calls.c > @@ -1122,6 +1122,14 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED, > call_expr_arg_iterator iter; > tree arg; > > + if (targetm.calls.implicit_pic_arg (fndecl ? fndecl : fntype)) > + { > + gcc_assert (pic_offset_table_rtx); > + args[j].tree_value = make_tree (ptr_type_node, > + pic_offset_table_rtx); > + j--; > + } > + > if (struct_value_addr_value) > { > args[j].tree_value = struct_value_addr_value; So why do you need this? Can't this be handled in the call/call_value expanders or what about attaching the use to CALL_INSN_FUNCTION_USAGE from inside ix86_expand_call? Basically I'm not seeing the need for another target hook here. I think that would significantly simply the patch as well. Jeff