qemu-devel
[Top][All Lists]
Advanced

[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: Richard Henderson
Subject: Re: [PATCH v4 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc
Date: Wed, 28 Sep 2022 20:06:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 9/22/22 07:04, Peter Maydell wrote:
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.

I'll make the change, but it's also true that no single insn can generate a displacement more than INT32_MIN away from pc (adrp).


r~



reply via email to

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