[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] RFC: Code fetch optimisation
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] RFC: Code fetch optimisation |
Date: |
Wed, 17 Oct 2007 01:43:23 +0100 |
User-agent: |
KMail/1.9.7 |
> > I suspect the best solution is to backtrack (remove the generated ops)
> > after decoding the insn if we discover we've passed a page boundary. The
> > ld*_code routines can simply return garbage (e.g. zero) if the read is
> > not on the first page.
>
> The "incorrect" returned value may be target specific to be sure it's
> always an invalid opcode.
It doesn't matter whether it's valid or not, and we've no way of guaranteeing
that anyway. We just have to make sure we don't generate an infinitely long
instruction.
On a related note, I notice that we don't enforce x86 instruction length
limits.
> Backtracking should not be hard if we register the last cc pointer each
> time we finish translating an insn. I'll think about this solution,
> which really seems feasible to me.
Right. You only have to worry about backtracking the state that's lives across
insns and is not constant within a TB. For x86 I think this is dc->pc,
dc->cc_op, gen_opc_ptr and nb_gen_labels. Plus you need to reset dc->is_jmp
to zero. gen_opparam_ptr is not used after disassembly, so can be ignored.
Paul
- [Qemu-devel] RFC: Code fetch optimisation, (continued)
- [Qemu-devel] RFC: Code fetch optimisation, J. Mayer, 2007/10/14
- Re: [Qemu-devel] RFC: Code fetch optimisation, Paul Brook, 2007/10/14
- Re: [Qemu-devel] RFC: Code fetch optimisation, J. Mayer, 2007/10/15
- Re: [Qemu-devel] RFC: Code fetch optimisation, Paul Brook, 2007/10/15
- Re: [Qemu-devel] RFC: Code fetch optimisation, Fabrice Bellard, 2007/10/15
- Re: [Qemu-devel] RFC: Code fetch optimisation, J. Mayer, 2007/10/15
- Re: [Qemu-devel] RFC: Code fetch optimisation, Paul Brook, 2007/10/15
- Re: [Qemu-devel] RFC: Code fetch optimisation, J. Mayer, 2007/10/16
- Re: [Qemu-devel] RFC: Code fetch optimisation, Paul Brook, 2007/10/16
- Re: [Qemu-devel] RFC: Code fetch optimisation, J. Mayer, 2007/10/16
- Re: [Qemu-devel] RFC: Code fetch optimisation,
Paul Brook <=
- Re: [Qemu-devel] RFC: Code fetch optimisation, Paul Brook, 2007/10/16