Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-04 Thread Peter Maydell
On 4 July 2017 at 23:31, Richard Henderson wrote: > On 07/04/2017 09:14 AM, Peter Maydell wrote: >> I kind of like not having CPUState* in DisasContext, because >> it enforces the rule that you can't read from fields of >> it inside the target translate.c code without jumping

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-04 Thread Richard Henderson
On 07/04/2017 09:14 AM, Peter Maydell wrote: On 4 July 2017 at 19:59, Lluís Vilanova wrote: Richard Henderson writes: Any reason not to stuff the cpu pointer into the DisasContextBase instead of passing it around separately? None, really. I'll move it from DisasContext

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-04 Thread Peter Maydell
On 4 July 2017 at 19:59, Lluís Vilanova wrote: > Richard Henderson writes: > >> On 06/28/2017 05:32 AM, Lluís Vilanova wrote: >>> +void (*init_disas_context)(DisasContextBase *db, CPUState *cpu); >>> +void (*init_globals)(DisasContextBase *db, CPUState *cpu); >>> +

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-04 Thread Lluís Vilanova
Richard Henderson writes: > On 06/28/2017 05:32 AM, Lluís Vilanova wrote: >> +void (*init_disas_context)(DisasContextBase *db, CPUState *cpu); >> +void (*init_globals)(DisasContextBase *db, CPUState *cpu); >> +void (*tb_start)(DisasContextBase *db, CPUState *cpu); >> +void

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-01 Thread Richard Henderson
On 06/28/2017 05:32 AM, Lluís Vilanova wrote: +void (*init_disas_context)(DisasContextBase *db, CPUState *cpu); +void (*init_globals)(DisasContextBase *db, CPUState *cpu); +void (*tb_start)(DisasContextBase *db, CPUState *cpu); +void (*insn_start)(DisasContextBase *db, CPUState

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-07-01 Thread Richard Henderson
On 06/29/2017 05:02 PM, Emilio G. Cota wrote: +void translate_block(const TranslatorOps *ops, DisasContextBase *db, + CPUState *cpu, TranslationBlock *tb); I'd rather avoid "block" here. Some alternatives: - tb_translate() - translate_tb() - translate() - translator_gen() -

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-06-29 Thread Emilio G. Cota
On Wed, Jun 28, 2017 at 15:32:48 +0300, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- (snip) > /** > * DisasJumpType: > * @DISAS_NEXT: Next instruction in program order. > @@ -33,6 +65,78 @@ typedef enum DisasJumpType { > DISAS_TARGET_9, >

Re: [Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-06-29 Thread Emilio G. Cota
On Wed, Jun 28, 2017 at 15:32:48 +0300, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > accel/tcg/Makefile.objs |1 > accel/tcg/translator.c| 153 > + > include/exec/gen-icount.h |2 - >

[Qemu-devel] [PATCH v11 04/29] target: [tcg] Add generic translation framework

2017-06-28 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- accel/tcg/Makefile.objs |1 accel/tcg/translator.c| 153 + include/exec/gen-icount.h |2 - include/exec/translator.h | 104 +++ 4 files changed, 259