From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 2/2] target/arm: Relax r13 restriction for ldrex/strex for v8.0
Date: Mon, 18 Nov 2019 13:10:07 +0000 [thread overview]
Message-ID: <CAFEAcA8FdT8R4_nwUQ1QLBMBST_K0xuHABER3f8kt6JY1vYojw@mail.gmail.com> (raw)
In-Reply-To: <20191117090621.32425-3-richard.henderson@linaro.org>
On Sun, 17 Nov 2019 at 09:06, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Armv8-A removes UNPREDICTABLE for R13 for these cases.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/arm/translate.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/target/arm/translate.c b/target/arm/translate.c
> index b285b23858..3db8103966 100644
> --- a/target/arm/translate.c
> +++ b/target/arm/translate.c
> @@ -8931,11 +8931,11 @@ static bool op_strex(DisasContext *s, arg_STREX *a, MemOp mop, bool rel)
> /* We UNDEF for these UNPREDICTABLE cases. */
> if (a->rd == 15 || a->rn == 15 || a->rt == 15
> || a->rd == a->rn || a->rd == a->rt
> - || (s->thumb && (a->rd == 13 || a->rt == 13))
> + || (!ENABLE_ARCH_8 && s->thumb && (a->rd == 13 || a->rt == 13))
> || (mop == MO_64
> && (a->rt2 == 15
> || a->rd == a->rt2
> - || (s->thumb && a->rt2 == 13)))) {
> + || (!ENABLE_ARCH_8 && s->thumb && a->rt2 == 13)))) {
> unallocated_encoding(s);
> return true;
> }
> @@ -9087,10 +9087,10 @@ static bool op_ldrex(DisasContext *s, arg_LDREX *a, MemOp mop, bool acq)
>
> /* We UNDEF for these UNPREDICTABLE cases. */
> if (a->rn == 15 || a->rt == 15
> - || (s->thumb && a->rt == 13)
> + || (!ENABLE_ARCH_8 && s->thumb && a->rt == 13)
> || (mop == MO_64
> && (a->rt2 == 15 || a->rt == a->rt2
> - || (s->thumb && a->rt2 == 13)))) {
> + || (!ENABLE_ARCH_8 && s->thumb && a->rt2 == 13)))) {
> unallocated_encoding(s);
> return true;
> }
These cases for r13 are indeed no longer UNPREDICTABLE in
v8A, but they are still marked as UNPREDICTABLE for v8M...
thanks
-- PMM
next prev parent reply other threads:[~2019-11-18 13:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-17 9:06 [PATCH for-4.2 0/2] target/arm: two fixes for ldrex/strex Richard Henderson
2019-11-17 9:06 ` [PATCH 1/2] target/arm: Do not reject rt == rt2 for strexd Richard Henderson
2019-11-18 13:17 ` Peter Maydell
2019-11-17 9:06 ` [PATCH 2/2] target/arm: Relax r13 restriction for ldrex/strex for v8.0 Richard Henderson
2019-11-18 13:10 ` Peter Maydell [this message]
2019-11-18 13:15 ` Richard Henderson
2019-11-18 17:53 ` Peter Maydell
2019-11-18 20:02 ` Richard Henderson
2019-11-18 21:22 ` 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=CAFEAcA8FdT8R4_nwUQ1QLBMBST_K0xuHABER3f8kt6JY1vYojw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).