From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Cc: Andrzej Zaborowski <balrog@zabor.org>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH 15/18] tcg/arm: remove useless register tests in qemu_ld/st
Date: Wed, 7 Apr 2010 19:51:22 +0200 [thread overview]
Message-ID: <1270662685-7379-16-git-send-email-aurelien@aurel32.net> (raw)
In-Reply-To: <1270662685-7379-1-git-send-email-aurelien@aurel32.net>
addr_reg, data_reg and data_reg2 can't be register r0 or r1 du to the
constraints. Don't check if they equals these registers.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
tcg/arm/tcg-target.c | 30 ++++++++++--------------------
1 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
index 4b414ff..a4419f8 100644
--- a/tcg/arm/tcg-target.c
+++ b/tcg/arm/tcg-target.c
@@ -1030,10 +1030,8 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc)
# if TARGET_LONG_BITS == 32
tcg_out_dat_imm(s, COND_AL, ARITH_MOV, TCG_REG_R1, 0, mem_index);
# else
- if (addr_reg2 != TCG_REG_R1) {
- tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
- TCG_REG_R1, 0, addr_reg2, SHIFT_IMM_LSL(0));
- }
+ tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
+ TCG_REG_R1, 0, addr_reg2, SHIFT_IMM_LSL(0));
tcg_out_dat_imm(s, COND_AL, ARITH_MOV, TCG_REG_R2, 0, mem_index);
# endif
tcg_out_bl(s, COND_AL, (tcg_target_long) qemu_ld_helpers[s_bits] -
@@ -1239,10 +1237,8 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int opc)
tcg_out_b(s, COND_EQ, 8);
/* TODO: move this code to where the constants pool will be */
- if (addr_reg != TCG_REG_R0) {
- tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
- TCG_REG_R0, 0, addr_reg, SHIFT_IMM_LSL(0));
- }
+ tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
+ TCG_REG_R0, 0, addr_reg, SHIFT_IMM_LSL(0));
# if TARGET_LONG_BITS == 32
switch (opc) {
case 0:
@@ -1254,17 +1250,13 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int opc)
tcg_out_dat_imm(s, COND_AL, ARITH_MOV, TCG_REG_R2, 0, mem_index);
break;
case 2:
- if (data_reg != TCG_REG_R1) {
- tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
- TCG_REG_R1, 0, data_reg, SHIFT_IMM_LSL(0));
- }
+ tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
+ TCG_REG_R1, 0, data_reg, SHIFT_IMM_LSL(0));
tcg_out_dat_imm(s, COND_AL, ARITH_MOV, TCG_REG_R2, 0, mem_index);
break;
case 3:
- if (data_reg != TCG_REG_R1) {
- tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
- TCG_REG_R1, 0, data_reg, SHIFT_IMM_LSL(0));
- }
+ tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
+ TCG_REG_R1, 0, data_reg, SHIFT_IMM_LSL(0));
if (data_reg2 != TCG_REG_R2) {
tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
TCG_REG_R2, 0, data_reg2, SHIFT_IMM_LSL(0));
@@ -1273,10 +1265,8 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int opc)
break;
}
# else
- if (addr_reg2 != TCG_REG_R1) {
- tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
- TCG_REG_R1, 0, addr_reg2, SHIFT_IMM_LSL(0));
- }
+ tcg_out_dat_reg(s, COND_AL, ARITH_MOV,
+ TCG_REG_R1, 0, addr_reg2, SHIFT_IMM_LSL(0));
switch (opc) {
case 0:
tcg_out_ext8u(s, COND_AL, TCG_REG_R2, data_reg);
--
1.7.0.4
next prev parent reply other threads:[~2010-04-07 17:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 17:51 [Qemu-devel] [PATCH 0/18] tcg/arm: cleanup and improvements Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 01/18] tcg/arm: remove SAVE_LR code Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 02/18] tcg/arm: explicitely list clobbered/reserved regs Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 03/18] tcg/arm: remove store signed functions Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 04/18] tcg/arm: replace integer values by registers enum Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 05/18] tcg/arm: align 64-bit arguments in function calls Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 06/18] tcg/arm: add defines for the allowed instructions set Aurelien Jarno
2010-04-08 13:46 ` Paul Brook
2010-04-08 16:46 ` Richard Henderson
2010-04-07 17:51 ` [Qemu-devel] [PATCH 07/18] tcg/arm: sxtb and sxth are available starting with ARMv6 Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 08/18] tcg/arm: use the blx instruction when possible Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 09/18] tcg/arm: add rotation ops Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 10/18] tcg/arm: add ext16u op Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 11/18] tcg/arm: add bswap ops Aurelien Jarno
2010-04-08 23:32 ` Paul Brook
2010-04-09 17:11 ` Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 12/18] tcg/arm: remove conditional argument for qemu_ld/st Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 13/18] tcg/arm: use ext* ops in qemu_ld Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 14/18] tcg/arm: bswap arguments in qemu_ld/st if needed Aurelien Jarno
2010-04-07 17:51 ` Aurelien Jarno [this message]
2010-04-07 17:51 ` [Qemu-devel] [PATCH 16/18] tcg/arm: fix argument alignment in qemu_st64 Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 17/18] tcg/arm: optimize register allocation order Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 18/18] tcg/arm: don't try to load constants using pc Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1270662685-7379-16-git-send-email-aurelien@aurel32.net \
--to=aurelien@aurel32.net \
--cc=balrog@zabor.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).