On 9/24/20 10:18 AM, Taylor Simpson wrote:
>> You've got a script generating stuff.  It can just as easily generate two
>> different lists.  You're trying to do too much with the C preprocessor and 
>> too
>> little with python.
> 
> Sure, generating two lists was also suggested by Alessandro (a...@rev.ng).  
> Although doing more in python and less with the C preprocessor would lead to 
> the conclusion we shouldn't define the function prototype in a macro.  If we 
> generate two lists, what is the advantage of putting the function signature 
> in a macro vs generating?

None, because...

>> At some point in the v3 thread, I had suggested grepping for some macro in
>> order to indicate to the python script which tags are implemented manually.
>> My
>> definition above is easy to look for: exactly one thing on the line, easy
>> regexp.
> 
> This is already done as well.  As you may recall, we were previously 
> generating
>     #ifdef fGEN_TCG_A2_add
>     fGEN_TCG_A2_add({ RdV=RsV+RtV;});
>     #else
>     do {
>     gen_helper_A2_add(RdV, cpu_env, RsV, RtV);
>     } while (0);
> 
> The generator now searches for "#define fGEN_TCG_<tag>" ...

... I'd forgotten that they were two different macros.

> Also, if it finds the override, it doesn't generate the DEF_HELPER or the 
> helper function.  That means we don't include tcg_gen.h in helper.h as you 
> suggested.

Excellent.


r~

Reply via email to