[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to tra
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn |
Date: |
Mon, 26 Nov 2018 11:19:11 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
On 11/26/18 10:56 AM, Alex Bennée wrote:
>
>
> On Mon, 26 Nov 2018, 18:27 Richard Henderson <address@hidden
> <mailto:address@hidden> wrote:
>
> 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.
>
>
> If that's always true then great, but what happens with direct branches?
pc_next is still updated by the size of the branch, not it's destination;
db->is_jmp will be != DISAS_NEXT, ending the TB.
r~
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Alex Bennée, 2018/11/26
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Richard Henderson, 2018/11/26
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Alex Bennée, 2018/11/26
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn,
Richard Henderson <=
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Emilio G. Cota, 2018/11/26
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Richard Henderson, 2018/11/26
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Emilio G. Cota, 2018/11/26
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Emilio G. Cota, 2018/11/27
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Emilio G. Cota, 2018/11/27
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Alex Bennée, 2018/11/28
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Emilio G. Cota, 2018/11/28
- Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Pavel Dovgalyuk, 2018/11/27