Re: [PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping into fold functions

2021-10-27 Thread Alex Bennée
Richard Henderson 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) > { >

Re: [PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping into fold functions

2021-10-26 Thread Richard Henderson
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

Re: [PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping into fold functions

2021-10-26 Thread Alex Bennée
Richard Henderson writes: > Most of these are handled by creating a fold_const2_commutative > to handle all of the binary operators. The rest were already > handled on a case-by-case basis in the switch, and have their > own fold function in which to place the call. > > We now have only one ma

[PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping into fold functions

2021-10-21 Thread Richard Henderson
Most of these are handled by creating a fold_const2_commutative to handle all of the binary operators. The rest were already handled on a case-by-case basis in the switch, and have their own fold function in which to place the call. We now have only one major switch on TCGOpcode. Signed-off-by: