From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzPCQ-0004VG-B2 for qemu-devel@nongnu.org; Fri, 12 Dec 2014 07:20:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzPCK-00034w-0q for qemu-devel@nongnu.org; Fri, 12 Dec 2014 07:19:58 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:48612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzPCJ-00033N-QC for qemu-devel@nongnu.org; Fri, 12 Dec 2014 07:19:51 -0500 Message-ID: <548ADD62.9030009@imgtec.com> Date: Fri, 12 Dec 2014 12:19:46 +0000 From: Leon Alrae MIME-Version: 1.0 References: <548090D5.3080805@imgtec.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-mips: Correct 32-bit address space wrapping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Maciej W. Rozycki" Cc: qemu-devel@nongnu.org, Aurelien Jarno On 05/12/2014 18:55, Maciej W. Rozycki wrote: > On Thu, 4 Dec 2014, Leon Alrae wrote: > >>> Index: qemu-git-trunk/target-mips/translate.c >>> =================================================================== >>> --- qemu-git-trunk.orig/target-mips/translate.c 2014-11-12 07:41:26.597542010 +0000 >>> +++ qemu-git-trunk/target-mips/translate.c 2014-11-12 07:41:26.597542010 +0000 >>> @@ -10724,6 +10724,7 @@ static void gen_mips16_save (DisasContex >>> { >>> TCGv t0 = tcg_temp_new(); >>> TCGv t1 = tcg_temp_new(); >>> + TCGv t2 = tcg_temp_new(); >>> int args, astatic; >>> >>> switch (aregs) { >>> @@ -10782,7 +10783,8 @@ static void gen_mips16_save (DisasContex >>> gen_load_gpr(t0, 29); >>> >>> #define DECR_AND_STORE(reg) do { \ >>> - tcg_gen_subi_tl(t0, t0, 4); \ >>> + tcg_gen_movi_tl(t2, -4); \ >> >> Wouldn't it be better to move this line outside of the macro to avoid >> generating unnecessary tcg ops? DECR_AND_STORE is called multiple times >> and t2 doesn't change in-between. > > It would. This code isn't wrong though unlike our current version, > this is merely a pessimisation. An update will require a costly > regression test rerun and therefore I'll give the priority to the > outstanding changes I have before going back to this change. Thanks for > the tip and your review. Since above issue is minor we can correct it with incremental patch later. I applied all the patches (excluding two patches touching machine.c) which were sent prior to IEEE 754-2008 series to mips-next branch, thanks. I'm intending to send out mips-next branch next week. Regards, Leon