qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] RFC: TCG constant propagation.


From: Filip Navara
Subject: Re: [Qemu-devel] [PATCH] RFC: TCG constant propagation.
Date: Thu, 23 Jul 2009 11:49:18 +0200

On Thu, Jul 23, 2009 at 11:25 AM, Laurent
Desnogues<address@hidden> wrote:
> On Thu, Jul 23, 2009 at 11:08 AM, Filip Navara<address@hidden> wrote:
>> Also it looks that the actual code size is worse for TCG ARM target
>> with this optimization. To mitigate it I propose the other attached
>> patch which uses the barrel shifter for more optimal generation of the
>> "movi" operation. I can't test it, so any help is welcome.
>
> This is wrong for two reasons:
>   - this is a rotation, you only check for shifts

I deliberately didn't do it, but it's surely an opportunity for
further optimization.

>   - the rotation amount is multiplied by 2 before being applied to the
>     8-bit immediate field.

As Paul already pointed out, that's compensated by the shift (<< 7
instead of << 8) and the "& ~1" after ctz32 call.

Attached is fixed version of the patch, I forgot one "return" there.

Best regards,
Filip Navara

Attachment: 0002-Use-ARM-barrel-shifter-for-more-optimal-generation-o.patch
Description: Binary data


reply via email to

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