From: Richard Henderson <richard.henderson@linaro.org>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: Edgar Iglesias <edgar.iglesias@xilinx.com>,
Peter Maydell <peter.maydell@linaro.org>,
qemu-arm <qemu-arm@nongnu.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Edgar Iglesias <edgar.iglesias@gmail.com>
Subject: Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value
Date: Fri, 11 Aug 2017 13:38:06 -0700 [thread overview]
Message-ID: <abdfeb96-6c04-66cb-44fe-a964beb901c3@linaro.org> (raw)
In-Reply-To: <CAKmqyKOCAS1=WPFwBUXwTve1T_VZsQKJdT=15CPRoHSs-eEhDw@mail.gmail.com>
On 08/11/2017 01:29 PM, Alistair Francis wrote:
> On Fri, Aug 11, 2017 at 1:24 PM, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>> On 08/11/2017 01:13 PM, Alistair Francis wrote:
>>>>> + tcg_gen_ext_i64(val, val, memop);
>>>>
>>>> What is this addition intended to accomplish? Because of the position within
>>>> the code, you know that memop contains MO_64, so that this is a no-op.
>>>
>>> This is when size == 2 so it's a 32bit operation so memop contains MO_32.
>>
>> It's a paired 32-bit operation, so we're operating on a 64-bit quantity. So
>> extending from 32-bits would be actively wrong.
>
> From what I can see though, the 32bit memop is carried into the
> tcg_gen_atomic_cmpxchg_i64() call so the value returned to tmp is
> masked by the 32bit operation.
>
> Is passing down MO_32 into tcg_gen_atomic_cmpxchg_i64() wrong then as
> it ends up as a 64-bit operation?
If we're passing MO_32 down to cmpxchg_i64 for this case, you have indeed found
a bug. I'll investigate this further on Monday.
r~
next prev parent reply other threads:[~2017-08-11 20:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-11 18:19 [Qemu-devel] [RFC v1 0/3] Fixup exclusive store logic Alistair Francis
2017-08-11 18:19 ` [Qemu-devel] [RFC v1 1/3] target/arm: Update the memops for exclusive load Alistair Francis
2017-08-11 19:59 ` Richard Henderson
2017-08-11 18:19 ` [Qemu-devel] [RFC v1 2/3] tcg/tcg-op: Expose the tcg_gen_ext_i* functions Alistair Francis
2017-08-11 20:00 ` Richard Henderson
2017-08-11 18:19 ` [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value Alistair Francis
2017-08-11 19:46 ` Richard Henderson
2017-08-11 20:13 ` Alistair Francis
2017-08-11 20:24 ` Richard Henderson
2017-08-11 20:29 ` Alistair Francis
2017-08-11 20:38 ` Richard Henderson [this message]
2017-08-11 20:39 ` Alistair Francis
2017-08-11 20:53 ` Alistair Francis
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=abdfeb96-6c04-66cb-44fe-a964beb901c3@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alistair.francis@xilinx.com \
--cc=edgar.iglesias@gmail.com \
--cc=edgar.iglesias@xilinx.com \
--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).