Il ven 26 ago 2022, 01:39 Richard Henderson <[email protected]>
ha scritto:
> On 8/25/22 15:13, Paolo Bonzini wrote:
> > @@ -3112,6 +3165,7 @@ static void gen_sse(CPUX86State *env, DisasContext
> *s, int b,
> > {
> > int b1, op1_offset, op2_offset, is_xmm, val;
> > int modrm, mod, rm, reg;
> > + struct SSEOpHelper_table1 sse_op;
> > SSEFunc_0_epp sse_fn_epp;
> > SSEFunc_0_eppi sse_fn_eppi;
> > SSEFunc_0_ppi sse_fn_ppi;
> > @@ -3127,8 +3181,10 @@ static void gen_sse(CPUX86State *env,
> DisasContext *s, int b,
> > b1 = 3;
> > else
> > b1 = 0;
> > - sse_fn_epp = sse_op_table1[b][b1];
> > - if (!sse_fn_epp) {
> > + sse_op = sse_op_table1[b];
> > + sse_fn_epp = sse_op.op[b1];
> > + if ((sse_op.flags & (SSE_OPF_SPECIAL | SSE_OPF_3DNOW)) == 0
> > + && !sse_fn_epp) {
>
> Do we really want a 5 word structure copy into the local stack frame here?
> Surely better as
>
> const struct SSEOpHelper_table1 *sse_op;
> ...
> sse_op = &sse_op_table1[b];
I'll split it to two variables, one for the flags and one for fn[b1]. Op6
and op7 will just be pointers instead. Rebasing the AVX patches (I want to
keep them up to date even if I end up replacing the decoder) was easier
than I thought.
Paolo
> Otherwise,
> Reviewed-by: Richard Henderson <[email protected]>
>
>
> r~
>
>