From: Peter Maydell <1922887@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1922887] Re: STR in Thumb 32 decode problem
Date: Thu, 08 Apr 2021 16:51:47 -0000 [thread overview]
Message-ID: <161790070740.10458.55491234868153456.malone@soybean.canonical.com> (raw)
In-Reply-To: 161778201158.26656.2798489764705445614.malonedeb@wampee.canonical.com
Patch sent to list: if you could test it against whatever your test case was that would be helpful.
https://patchew.org/QEMU/20210408162402.5822-1-peter.maydell@linaro.org/
PS: out of interest, why/how were you checking should-UNDEF cases ?
** Changed in: qemu
Status: New => In Progress
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1922887
Title:
STR in Thumb 32 decode problem
Status in QEMU:
In Progress
Bug description:
Hi
It seems that QEMU does not have a proper check on the STR instruction
in Thumb32 mode.
Specifically, the machine code is 0xf84f0ddd, which is 0b1111 1000 0100 1111 0000 1101 1101 1101.
This is an STR (immediate, Thumb) instruction with a T4 encoding scheme.
The symbols is
Rn = 1111
Rt = 0000
P = 1
U = 0
W = 1
The decode ASL is below:
if P == ‘1’ && U == ‘1’ && W == ‘0’ then SEE STRT;
if Rn == ‘1101’ && P == ‘1’ && U == ‘0’ && W == ‘1’ && imm8 == ‘00000100’ then SEE PUSH;
if Rn == ‘1111’ || (P == ‘0’ && W == ‘0’) then UNDEFINED;
t = UInt(Rt); n = UInt(Rn); imm32 = ZeroExtend(imm8, 32);
index = (P == ‘1’); add = (U == ‘1’); wback = (W == ‘1’);
if t == 15 || (wback && n == t) then UNPREDICTABLE;
When Rn == 1111, it should be an undefined instruction, which should
raise SEGILL signal. However, it seems that QEMU does not check this
constraint, which should be a bug. Many thanks
Regards
Muhui
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1922887/+subscriptions
next prev parent reply other threads:[~2021-04-08 17:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 7:53 [Bug 1922887] [NEW] STR in Thumb 32 decode problem JIANG Muhui
2021-04-07 8:53 ` [Bug 1922887] " Peter Maydell
2021-04-07 9:16 ` Peter Maydell
2021-04-08 16:51 ` Peter Maydell [this message]
2021-04-09 13:43 ` JIANG Muhui
2021-05-15 14:30 ` Thomas Huth
2021-08-25 7:12 ` Thomas Huth
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=161790070740.10458.55491234868153456.malone@soybean.canonical.com \
--to=1922887@bugs.launchpad.net \
--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).