From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFMD3-0007Yf-0k for qemu-devel@nongnu.org; Sat, 22 Sep 2012 05:41:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFMCy-0003Zw-TC for qemu-devel@nongnu.org; Sat, 22 Sep 2012 05:41:12 -0400 Received: from hall.aurel32.net ([88.191.126.93]:37138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFMCy-0003Za-Km for qemu-devel@nongnu.org; Sat, 22 Sep 2012 05:41:08 -0400 Date: Sat, 22 Sep 2012 11:41:05 +0200 From: Aurelien Jarno Message-ID: <20120922094105.GD23250@ohm.aurel32.net> References: <1348256598-8146-1-git-send-email-aurelien@aurel32.net> <1348256598-8146-11-git-send-email-aurelien@aurel32.net> <505CF6CD.5000501@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <505CF6CD.5000501@twiddle.net> Subject: Re: [Qemu-devel] [PATCH v2 10/10] tcg/optimize: add constant folding for deposit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Fri, Sep 21, 2012 at 04:22:53PM -0700, Richard Henderson wrote: > On 09/21/2012 12:43 PM, Aurelien Jarno wrote: > > + tmp = ((1ull << args[4]) - 1); > > + tmp = (temps[args[1]].val & ~(tmp << args[3])) > > + | ((temps[args[2]].val & tmp) << args[3]); > > + tcg_opt_gen_movi(gen_args, args[0], tmp); > > We do have a deposit64 function in bitops.h, fwiw. > > Though, really, bitops.h has some crappy functions in it that are > redundant with the better functions in host-utils.h... > Is there a reason that bitops.h is not used from tcg/*, while host-utils.h is? Licensing issue maybe (bitops.h is LGPL, host-utils.h is BSD like). -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net