From patchwork Thu May 27 20:45:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 53800 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 0A3B8B7D1B for ; Fri, 28 May 2010 07:13:57 +1000 (EST) Received: from localhost ([127.0.0.1]:49493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHkNi-0005wj-Lb for incoming@patchwork.ozlabs.org; Thu, 27 May 2010 17:12:46 -0400 Received: from [140.186.70.92] (port=38002 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHjyr-0001sv-D4 for qemu-devel@nongnu.org; Thu, 27 May 2010 16:47:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHjyq-0005F6-9v for qemu-devel@nongnu.org; Thu, 27 May 2010 16:47:05 -0400 Received: from are.twiddle.net ([75.149.56.221]:51181) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjyq-0005F0-4z for qemu-devel@nongnu.org; Thu, 27 May 2010 16:47:04 -0400 Received: from anchor.twiddle.home (anchor.twiddle.home [172.31.0.4]) by are.twiddle.net (Postfix) with ESMTPS id 95BB647E; Thu, 27 May 2010 13:47:03 -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 o4RKl3vd030885; Thu, 27 May 2010 13:47:03 -0700 Received: (from rth@localhost) by anchor.twiddle.home (8.14.4/8.14.4/Submit) id o4RKl2l0030884; Thu, 27 May 2010 13:47:02 -0700 From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 May 2010 13:45:54 -0700 Message-Id: <1274993204-30766-13-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 12/62] tcg-s390: Eliminate the S constraint. 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 R4 is not clobbered until all of the inputs are consumed, so there's no need to avoid R4 in the qemu_st paths. Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.c | 30 ++++++------------------------ 1 files changed, 6 insertions(+), 24 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index 455cf6a..2f29728 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -202,20 +202,6 @@ static int tcg_target_get_call_iarg_regs_count(int flags) return sizeof(tcg_target_call_iarg_regs) / sizeof(int); } -static void constraint_softmmu(TCGArgConstraint *ct, const char c) -{ -#ifdef CONFIG_SOFTMMU - switch (c) { - case 'S': /* qemu_st constraint */ - tcg_regset_reset_reg (ct->u.regs, TCG_REG_R4); - /* fall through */ - case 'L': /* qemu_ld constraint */ - tcg_regset_reset_reg (ct->u.regs, TCG_REG_R3); - break; - } -#endif - } - /* parse target specific constraints */ static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str) { @@ -226,13 +212,9 @@ static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str) ct_str = *pct_str; switch (ct_str[0]) { - case 'L': /* qemu_ld constraint */ + case 'L': /* qemu_ld/st constraint */ tcg_regset_reset_reg (ct->u.regs, TCG_REG_R2); - constraint_softmmu(ct, 'L'); - break; - case 'S': /* qemu_st constraint */ - tcg_regset_reset_reg (ct->u.regs, TCG_REG_R2); - constraint_softmmu(ct, 'S'); + tcg_regset_reset_reg (ct->u.regs, TCG_REG_R3); break; case 'R': /* not R0 */ tcg_regset_reset_reg(ct->u.regs, TCG_REG_R0); @@ -1239,9 +1221,9 @@ do_logic_i64: { INDEX_op_qemu_ld32u, { "r", "L" } }, { INDEX_op_qemu_ld32s, { "r", "L" } }, - { INDEX_op_qemu_st8, { "S", "S" } }, - { INDEX_op_qemu_st16, { "S", "S" } }, - { INDEX_op_qemu_st32, { "S", "S" } }, + { INDEX_op_qemu_st8, { "L", "L" } }, + { INDEX_op_qemu_st16, { "L", "L" } }, + { INDEX_op_qemu_st32, { "L", "L" } }, #if defined(__s390x__) { INDEX_op_mov_i64, { "r", "r" } }, @@ -1261,7 +1243,7 @@ do_logic_i64: { INDEX_op_st_i64, { "r", "r" } }, { INDEX_op_qemu_ld64, { "L", "L" } }, - { INDEX_op_qemu_st64, { "S", "S" } }, + { INDEX_op_qemu_st64, { "L", "L" } }, { INDEX_op_add_i64, { "r", "r", "r" } }, { INDEX_op_mul_i64, { "r", "r", "r" } },