From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Richard Henderson <rth@twiddle.net>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
Etienne Carriere <etienne.carriere@linaro.org>,
Joakim Bech <joakim.bech@linaro.org>,
"Emilio G . Cota" <cota@braap.org>
Subject: Re: [RFC PATCH] target/arm: ensure eret exits the run-loop
Date: Mon, 10 Jul 2017 13:54:58 +0100 [thread overview]
Message-ID: <87shi4a1ul.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA_+q-bgKwSRq-rmZ190vVEcq+DXWt-WohJm3=RoJc_99A@mail.gmail.com>
Peter Maydell <peter.maydell@linaro.org> writes:
> On 10 July 2017 at 13:15, Alex Bennée <alex.bennee@linaro.org> wrote:
>> Looking at translate.c (32 bit arm), we have:
>>
>> gen_srs
>> gen_mrs_banked
>> gen_msr_banked
>>
>> These all manually set:
>>
>> gen_set_pc_im(s, s->pc - 4);
>>
>> before their respective helpers. I think setting the PC after the helper
>> is superfluous given we are will at that point be exiting the block.
>
> No, you need both. We do
> gen_set_pc_im(s, s->pc - 4);
> before calling the helper because the helper might throw an
> exception, in which case the PC needs to point to that insn.
> We then call
> gen_set_pc_im(dc, dc->pc);
> before exiting the block because if we leave execution by
> falling off the end of the block then the PC should point to
> the insn that comes next (ie just after the last one in the block)
OK I see now. I think I have a plan going forward.
>
> thanks
> -- PMM
--
Alex Bennée
WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Richard Henderson <rth@twiddle.net>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
Etienne Carriere <etienne.carriere@linaro.org>,
Joakim Bech <joakim.bech@linaro.org>,
"Emilio G . Cota" <cota@braap.org>
Subject: Re: [Qemu-devel] [RFC PATCH] target/arm: ensure eret exits the run-loop
Date: Mon, 10 Jul 2017 13:54:58 +0100 [thread overview]
Message-ID: <87shi4a1ul.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA_+q-bgKwSRq-rmZ190vVEcq+DXWt-WohJm3=RoJc_99A@mail.gmail.com>
Peter Maydell <peter.maydell@linaro.org> writes:
> On 10 July 2017 at 13:15, Alex Bennée <alex.bennee@linaro.org> wrote:
>> Looking at translate.c (32 bit arm), we have:
>>
>> gen_srs
>> gen_mrs_banked
>> gen_msr_banked
>>
>> These all manually set:
>>
>> gen_set_pc_im(s, s->pc - 4);
>>
>> before their respective helpers. I think setting the PC after the helper
>> is superfluous given we are will at that point be exiting the block.
>
> No, you need both. We do
> gen_set_pc_im(s, s->pc - 4);
> before calling the helper because the helper might throw an
> exception, in which case the PC needs to point to that insn.
> We then call
> gen_set_pc_im(dc, dc->pc);
> before exiting the block because if we leave execution by
> falling off the end of the block then the PC should point to
> the insn that comes next (ie just after the last one in the block)
OK I see now. I think I have a plan going forward.
>
> thanks
> -- PMM
--
Alex Bennée
next prev parent reply other threads:[~2017-07-10 12:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 16:18 [RFC PATCH] target/arm: ensure eret exits the run-loop Alex Bennée
2017-07-07 16:18 ` [Qemu-devel] " Alex Bennée
2017-07-07 17:32 ` Alex Bennée
2017-07-07 17:32 ` [Qemu-devel] " Alex Bennée
2017-07-07 17:36 ` Peter Maydell
2017-07-07 17:36 ` [Qemu-devel] " Peter Maydell
2017-07-07 17:54 ` Richard Henderson
2017-07-07 17:54 ` [Qemu-devel] " Richard Henderson
2017-07-07 18:29 ` Alex Bennée
2017-07-07 18:29 ` [Qemu-devel] " Alex Bennée
2017-07-07 18:52 ` Richard Henderson
2017-07-07 18:52 ` [Qemu-devel] " Richard Henderson
2017-07-08 16:21 ` [Qemu-arm] " Philippe Mathieu-Daudé
2017-07-08 16:21 ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-10 12:15 ` Alex Bennée
2017-07-10 12:15 ` [Qemu-devel] " Alex Bennée
2017-07-10 12:19 ` Peter Maydell
2017-07-10 12:19 ` [Qemu-devel] " Peter Maydell
2017-07-10 12:54 ` Alex Bennée [this message]
2017-07-10 12:54 ` Alex Bennée
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=87shi4a1ul.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=cota@braap.org \
--cc=etienne.carriere@linaro.org \
--cc=joakim.bech@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.