Received: from [140.186.70.92] (port=34288 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEnD8-0004VV-DQ for qemu-devel@nongnu.org; Wed, 19 May 2010 13:37:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEnD6-00028Y-TK for qemu-devel@nongnu.org; Wed, 19 May 2010 13:37:38 -0400 Received: from hall.aurel32.net ([88.191.82.174]:36872) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEnD6-00027p-92 for qemu-devel@nongnu.org; Wed, 19 May 2010 13:37:36 -0400 Date: Wed, 19 May 2010 08:46:44 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 02/22] tcg-i386: Tidy initialization of tcg_target_call_clobber_regs. Message-ID: <20100519064644.GB7242@ohm.aurel32.net> References: <6fd466d920f00ec7ea42dcc43c8c2f0e9f99eaf2.1272479073.git.rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <6fd466d920f00ec7ea42dcc43c8c2f0e9f99eaf2.1272479073.git.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 On Tue, Apr 13, 2010 at 03:26:17PM -0700, Richard Henderson wrote: > Setting the registers one by one is easier to read, and gets > optimized by the compiler just the same. > > Signed-off-by: Richard Henderson > --- > tcg/i386/tcg-target.c | 11 ++++++----- > 1 files changed, 6 insertions(+), 5 deletions(-) Thanks, applied. > diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c > index f5c24f7..359f81b 100644 > --- a/tcg/i386/tcg-target.c > +++ b/tcg/i386/tcg-target.c > @@ -1365,11 +1365,12 @@ void tcg_target_init(TCGContext *s) > #endif > > tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xff); > - tcg_regset_set32(tcg_target_call_clobber_regs, 0, > - (1 << TCG_REG_EAX) | > - (1 << TCG_REG_EDX) | > - (1 << TCG_REG_ECX)); > - > + > + tcg_regset_clear(tcg_target_call_clobber_regs); > + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_EAX); > + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_EDX); > + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_ECX); > + > tcg_regset_clear(s->reserved_regs); > tcg_regset_set_reg(s->reserved_regs, TCG_REG_ESP); > > -- > 1.6.6.1 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net