From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 3/4] target/arm: Take an exception if PC is misaligned
Date: Thu, 19 Aug 2021 06:57:36 -1000 [thread overview]
Message-ID: <b6754a17-7b6a-201d-6c33-7759ea8ea270@linaro.org> (raw)
In-Reply-To: <bb739396-f8d1-a5a8-ab1a-61892d9c84e6@linaro.org>
On 8/19/21 6:50 AM, Richard Henderson wrote:
> On 8/19/21 3:40 AM, Peter Maydell wrote:
>>> uint32_t insn;
>>> bool is_16bit;
>>>
>>> - if (arm_pre_translate_insn(dc)) {
>>> + if (arm_check_ss_active(dc) || arm_check_kernelpage(dc)) {
>>
>>
>> Is it not possible to get a misaligned PC in the Thumb case ?
>
> No. The thumb bit is always removed, leaving all pc aligned mod 2.
> Both BXWritePC and BranchWritePC do this, as do we in gen_bx and store_reg.
Do you think it's worth an assert here to make sure we never miss a case? I did an audit
of the exception code and it looks like we mask everything correctly there, but...
r~
next prev parent reply other threads:[~2021-08-19 16:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 1:00 [PATCH 0/4] target/arm: Fix insn exception priorities Richard Henderson
2021-08-18 1:00 ` [PATCH 1/4] target/arm: Take an exception if PSTATE.IL is set Richard Henderson
2021-08-18 1:00 ` [PATCH 2/4] target/arm: Merge disas_a64_insn into aarch64_tr_translate_insn Richard Henderson
2021-08-19 13:36 ` Peter Maydell
2021-08-18 1:00 ` [PATCH 3/4] target/arm: Take an exception if PC is misaligned Richard Henderson
2021-08-18 16:44 ` Richard Henderson
2021-08-19 13:40 ` Peter Maydell
2021-08-19 16:50 ` Richard Henderson
2021-08-19 16:57 ` Richard Henderson [this message]
2021-08-19 19:24 ` Peter Maydell
2021-08-19 20:34 ` Richard Henderson
2021-08-19 19:18 ` Peter Maydell
2021-08-19 19:46 ` Peter Maydell
2021-08-18 1:00 ` [PATCH 4/4] target/arm: Suppress bp for exceptions with more priority Richard Henderson
2021-08-19 13:48 ` Peter Maydell
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=b6754a17-7b6a-201d-6c33-7759ea8ea270@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 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.