qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org
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	[thread overview]
Message-ID: <086890ae-d369-8d4f-3bab-135080edb6ce@linaro.org> (raw)
In-Reply-To: <CAFEAcA_6+jsQfCvTxxUdmdcisMBSsvzKy_g5pdLq0DZ54VtFSg@mail.gmail.com>

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	other threads:[~2022-09-29  3:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 10:05 [PATCH v4 0/9] target/arm: pc-relative translation blocks Richard Henderson
2022-09-06 10:05 ` [PATCH v4 1/9] target/arm: Introduce curr_insn_len Richard Henderson
2022-09-06 12:45   ` Philippe Mathieu-Daudé via
2022-09-06 10:05 ` [PATCH v4 2/9] target/arm: Change gen_goto_tb to work on displacements Richard Henderson
2022-09-06 12:52   ` Philippe Mathieu-Daudé via
2022-09-08 11:59     ` Richard Henderson
2022-09-22 14:01   ` Peter Maydell
2022-09-06 10:05 ` [PATCH v4 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc Richard Henderson
2022-09-22 14:04   ` Peter Maydell
2022-09-29  3:06     ` Richard Henderson [this message]
2022-09-06 10:05 ` [PATCH v4 4/9] target/arm: Change gen_exception_insn* to work on displacements Richard Henderson
2022-09-06 10:05 ` [PATCH v4 5/9] target/arm: Change gen_exception_internal " Richard Henderson
2022-09-06 12:53   ` Philippe Mathieu-Daudé via
2022-09-06 10:05 ` [PATCH v4 6/9] target/arm: Change gen_jmp* " Richard Henderson
2022-09-06 10:05 ` [PATCH v4 7/9] target/arm: Introduce gen_pc_plus_diff for aarch64 Richard Henderson
2022-09-06 10:05 ` [PATCH v4 8/9] target/arm: Introduce gen_pc_plus_diff for aarch32 Richard Henderson
2022-09-06 13:02   ` Philippe Mathieu-Daudé via
2022-09-06 10:05 ` [PATCH v4 9/9] target/arm: Enable TARGET_TB_PCREL Richard Henderson
2022-09-22 14:07   ` Peter Maydell
2022-09-29  4:30     ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=086890ae-d369-8d4f-3bab-135080edb6ce@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).