From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFP5V-0000ja-8T for qemu-devel@nongnu.org; Sat, 22 Sep 2012 08:45:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFP5U-0008Si-7O for qemu-devel@nongnu.org; Sat, 22 Sep 2012 08:45:37 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:57184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFP5U-0008Se-1j for qemu-devel@nongnu.org; Sat, 22 Sep 2012 08:45:36 -0400 Received: by padfb10 with SMTP id fb10so732234pad.4 for ; Sat, 22 Sep 2012 05:45:35 -0700 (PDT) Sender: Richard Henderson Message-ID: <505DB2F4.2020900@twiddle.net> Date: Sat, 22 Sep 2012 05:45:40 -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> <505CF6CD.5000501@twiddle.net> <20120922094105.GD23250@ohm.aurel32.net> In-Reply-To: <20120922094105.GD23250@ohm.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 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 2012-09-22 02:41, Aurelien Jarno wrote: > 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). I assumed without looking that bitops.h is newer. r~