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

2017-07-12 Thread Alex Bennée
Lluís Vilanova writes: > Alex Bennée writes: > >> Lluís Vilanova writes: > >>> Signed-off-by: Lluís Vilanova >>> + >>> +translate_block_tcg_check(db); >>> +} > >> This may be a personal taste thing but having

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

2017-07-12 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> Signed-off-by: Lluís Vilanova >> --- >> accel/tcg/Makefile.objs |1 >> accel/tcg/translator.c| 152 >> + >> include/exec/gen-icount.h |2 - >>

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

2017-07-12 Thread Lluís Vilanova
Richard Henderson writes: > On 07/11/2017 06:40 AM, Lluís Vilanova wrote: >> Since other hooks can set db->is_jmp and return values (breakpoint_check), >> I'll >> stick with db->is_jmp instead. Then tb_start can return max_insns, and >> generic >> code can refine it with checks like

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

2017-07-11 Thread Alex Bennée
Lluís Vilanova writes: > Signed-off-by: Lluís Vilanova > --- > accel/tcg/Makefile.objs |1 > accel/tcg/translator.c| 152 > + > include/exec/gen-icount.h |2 - > include/exec/translator.h |

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

2017-07-11 Thread Richard Henderson
On 07/11/2017 06:40 AM, Lluís Vilanova wrote: Since other hooks can set db->is_jmp and return values (breakpoint_check), I'll stick with db->is_jmp instead. Then tb_start can return max_insns, and generic code can refine it with checks like single-stepping. No, you misunderstand. For SH4 I

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

2017-07-11 Thread Lluís Vilanova
Richard Henderson writes: > On 07/07/2017 01:56 AM, Lluís Vilanova wrote: [...] >> + >> +/* Instruction counting */ >> +max_insns = db->tb->cflags & CF_COUNT_MASK; >> +if (max_insns == 0) { >> +max_insns = CF_COUNT_MASK; >> +} >> +if (max_insns > TCG_MAX_INSNS) { >> +

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

2017-07-07 Thread Richard Henderson
On 07/07/2017 01:56 AM, Lluís Vilanova wrote: +void translator_loop(const TranslatorOps *ops, DisasContextBase *db, + CPUState *cpu, TranslationBlock *tb) +{ +int max_insns; + +/* Initialize DisasContext */ +db->tb = tb; +db->pc_first = tb->pc; +

[Qemu-devel] [PATCH v12 04/27] target: [tcg] Add generic translation framework

2017-07-07 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- accel/tcg/Makefile.objs |1 accel/tcg/translator.c| 152 + include/exec/gen-icount.h |2 - include/exec/translator.h | 99 + 4 files changed, 253