Skip to contentSkip to conversation

tcg/arm: Use tcg_out_mov_reg rather than inline equivalent code

PATCH Applied Peter Maydell 3 participants 3 messages Sep 27, 2012 – Oct 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg/arm: Use tcg_out_mov_reg rather than inline equivalent code

Use the recently introduced tcg_out_mov_reg() function rather than the equivalent inline code.

---
This is a minor follow-on cleanup patch after commit 9716ef3b1.

 tcg/arm/tcg-target.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
tcg/arm/tcg-target.c +3 -12
index 2bad0a2..5e8dbdd 100644
@@ -1197,20 +1197,11 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc)
     case 1:
     case 2:
     default:
-        if (data_reg != TCG_REG_R0) {
-            tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
-                            data_reg, 0, TCG_REG_R0, SHIFT_IMM_LSL(0));
-        }
+        tcg_out_mov_reg(s, COND_AL, data_reg, TCG_REG_R0);
         break;
     case 3:
-        if (data_reg != TCG_REG_R0) {
-            tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
-                            data_reg, 0, TCG_REG_R0, SHIFT_IMM_LSL(0));
-        }
-        if (data_reg2 != TCG_REG_R1) {
-            tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
-                            data_reg2, 0, TCG_REG_R1, SHIFT_IMM_LSL(0));
-        }
+        tcg_out_mov_reg(s, COND_AL, data_reg, TCG_REG_R0);
+        tcg_out_mov_reg(s, COND_AL, data_reg2, TCG_REG_R1);
         break;
     }
 
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 27 lines · Peter Maydell

Use the recently introduced tcg_out_mov_reg() function rather than the equivalent inline code.

---
This is a minor follow-on cleanup patch after commit 9716ef3b1.

 tcg/arm/tcg-target.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
tcg/arm/tcg-target.c +1 -6
index 2bad0a2..5e8dbdd 100644
@@ -1197,20 +1197,11 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc)
     case 1:
     case 2:
     default:
-        if (data_reg != TCG_REG_R0) {
-            tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
-                            data_reg, 0, TCG_REG_R0, SHIFT_IMM_LSL(0));
-        }
+        tcg_out_mov_reg(s, COND_AL, data_reg, TCG_REG_R0);
         break;
     case 3:
-        if (data_reg != TCG_REG_R0) {
-            tcg_out_dat_reg(s, COND_AL, ARITH_MOV,

tcg/arm/tcg-target.c static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc) · line 1206

Quoted 10 lines
tcg/arm/tcg-target.c +2 -6
-                            data_reg, 0, TCG_REG_R0, SHIFT_IMM_LSL(0));
-        }
-        if (data_reg2 != TCG_REG_R1) {
-            tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
-                            data_reg2, 0, TCG_REG_R1, SHIFT_IMM_LSL(0));
-        }
+        tcg_out_mov_reg(s, COND_AL, data_reg, TCG_REG_R0);
+        tcg_out_mov_reg(s, COND_AL, data_reg2, TCG_REG_R1);
         break;
     }
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net
#2 lore raw
In reply to Peter Maydell
Quoted 9 lines · Peter Maydell

Use the recently introduced tcg_out_mov_reg() function rather than the equivalent inline code.

---
This is a minor follow-on cleanup patch after commit 9716ef3b1.

 tcg/arm/tcg-target.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan