qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v3 30/34] Hexagon (target/hexagon) TCG for instructions w


From: Richard Henderson
Subject: Re: [RFC PATCH v3 30/34] Hexagon (target/hexagon) TCG for instructions with multiple definitions
Date: Thu, 24 Sep 2020 12:04:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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 (ale@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

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