On 8/25/22 02:23, Richard Henderson wrote:
+ op->v = v;
+}
Surely this assignment...
+static void gen_writeback(DisasContext *s, X86DecodedOp *op)
+{
...
+ case X86_ALU_GPR:
+ gen_op_mov_reg_v(s, op->ot, op->n, s->T0);
... can be used here instead of hard-coding T0. It should be easy enough to create *_v
editions of all *_T0, such as gen_movl_seg_T0.
No, decode.op[0].v is never initialized.
In fact, even decode.op[1].v and decode.op[2].v are never used, the gen_* functions just
hardcode T0 = f(T0, T1).