diff mbox

[12/62] tcg-s390: Eliminate the S constraint.

Message ID 1274993204-30766-13-git-send-email-rth@twiddle.net
State New
Headers show

Commit Message

Richard Henderson May 27, 2010, 8:45 p.m. UTC
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 <rth@twiddle.net>
---
 tcg/s390/tcg-target.c |   30 ++++++------------------------
 1 files changed, 6 insertions(+), 24 deletions(-)
diff mbox

Patch

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" } },