qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v6 8/9] target/arm: Introduce gen_pc_plus_diff for aarch32


From: Peter Maydell
Subject: Re: [PATCH v6 8/9] target/arm: Introduce gen_pc_plus_diff for aarch32
Date: Fri, 14 Oct 2022 18:53:33 +0100

On Thu, 6 Oct 2022 at 04:55, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> In preparation for TARGET_TB_PCREL, reduce reliance on absolute values.
>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> @@ -296,7 +301,8 @@ TCGv_i32 add_reg_for_lit(DisasContext *s, int reg, int 
> ofs)
>      TCGv_i32 tmp = tcg_temp_new_i32();
>
>      if (reg == 15) {
> -        tcg_gen_movi_i32(tmp, (read_pc(s) & ~3) + ofs);
> +        /* This difference computes a page offset so ok for TARGET_TB_PCREL. 
> */
> +        gen_pc_plus_diff(s, tmp, (read_pc(s) & ~3) - s->pc_curr + ofs);
>      } else {
>          tcg_gen_addi_i32(tmp, cpu_R[reg], ofs);
>      }

This is still doing the pc - pc thing -- I guess my comment on v5
crossed in the mail with your v6 repost.

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

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