[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc
From: |
Peter Maydell |
Subject: |
Re: [PATCH v4 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc |
Date: |
Thu, 22 Sep 2022 15:04:14 +0100 |
On Tue, 6 Sept 2022 at 11:13, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> In preparation for TARGET_TB_PCREL, reduce reliance on
> absolute values by passing in pc difference.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> @@ -263,14 +263,14 @@ static inline int curr_insn_len(DisasContext *s)
>
> #ifdef TARGET_AARCH64
> void a64_translate_init(void);
> -void gen_a64_set_pc_im(uint64_t val);
> +void gen_a64_update_pc(DisasContext *s, int diff);
AArch64 addresses are 64-bit, so there's no guarantee the diff
between two of them will fit in an int... We pass pc values around
as uint64_t, so I think we should pass diffs around in int64_t.
thanks
-- PMM
- Re: [PATCH v4 2/9] target/arm: Change gen_goto_tb to work on displacements, (continued)
- [PATCH v4 5/9] target/arm: Change gen_exception_internal to work on displacements, Richard Henderson, 2022/09/06
- [PATCH v4 1/9] target/arm: Introduce curr_insn_len, Richard Henderson, 2022/09/06
- [PATCH v4 7/9] target/arm: Introduce gen_pc_plus_diff for aarch64, Richard Henderson, 2022/09/06
- [PATCH v4 8/9] target/arm: Introduce gen_pc_plus_diff for aarch32, Richard Henderson, 2022/09/06
- [PATCH v4 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc, Richard Henderson, 2022/09/06
- Re: [PATCH v4 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc,
Peter Maydell <=
- [PATCH v4 6/9] target/arm: Change gen_jmp* to work on displacements, Richard Henderson, 2022/09/06
- [PATCH v4 9/9] target/arm: Enable TARGET_TB_PCREL, Richard Henderson, 2022/09/06
- [PATCH v4 4/9] target/arm: Change gen_exception_insn* to work on displacements, Richard Henderson, 2022/09/06