From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34040 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMey6-0000uO-I1 for qemu-devel@nongnu.org; Thu, 10 Jun 2010 06:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMey3-0001mS-Dd for qemu-devel@nongnu.org; Thu, 10 Jun 2010 06:26:36 -0400 Received: from hall.aurel32.net ([88.191.82.174]:60795) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMey3-0001mI-5c for qemu-devel@nongnu.org; Thu, 10 Jun 2010 06:26:35 -0400 Date: Thu, 10 Jun 2010 12:26:30 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 14/35] tcg-s390: Rearrange register allocation order. Message-ID: <20100610102630.GL26968@volta.aurel32.net> References: <1275678883-7082-1-git-send-email-rth@twiddle.net> <1275678883-7082-15-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1275678883-7082-15-git-send-email-rth@twiddle.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, agraf@suse.de On Fri, Jun 04, 2010 at 12:14:22PM -0700, Richard Henderson wrote: > Try to avoid conflicting with the outgoing function call arguments. > > Signed-off-by: Richard Henderson > --- > tcg/s390/tcg-target.c | 23 +++++++++++++---------- > 1 files changed, 13 insertions(+), 10 deletions(-) This patch looks fine. > diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c > index 95ea3c8..3944cb1 100644 > --- a/tcg/s390/tcg-target.c > +++ b/tcg/s390/tcg-target.c > @@ -149,22 +149,25 @@ static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { > }; > #endif > > +/* Since R6 is a potential argument register, choose it last of the > + call-saved registers. Likewise prefer the call-clobbered registers > + in reverse order to maximize the chance of avoiding the arguments. */ > static const int tcg_target_reg_alloc_order[] = { > - TCG_REG_R6, > - TCG_REG_R7, > - TCG_REG_R8, > - TCG_REG_R9, > - TCG_REG_R10, > - TCG_REG_R11, > - TCG_REG_R12, > TCG_REG_R13, > + TCG_REG_R12, > + TCG_REG_R11, > + TCG_REG_R10, > + TCG_REG_R9, > + TCG_REG_R8, > + TCG_REG_R7, > + TCG_REG_R6, > TCG_REG_R14, > TCG_REG_R0, > TCG_REG_R1, > - TCG_REG_R2, > - TCG_REG_R3, > - TCG_REG_R4, > TCG_REG_R5, > + TCG_REG_R4, > + TCG_REG_R3, > + TCG_REG_R2, > }; > > static const int tcg_target_call_iarg_regs[] = { > -- > 1.7.0.1 > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net