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 From: Richard Henderson Date: Thu, 27 May 2010 13:45:54 -0700 Message-Id: <1274993204-30766-13-git-send-email-rth@twiddle.net> In-Reply-To: <1274993204-30766-1-git-send-email-rth@twiddle.net> References: <1274993204-30766-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 12/62] tcg-s390: Eliminate the S constraint. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: agraf@suse.de, aurelien@aurel32.net 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" } }, -- 1.7.0.1