On 11/26/18 6:52 AM, Alex Bennée wrote: > I'm not convinced this is the best way to go about it. We end up having > to sprinkle the plugin calls into each decoder rather than keeping all > the infrastructure in the common main loop. However the common loop will > need to know the total number of bytes decoded so we could change the > declaration to: > > int (*translate_insn)(DisasContextBase *db, CPUState *cpu); > > and return the number of bytes decoded.
Returning the number of bytes is more difficult than simply just old_pc = db->pc_next; opc->translate_insn(db, cpu); bytes = db->pc_next - old_pc; requiring no target changes at all. r~