[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping int
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping into fold functions |
Date: |
Tue, 26 Oct 2021 12:33:25 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
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?
r~
- RE: [PATCH v3 34/48] tcg/optimize: Split out fold_to_not, (continued)
[PATCH v3 40/48] tcg/optimize: Expand fold_addsub2_i32 to 64-bit ops, Richard Henderson, 2021/10/21
[PATCH v3 42/48] tcg/optimize: Add more simplifications for orc, Richard Henderson, 2021/10/21
[PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping into fold functions, Richard Henderson, 2021/10/21
[PATCH v3 43/48] tcg/optimize: Stop forcing z_mask to "garbage" for 32-bit values, Richard Henderson, 2021/10/21
[PATCH v3 48/48] tcg/optimize: Propagate sign info for shifting, Richard Henderson, 2021/10/21
[PATCH v3 45/48] tcg/optimize: Propagate sign info for logical operations, Richard Henderson, 2021/10/21
[PATCH v3 44/48] tcg/optimize: Optimize sign extensions, Richard Henderson, 2021/10/21
[PATCH v3 47/48] tcg/optimize: Propagate sign info for bit counting, Richard Henderson, 2021/10/21