From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R92uZ-0005PL-VZ for qemu-devel@nongnu.org; Wed, 28 Sep 2011 18:47:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R92uT-0006yY-RQ for qemu-devel@nongnu.org; Wed, 28 Sep 2011 18:47:31 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:42410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R92uT-0006xV-Ib for qemu-devel@nongnu.org; Wed, 28 Sep 2011 18:47:25 -0400 Received: by wyh22 with SMTP id 22so590141wyh.4 for ; Wed, 28 Sep 2011 15:47:24 -0700 (PDT) Sender: Richard Henderson Message-ID: <4E83A3F7.3000508@twiddle.net> Date: Wed, 28 Sep 2011 15:47:19 -0700 From: Richard Henderson MIME-Version: 1.0 References: <4E8312D7.4080403@siemens.com> <4E832E88.6080909@twiddle.net> <4E83304F.4010008@siemens.com> <4E833AEA.8080508@twiddle.net> <4E839A88.4060003@web.de> In-Reply-To: <4E839A88.4060003@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tcg-i386: Introduce specific deposit helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Blue Swirl , qemu-devel , Aurelien Jarno On 09/28/2011 03:07 PM, Jan Kiszka wrote: > On 2011-09-28 17:19, Richard Henderson wrote: >> On 09/28/2011 07:33 AM, Jan Kiszka wrote: >>>> I don't particularly care for the 3 different opcodes. Perhaps >>>> we'd be better off with an inline predicate for when the deposit >>>> opcode is "valid"? >>> >>> We still need to dispatch at tcg generation time which variant is valid. Or what do you have in mind? >> >> Yes, but we'd know at tcg generation time that it *does* fit one of >> the few patterns you point out. >> >> The predicate would be used in e.g. tcg_gen_deposit_i32 to select >> either INDEX_op_deposit_i32 or the and/shift/and/or fallback. > > I think I'm slowly starting to understand: > > #define TCG_TARGET_HAS_deposit_i32(ofs, len) \ > (((ofs) == 0 && (len) == 8 && TCG_TARGET_HAS_deposit8l_i32) || \ > ...) > > defined by the i386 tcg target, right? Something like that. Except without the TCG_TARGET_HAS_deposit8l_i32. r~