From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1fc7-0000nc-Ce for qemu-devel@nongnu.org; Sat, 24 Oct 2009 08:20:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1fc2-0000ki-No for qemu-devel@nongnu.org; Sat, 24 Oct 2009 08:20:54 -0400 Received: from [199.232.76.173] (port=54425 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1fc2-0000kd-KY for qemu-devel@nongnu.org; Sat, 24 Oct 2009 08:20:50 -0400 Received: from smtp.nokia.com ([192.100.105.134]:50615 helo=mgw-mx09.nokia.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N1fc2-0004Xb-66 for qemu-devel@nongnu.org; Sat, 24 Oct 2009 08:20:50 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9OCJC9i008660 for ; Sat, 24 Oct 2009 07:20:48 -0500 Received: from localhost.localdomain (essapo-nirac252105.europe.nokia.com [10.162.252.105]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9OCJ8qA022164 for ; Sat, 24 Oct 2009 15:19:14 +0300 From: juha.riihimaki@nokia.com Date: Sat, 24 Oct 2009 15:19:03 +0300 Message-Id: <1256386749-85299-5-git-send-email-juha.riihimaki@nokia.com> In-Reply-To: <1256386749-85299-1-git-send-email-juha.riihimaki@nokia.com> References: <1256386749-85299-1-git-send-email-juha.riihimaki@nokia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 04/10] target-arm: optimize vfp load/store multiple ops List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Juha Riihim=C3=A4ki VFP load/store multiple instructions can be slightly optimized by loading the register offset constant into a variable outside the register loop and using the preloaded variable inside the loop instead of reloading the offset value to a temporary variable on each loop iteration. This causes less TCG ops to be generated for a VFP load/ store multiple instruction if there are more than one register accessed, otherwise the amount of generated TCG ops is the same. Signed-off-by: Juha Riihim=C3=A4ki --- target-arm/translate.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 8cb1c0f..38fb833 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -3222,6 +3222,7 @@ static int disas_vfp_insn(CPUState * env, DisasCont= ext *s, uint32_t insn) offset =3D 8; else offset =3D 4; + tmp =3D tcg_const_i32(offset); for (i =3D 0; i < n; i++) { if (insn & ARM_CP_RW_BIT) { /* load */ @@ -3232,8 +3233,9 @@ static int disas_vfp_insn(CPUState * env, DisasCont= ext *s, uint32_t insn) gen_mov_F0_vreg(dp, rd + i); gen_vfp_st(s, dp, addr); } - tcg_gen_addi_i32(addr, addr, offset); + tcg_gen_add_i32(addr, addr, tmp); } + tcg_temp_free_i32(tmp); if (insn & (1 << 21)) { /* writeback */ if (insn & (1 << 24)) --=20 1.6.5