[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
- [PATCH v6 0/9] target/arm: pc-relative translation blocks, Richard Henderson, 2022/10/05
- [PATCH v6 5/9] target/arm: Remove gen_exception_internal_insn pc argument, Richard Henderson, 2022/10/05
- [PATCH v6 6/9] target/arm: Change gen_jmp* to work on displacements, Richard Henderson, 2022/10/05
- [PATCH v6 4/9] target/arm: Change gen_exception_insn* to work on displacements, Richard Henderson, 2022/10/05
- [PATCH v6 2/9] target/arm: Change gen_goto_tb to work on displacements, Richard Henderson, 2022/10/05
- [PATCH v6 7/9] target/arm: Introduce gen_pc_plus_diff for aarch64, Richard Henderson, 2022/10/05
- [PATCH v6 9/9] target/arm: Enable TARGET_TB_PCREL, Richard Henderson, 2022/10/05
- [PATCH v6 8/9] target/arm: Introduce gen_pc_plus_diff for aarch32, Richard Henderson, 2022/10/05
- Re: [PATCH v6 8/9] target/arm: Introduce gen_pc_plus_diff for aarch32,
Peter Maydell <=
- [PATCH v6 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc, Richard Henderson, 2022/10/05
- [PATCH v6 1/9] target/arm: Introduce curr_insn_len, Richard Henderson, 2022/10/05