From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59858 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Phm4w-0005OX-Ou for qemu-devel@nongnu.org; Tue, 25 Jan 2011 11:49:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Phm46-0004px-8x for qemu-devel@nongnu.org; Tue, 25 Jan 2011 11:49:12 -0500 Received: from mail-ey0-f173.google.com ([209.85.215.173]:44040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Phm46-0004pf-1k for qemu-devel@nongnu.org; Tue, 25 Jan 2011 11:48:22 -0500 Received: by eyg7 with SMTP id 7so2843238eyg.4 for ; Tue, 25 Jan 2011 08:48:21 -0800 (PST) Date: Tue, 25 Jan 2011 17:48:16 +0100 From: "Edgar E. Iglesias" Subject: Re: [Qemu-devel] [PATCH 5/7] tcg-i386: Implement deposit operation. Message-ID: <20110125164816.GA23569@laped.lan> References: <1294716228-9299-1-git-send-email-rth@twiddle.net> <1294716228-9299-6-git-send-email-rth@twiddle.net> <20110125122749.GA19736@edde.se.axis.com> <4D3EF6C1.3080502@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D3EF6C1.3080502@twiddle.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, aurelien@aurel32.net, agraf@suse.de On Tue, Jan 25, 2011 at 08:13:53AM -0800, Richard Henderson wrote: > On 01/25/2011 04:27 AM, Edgar E. Iglesias wrote: > > I've tested this patch a bit and got mixed results. I tested with patched > > CRIS and MicroBlaze translators. The patch works OK (it doesn't break > > anything) for the usecases I had but I saw a bit of a slowdown with > > MicroBlaze (compare to not using deposit at all). > > > > I suspect that the fast 8 and 16 bit x86 deposits are giving me a slight > > speedup with CRIS. But MicroBlaze uses one bit fields into bit 2 and > > 31. Those seem to be slower with deposit than with other tcg sequences. > > > > I would have guessed that at worst, this patch would be equally fast > > as any TCG sequence. Am I missing something? > > With or without the i386 tcg-target.c changes? > > If without, then I'm stumped, since it looks like identical tcg ops > being emitted. It's with the tcg-target patch. > It with, then perhaps SHLD is slower than I thought. I see that GCC > lists this insn as "vector decoded" for AMD cores, as opposed to > "direct decoded". If this insn is indeed microcoded on some hosts > then maybe the i386 tcg-target patch isn't such a great idea. OK, I see. Maybe we should try to emit an insn sequence more similar to what tcg was emitting (for the non 8 & 16-bit deposits)? That ought too at least give similar results as before for those and give us a speedup for the byte and word moves. > That said, there are still other tcg targets which support this > operation directly. I would be shocked if you measured a slowdown > with these changes on a ppc host, for instance. Yep, agreed. Cheers