From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12613 invoked by alias); 30 Nov 2011 10:53:59 -0000 Received: (qmail 12604 invoked by uid 22791); 30 Nov 2011 10:53:59 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ey0-f175.google.com (HELO mail-ey0-f175.google.com) (209.85.215.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Nov 2011 10:53:40 +0000 Received: by eaad13 with SMTP id d13so526348eaa.20 for ; Wed, 30 Nov 2011 02:53:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.213.27.205 with SMTP id j13mr271480ebc.104.1322650419552; Wed, 30 Nov 2011 02:53:39 -0800 (PST) Received: by 10.14.28.7 with HTTP; Wed, 30 Nov 2011 02:53:39 -0800 (PST) In-Reply-To: References: Date: Wed, 30 Nov 2011 18:49:00 -0000 Message-ID: Subject: Re: best ABI strategy ? From: Aurelien Buhrig To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg00312.txt.bz2 > Hi, > > I'm trying to optimize our target ABI, and I'm wondering what is the > best strategy to define it. > Is there a paper, or any hint, dealing with this topic ? > For instance, > - which ratio between call-used-reg vs "static regs" > - which ratio between arg regs vs call-used-reg > - what should be return regs > - ... > I guess this problem is very target dependent, but there are maybe > general ideas about this. > > > In particular, for now my call-used regs set is the same that arg regs > set. I noticed GCC would not use arg regs for reloading, (or would > prefer others), even if they are not actually used by function args. > and it generates extra push/pop of static regs. I there a way force > gcc preferring using "free" arg regs ? > > Thank you by advance! > > Aur=E9lien Forget the last point. GCC does use free arg regs. The testcases I looked at were not relevant. Sorry! Aur=E9lien