[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 28/34] Hexagon (target/hexagon) TCG generation helpers
From: |
Richard Henderson |
Subject: |
Re: [RFC PATCH v3 28/34] Hexagon (target/hexagon) TCG generation helpers |
Date: |
Sun, 30 Aug 2020 13:52:16 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 8/30/20 12:53 PM, Taylor Simpson wrote:
>>> +++ b/target/hexagon/genptr_helpers.h
>>> @@ -0,0 +1,244 @@
>>> +
>>> +static inline void gen_log_reg_write(int rnum, TCGv val, int slot,
>>> + int is_predicated)
>>
>> These are quite large. Why are they marked inline?
>
> Since this is a header file, it prevents the compiler from complaining when
> they aren't used.
Ok, why are they in a header file?
Why would they be unused, come to that?
The header file is used exactly once, by genptr.c. Seems to me they could just
as well be *in* genptr.c.
If the functions are not used, just remove them?
>>> +static inline void log_store32(CPUHexagonState *env, target_ulong addr,
>>> + int32_t val, int width, int slot)
>>> +{
>>> + HEX_DEBUG_LOG("log_store%d(0x%x, %d [0x%x])\n", width, addr, val,
>> val);
>>> + env->mem_log_stores[slot].va = addr;
>>> + env->mem_log_stores[slot].width = width;
>>> + env->mem_log_stores[slot].data32 = val;
>>> +}
>>> +
>>> +static inline void log_store64(CPUHexagonState *env, target_ulong addr,
>>> + int64_t val, int width, int slot)
>>> +{
>>> + HEX_DEBUG_LOG("log_store%d(0x%x, %ld [0x%lx])\n", width, addr,
>> val, val);
>>> + env->mem_log_stores[slot].va = addr;
>>> + env->mem_log_stores[slot].width = width;
>>> + env->mem_log_stores[slot].data64 = val;
>>> +}
>>
>> ... or fold this re-addition back into where it was accidentally removed.
>> ;-)
>
> Could you elaborate?
You added this code in one patch (didn't check which), removed it in patch 26,
and re-added it here in patch 28.
r~
- [RFC PATCH v3 19/34] Hexagon (target/hexagon/imported) arch import - instruction encoding, (continued)
[RFC PATCH v3 20/34] Hexagon (target/hexagon) generator phase 1 - C preprocessor for semantics, Taylor Simpson, 2020/08/18
[RFC PATCH v3 28/34] Hexagon (target/hexagon) TCG generation helpers, Taylor Simpson, 2020/08/18
[RFC PATCH v3 29/34] Hexagon (target/hexagon) TCG generation, Taylor Simpson, 2020/08/18
[RFC PATCH v3 27/34] Hexagon (target/hexagon) instruction classes, Taylor Simpson, 2020/08/18
[RFC PATCH v3 21/34] Hexagon (target/hexagon) generator phase 2 - generate header files, Taylor Simpson, 2020/08/18
[RFC PATCH v3 22/34] Hexagon (target/hexagon) generator phase 3 - C preprocessor for decode tree, Taylor Simpson, 2020/08/18