From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org, christophe.lyon@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2] translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD
Date: Thu, 2 Nov 2017 12:43:46 +0100 [thread overview]
Message-ID: <aa20fe35-6c76-3194-d633-cae8d2a6116f@linaro.org> (raw)
In-Reply-To: <1509622400-13351-1-git-send-email-peter.maydell@linaro.org>
On 11/02/2017 12:33 PM, Peter Maydell wrote:
> For AArch32 LDREXD and STREXD, architecturally the 32-bit word at the
> lowest address is always Rt and the one at addr+4 is Rt2, even if the
> CPU is big-endian. Our implementation does these with a single
> 64-bit store, so if we're big-endian then we need to put the two
> 32-bit halves together in the opposite order to little-endian,
> so that they end up in the right places. We were trying to do
> this with the gen_aa32_frob64() function, but that is not correct
> for the usermode emulator, because there there is a distinction
> between "load a 64 bit value" (which does a BE 64-bit access
> and doesn't need swapping) and "load two 32 bit values as one
> 64 bit access" (where we still need to do the swapping, like
> system mode BE32).
>
> Fixes: https://bugs.launchpad.net/qemu/+bug/1725267
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Changes v1->v2:
> * use correct "s->be_data == MO_BE" check for bigendian
> * don't mangle the data from the atomic-cmpxchg before
> comparing against expected value
> * tcg_temp_free() the TCGv from gen_aa32_addr()
> * name that TCGv "taddr" rather than "a"...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
prev parent reply other threads:[~2017-11-02 11:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 11:33 [Qemu-devel] [PATCH v2] translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD Peter Maydell
2017-11-02 11:43 ` Richard Henderson [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=aa20fe35-6c76-3194-d633-cae8d2a6116f@linaro.org \
--to=richard.henderson@linaro.org \
--cc=christophe.lyon@linaro.org \
--cc=patches@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 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).