Re: [Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-18 Thread Sergey Fedorov
On 18.09.2015 18:40, Richard Henderson wrote: > On 09/18/2015 03:32 AM, Peter Maydell wrote: >>> +if (unlikely(cpu_breakpoint_test(cs, dc->pc, BP_ANY))) { >>> +gen_exception_internal_insn(dc, 0, EXCP_DEBUG); >>> +/* Advance PC so that clearing the breakpoint will >>>

Re: [Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-18 Thread Richard Henderson
On 09/18/2015 03:32 AM, Peter Maydell wrote: >> +/* Return true if PC matches an installed breakpoint. */ >> +static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) >> +{ >> +CPUBreakpoint *bp; >> + >> +if (unlikely(!QTAILQ_EMPTY(&cpu->breakpoints))) { >> +QTAILQ

Re: [Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-18 Thread Sergey Fedorov
On 18.09.2015 13:32, Peter Maydell wrote: >> +/* Return true if PC matches an installed breakpoint. */ >> > +static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) >> > +{ >> > +CPUBreakpoint *bp; >> > + >> > +if (unlikely(!QTAILQ_EMPTY(&cpu->breakpoints))) { >> > +

Re: [Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 05:55, Richard Henderson wrote: > Reduce the boilerplate required for each target. At the same time, > move the test for breakpoint after calling tcg_gen_insn_start. > > Signed-off-by: Richard Henderson > --- > include/qom/cpu.h | 16 +++ > target

[Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-17 Thread Richard Henderson
Reduce the boilerplate required for each target. At the same time, move the test for breakpoint after calling tcg_gen_insn_start. Signed-off-by: Richard Henderson --- include/qom/cpu.h | 16 +++ target-alpha/translate.c | 13 target-arm/translate-a64.c