qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Arm emulation tweak


From: Filip Navara
Subject: Re: [Qemu-devel] Arm emulation tweak
Date: Wed, 19 Aug 2009 11:46:11 +0200

On Tue, Aug 18, 2009 at 6:14 PM, Jamie Lokier<address@hidden> wrote:
> Nigel Horne wrote:
>> This small patch reduces (on my machine) the call to new_tmp by 16
>> bytes, which may not sound much, but it's called so often that it makes
>> a nice speed up of Arm emulation:
>
>>      if (GET_TCGV_I32(temps[num_temps]))
>>        return temps[num_temps++];
>>
>> !     tmp = tcg_temp_new_i32();
>> !     temps[num_temps++] = tmp;
>> !     return tmp;
>>  }
>
> becomes
>
>>      if (GET_TCGV_I32(temps[num_temps]))
>>        return temps[num_temps++];
>>
>> !     return temps[num_temps++] = tcg_temp_new_i32();
>>  }
>
> That's pretty tragic if GCC fails to compile them to identical code,
> assuming you had optimisation turned on.
>
> Have you tried building with -Os, -O2 etc. to see if that makes a
> difference?
>
> Which GCC version are you using?
>
> -- Jamie
>

BTW, I have even better optimizations for this code at
git://repo.or.cz/qemu/navara.git. These functions are no longer needed
in the form as they appear in the source code today, since TCG has
evolved.

F.




reply via email to

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