Received: from eggs.gnu.org ([140.186.70.92]:41541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKiqg-0005GJ-EA for qemu-devel@nongnu.org; Sun, 30 Oct 2011 23:47:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKiqf-0002lN-BE for qemu-devel@nongnu.org; Sun, 30 Oct 2011 23:47:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:46655 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKiqf-0002lA-2I for qemu-devel@nongnu.org; Sun, 30 Oct 2011 23:47:45 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <1319750100-7592-1-git-send-email-rth@twiddle.net> Date: Mon, 31 Oct 2011 04:47:41 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <692CD445-C467-4250-B43A-528CC2B80070@suse.de> References: <1319750100-7592-1-git-send-email-rth@twiddle.net> Subject: Re: [Qemu-devel] [PATCH] tcg: Optimize some forms of deposit. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Blue Swirl , qemu-devel Developers On 27.10.2011, at 23:15, Richard Henderson wrote: > If the deposit replaces the entire word, optimize to a move. >=20 > If we're inserting to the top of the word, avoid the mask of arg2 > as we'll be shifting out all of the garbage and shifting in zeros. >=20 > If the host is 32-bit, reduce a 64-bit deposit to a 32-bit deposit > when possible. This patch breaks qemu-system-ppc64 on ppc32 hosts: IN:=20 0x00000000fff08618: mfmsr r0 0x00000000fff0861c: ori r0,r0,48 0x00000000fff08620: mtmsr r0 OP: ---- 0xfff08618 mov_i32 r0_0,msr_0 mov_i32 r0_1,msr_1 ---- 0xfff0861c movi_i32 tmp0,$0x30 or_i32 r0_0,r0_0,tmp0 ---- 0xfff08620 movi_i32 nip_0,$0xfff08624 movi_i32 nip_1,$0x0 mov_i32 tmp1,r0_0 movi_i32 tmp0,$store_msr call tmp0,$0x0,$0,tmp2,tmp1 movi_i32 nip_0,$0xfff08624 movi_i32 nip_1,$0x0 exit_tb $0x0 OP after liveness analysis: ---- 0xfff08618 mov_i32 r0_0,msr_0 mov_i32 r0_1,msr_1 ---- 0xfff0861c movi_i32 tmp0,$0x30 or_i32 r0_0,r0_0,tmp0 ---- 0xfff08620 movi_i32 nip_0,$0xfff08624 movi_i32 nip_1,$0x0 mov_i32 tmp1,r0_0 movi_i32 tmp0,$store_msr call tmp0,$0x0,$0,tmp2,tmp1 movi_i32 nip_0,$0xfff08624 movi_i32 nip_1,$0x0 exit_tb $0x0 end=20 agraf@lychee:/home/agraf/release/qemu> ./ppc64-softmmu/qemu-system-ppc64 = -kernel /boot/vmlinux -initrd /boot/initrd -nographic -d = in_asm,cpu,int,op,op_opt,out_asm /home/agraf/release/qemu/tcg/tcg.c:1929: tcg fatal error Aborted Alex