qemu-devel
[Top][All Lists]
Advanced

[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~



reply via email to

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