From: Peter Maydell <peter.maydell@linaro.org>
To: Julia Suvorova <jusual@mail.ru>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Joel Stanley" <joel@jms.id.au>,
"Jim Mussared" <jim@groklearning.com>,
"Steffen Görtz" <mail@steffen-goertz.de>
Subject: Re: [Qemu-devel] [PATCH] target/arm: Allow ARMv6-M Thumb2 instructions
Date: Fri, 15 Jun 2018 14:31:13 +0100 [thread overview]
Message-ID: <CAFEAcA-aODbEXPZEEGaRTLxYfrRdx5OxBQk5f4g9mvntrfLAJA@mail.gmail.com> (raw)
In-Reply-To: <20180612204632.28780-1-jusual@mail.ru>
On 12 June 2018 at 21:46, Julia Suvorova <jusual@mail.ru> wrote:
> @@ -10085,10 +10091,25 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn)
> int conds;
> int logic_cc;
>
> - /* The only 32 bit insn that's allowed for Thumb1 is the combined
> - * BL/BLX prefix and suffix.
> + /*
> + * ARMv6-M supports a limited subset of Thumb2 instructions.
> + * Other Thumb1 architectures allow only 32-bit
> + * combined BL/BLX prefix and suffix.
> */
> - if ((insn & 0xf800e800) != 0xf000e800) {
> + if (arm_dc_feature(s, ARM_FEATURE_M) && arm_dc_feature(s, ARM_FEATURE_V6)) {
I realized during testing that this accidentally breaks v7M and v8M,
because those cores define both ARM_FEATURE_V6 and _V7 (and _V8 for v8M),
so this condition is true and we undef on the non-v6M insns for
v7M and v8M too. I've fixed this in target-arm.next by changing the
condition to
+ if (arm_dc_feature(s, ARM_FEATURE_M) &&
+ !arm_dc_feature(s, ARM_FEATURE_V7)) {
thanks
-- PMM
prev parent reply other threads:[~2018-06-15 13:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 20:46 [Qemu-devel] [PATCH] target/arm: Allow ARMv6-M Thumb2 instructions Julia Suvorova
2018-06-13 14:05 ` Stefan Hajnoczi
2018-06-13 17:10 ` Julia Suvorova
2018-06-14 8:17 ` Stefan Hajnoczi
2018-06-15 10:55 ` Peter Maydell
2018-06-15 11:15 ` Julia Suvorova
2018-06-17 5:36 ` Richard Henderson
2018-06-17 16:33 ` Peter Maydell
2018-06-17 18:48 ` Julia Suvorova
2018-06-18 10:48 ` Peter Maydell
2018-06-15 13:31 ` Peter Maydell [this message]
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=CAFEAcA-aODbEXPZEEGaRTLxYfrRdx5OxBQk5f4g9mvntrfLAJA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=jim@groklearning.com \
--cc=joel@jms.id.au \
--cc=jusual@mail.ru \
--cc=mail@steffen-goertz.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).