|
| From: | Alex Bennée |
| Subject: | Re: [PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping into fold functions |
| Date: | Wed, 27 Oct 2021 14:22:24 +0100 |
| User-agent: | mu4e 1.7.4; emacs 28.0.60 |
Richard Henderson <richard.henderson@linaro.org> writes:
> On 10/26/21 9:27 AM, Alex Bennée wrote:
>> I find this a bit magical. I couldn't find anything about TCGArg except
>> it's type:
>> typedef tcg_target_ulong TCGArg;
>
> For an argument that contains a temp,
>
> static inline TCGArg temp_arg(TCGTemp *ts)
> {
> return (uintptr_t)ts;
> }
>
> static inline TCGTemp *arg_temp(TCGArg a)
> {
> return (TCGTemp *)(uintptr_t)a;
> }
>
> i.e. the TCGArg is in fact a pointer.
>
>> so I'm not sure what to make of -1 in this case. I guess it just means
>> we never have a (sum == 0 && dest == a2) leg but it's not obvious
>> reading the fold code.
>
> Indeed. The use of -1 goes back quite a ways. How about
>
> #define NO_DEST temp_arg(NULL)
>
> which will also fail to match in that expression?
Sounds good to me. It would be nice to document the details of what
TCGArg can be in another patch.
--
Alex Bennée
| [Prev in Thread] | Current Thread | [Next in Thread] |