Re: [PATCH v3 10/23] i386: do not cast gen_helper_* function pointers

2022-09-01 Thread Richard Henderson
On 9/1/22 08:48, Paolo Bonzini wrote: #define OP(op, flags, a, b, c, d) \ -{flags, {a, b, c, d} } +{flags, {{.op = a}, {.op = b}, {.op = c}, {.op = d} } } It would have been handy to have uppercase macro args here, because .op looks like... struct SSEOpHelper_table1 {

[PATCH v3 10/23] i386: do not cast gen_helper_* function pointers

2022-09-01 Thread Paolo Bonzini
Use a union to store the various possible kinds of function pointers, and access the correct one based on the flags. SSEOpHelper_table6 and SSEOpHelper_table7 right now only have one case, but this would change with AVX's 3- and 4-argument operations. Use unions there too, to keep the code more