Le 12/08/2015 23:19, Richard Henderson a écrit : > On 08/12/2015 01:56 PM, Laurent Vivier wrote: >>>> -DEF_HELPER_2(flush_flags, void, env, i32) >>>> +DEF_HELPER_2(flush_flags, i32, env, i32) >>> >>> Modify to use DEF_HELPER_FLAGS while you're at it. At the moment it >>> reads some globals, but doesn't write any, or have any other side >>> effects. >> >> It writes "env->cc_x", so I guess I can't use DEF_HELPER_FLAGS ? > > Ah, missed that. So, no, not usefully. > >>> That const needs to be freed. >> >> perhaps I'm wrong, what I had understood is: >> >> tcg_const_i32() creates a tcg_temp_new_i32(), and tcg_temp_new_i32() are >> automatically freed at end of tcg block (whereas tcg_const_local adn >> tcg_temp_local are not). > > They are freed at the end of a basic block. But the total number of > temps affects the speed of the tcg code generator. So you can improve > the speed of qemu by freeing temporaries that are no longer needed.
OK, thank you. I was wondering if it is useful to free temp or not... Laurent