From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFCYi-0008FX-IC for qemu-devel@nongnu.org; Fri, 21 Sep 2012 19:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFCYh-00006P-OD for qemu-devel@nongnu.org; Fri, 21 Sep 2012 19:22:56 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:61423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFCYh-00005r-GY for qemu-devel@nongnu.org; Fri, 21 Sep 2012 19:22:55 -0400 Received: by pbbrp12 with SMTP id rp12so8674831pbb.4 for ; Fri, 21 Sep 2012 16:22:54 -0700 (PDT) Sender: Richard Henderson Message-ID: <505CF6CD.5000501@twiddle.net> Date: Fri, 21 Sep 2012 16:22:53 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1348256598-8146-1-git-send-email-aurelien@aurel32.net> <1348256598-8146-11-git-send-email-aurelien@aurel32.net> In-Reply-To: <1348256598-8146-11-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Aurelien Jarno Cc: qemu-devel@nongnu.org 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... r~