From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50134 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ON9ix-0008Hy-3h for qemu-devel@nongnu.org; Fri, 11 Jun 2010 15:17:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ON9iv-0006iv-HZ for qemu-devel@nongnu.org; Fri, 11 Jun 2010 15:17:03 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:57715) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ON9iv-0006ih-8h for qemu-devel@nongnu.org; Fri, 11 Jun 2010 15:17:01 -0400 From: Paul Brook Date: Fri, 11 Jun 2010 20:15:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201006112015.56847.paul@codesourcery.com> Subject: [Qemu-devel] [PATCH, applied] NEON vldN optimization List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org When combining multiple values as part of a NEON array load, do explcit shift/or rather than using gen_bfi. This voids redundant mask operations. Signed-off-by: Paul Brook --- target-arm/translate.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 0eccca5..11ff055 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -3854,7 +3854,8 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn) tcg_gen_addi_i32(addr, addr, stride); tmp2 = gen_ld16u(addr, IS_USER(s)); tcg_gen_addi_i32(addr, addr, stride); - gen_bfi(tmp, tmp, tmp2, 16, 0xffff); + tcg_gen_shli_i32(tmp2, tmp, 16); + tcg_gen_or_i32(tmp, tmp, tmp2); dead_tmp(tmp2); neon_store_reg(rd, pass, tmp); } else { @@ -3875,7 +3876,8 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn) if (n == 0) { tmp2 = tmp; } else { - gen_bfi(tmp2, tmp2, tmp, n * 8, 0xff); + tcg_gen_shli_i32(tmp, tmp, n * 8); + tcg_gen_or_i32(tmp2, tmp2, tmp); dead_tmp(tmp); } } -- 1.7.1