On 13 October 2015 at 23:10, Richard Henderson <r...@twiddle.net> wrote:
> Some targets already had this within their logic, but make sure
> it's present for all targets.
>
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
>  target-alpha/translate.c      | 3 +++
>  target-cris/translate.c       | 3 +++
>  target-i386/translate.c       | 3 +++
>  target-lm32/translate.c       | 3 +++
>  target-m68k/translate.c       | 3 +++
>  target-microblaze/translate.c | 3 +++
>  target-moxie/translate.c      | 3 +++
>  target-openrisc/translate.c   | 3 +++
>  target-ppc/translate.c        | 3 +++
>  target-s390x/translate.c      | 3 +++
>  target-sh4/translate.c        | 3 +++
>  target-sparc/translate.c      | 2 +-
>  target-unicore32/translate.c  | 2 +-
>  target-xtensa/translate.c     | 3 +++
>  14 files changed, 38 insertions(+), 2 deletions(-)
>
> diff --git a/target-alpha/translate.c b/target-alpha/translate.c
> index f936d1b..1a2d284 100644
> --- a/target-alpha/translate.c
> +++ b/target-alpha/translate.c
> @@ -2917,6 +2917,9 @@ void gen_intermediate_code(CPUAlphaState *env, struct 
> TranslationBlock *tb)
>
>          if (unlikely(cpu_breakpoint_test(cs, ctx.pc, BP_ANY))) {
>              gen_excp(&ctx, EXCP_DEBUG, 0);
> +            /* Advance PC so that clearing the breakpoint will
> +               invalidate this TB.  */
> +            ctx.pc += 4;
>              break;
>          }

This is still the same cryptic comment we have in the
targets which do do this. Can we have something
that is a bit more explanatory about what is going on and
why we need to do this, please?
(Also explaining what the number you need to advance by
should be would be helpful for people writing new targets
in future.)

thanks
-- PMM

Reply via email to