From patchwork Thu May 27 20:46:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 53821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A7488B7D1F for ; Fri, 28 May 2010 07:50:08 +1000 (EST) Received: from localhost ([127.0.0.1]:42096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHkwZ-00034K-6a for incoming@patchwork.ozlabs.org; Thu, 27 May 2010 17:48:47 -0400 Received: from [140.186.70.92] (port=56226 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHjzQ-0002Do-OG for qemu-devel@nongnu.org; Thu, 27 May 2010 16:47:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHjzP-0005Pl-GN for qemu-devel@nongnu.org; Thu, 27 May 2010 16:47:40 -0400 Received: from are.twiddle.net ([75.149.56.221]:51243) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjzP-0005Pg-6R for qemu-devel@nongnu.org; Thu, 27 May 2010 16:47:39 -0400 Received: from anchor.twiddle.home (anchor.twiddle.home [172.31.0.4]) by are.twiddle.net (Postfix) with ESMTPS id 924EB47E; Thu, 27 May 2010 13:47:38 -0700 (PDT) Received: from anchor.twiddle.home (anchor.twiddle.home [127.0.0.1]) by anchor.twiddle.home (8.14.4/8.14.4) with ESMTP id o4RKlcq6030989; Thu, 27 May 2010 13:47:38 -0700 Received: (from rth@localhost) by anchor.twiddle.home (8.14.4/8.14.4/Submit) id o4RKlbTJ030988; Thu, 27 May 2010 13:47:37 -0700 From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 May 2010 13:46:20 -0700 Message-Id: <1274993204-30766-39-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.0.1 In-Reply-To: <1274993204-30766-1-git-send-email-rth@twiddle.net> References: <1274993204-30766-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: agraf@suse.de, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 38/62] tcg-s390: Tidy regset initialization; use R14 as temporary. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.c | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index ee2e879..a26c963 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -36,7 +36,7 @@ #define TCG_CT_CONST_S32 0x100 #define TCG_CT_CONST_N32 0x200 -#define TCG_TMP0 TCG_REG_R13 +#define TCG_TMP0 TCG_REG_R14 /* All of the following instructions are prefixed with their instruction @@ -1630,24 +1630,22 @@ void tcg_target_init(TCGContext *s) tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffff); tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffff); - tcg_regset_set32(tcg_target_call_clobber_regs, 0, - (1 << TCG_REG_R0) | - (1 << TCG_REG_R1) | - (1 << TCG_REG_R2) | - (1 << TCG_REG_R3) | - (1 << TCG_REG_R4) | - (1 << TCG_REG_R5) | - (1 << TCG_REG_R14)); /* link register */ + + tcg_regset_clear(tcg_target_call_clobber_regs); + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R0); + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R1); + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R2); + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R3); + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R4); + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R5); + /* The return register can be considered call-clobbered. */ + tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R14); tcg_regset_clear(s->reserved_regs); - /* frequently used as a temporary */ tcg_regset_set_reg(s->reserved_regs, TCG_TMP0); - /* another temporary */ - tcg_regset_set_reg(s->reserved_regs, TCG_REG_R12); /* XXX many insns can't be used with R0, so we better avoid it for now */ tcg_regset_set_reg(s->reserved_regs, TCG_REG_R0); - /* The stack pointer. */ - tcg_regset_set_reg(s->reserved_regs, TCG_REG_R15); + tcg_regset_set_reg(s->reserved_regs, TCG_REG_CALL_STACK); tcg_add_target_add_op_defs(s390_op_defs); }