qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 10/10] tcg/optimize: add constant folding for


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH v2 10/10] tcg/optimize: add constant folding for deposit
Date: Sat, 22 Sep 2012 14:41:55 +0000

On Sat, Sep 22, 2012 at 9:41 AM, Aurelien Jarno <address@hidden> 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...

Better code should always replace bad code.

>>
>
> 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).

No, it's just that bitops were added without converting all possible users.

>
>
> --
> Aurelien Jarno                          GPG: 1024D/F1BCDB73
> address@hidden                 http://www.aurel32.net
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]