qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 9/9] target/arm: Enable TARGET_TB_PCREL


From: Peter Maydell
Subject: Re: [PATCH v7 9/9] target/arm: Enable TARGET_TB_PCREL
Date: Mon, 17 Oct 2022 14:48:43 +0100

On Sun, 16 Oct 2022 at 23:23, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


>  static void gen_goto_tb(DisasContext *s, int n, int64_t diff)
>  {
> -    uint64_t dest = s->pc_curr + diff;
> -
> -    if (use_goto_tb(s, dest)) {
> -        tcg_gen_goto_tb(n);
> -        gen_a64_update_pc(s, diff);
> +    if (use_goto_tb(s, s->pc_curr + diff)) {
> +        if (TARGET_TB_PCREL) {
> +            gen_a64_update_pc(s, diff);
> +            tcg_gen_goto_tb(n);
> +        } else {
> +            tcg_gen_goto_tb(n);
> +            gen_a64_update_pc(s, diff);
> +        }

Why do we need to do these things in the opposite order
depending on TARGET_TB_PCREL ? If there's an obscure dependency
then it would be worth commenting it, but it would be nicer
if the semantics of the functions were such that they didn't
need to be called the opposite way round for the two cases...

>          tcg_gen_exit_tb(s->base.tb, n);
>          s->base.is_jmp = DISAS_NORETURN;
>      } else {

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]