[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH] translate.c: Fix usermode big-endian
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH] translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD |
Date: |
Sat, 21 Oct 2017 11:56:01 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/21/2017 03:17 AM, Peter Maydell wrote:
>>> - gen_aa32_frob64(s, o64);
>>> + if (s->be_data) {
>>> + tcg_gen_rotri_i64(o64, o64, 32);
>>> + }
>>> tcg_gen_setcond_i64(TCG_COND_NE, o64, o64, cpu_exclusive_val);
>>
>> We're not splitting o64 to parts. Are you sure it shouldn't stay as frob?
>
> This is confusing, but I don't think frob is right. We want to
> be matching either (a) the transformation we just did to produce
> the 64 bit data we're storing, or (b) the transformation we
> do on the ldrexd, don't we? Neither of those is frob.
>
> I think I need to think through a bit more carefully about
> what's actually going on here, since we seem to have the
> value in two places (actual memory, and the cpu_exclusive_val
> TCGv.)
We should match what we do in ldrexd, I think. Which is just a straight BE
load. So I guess the frob64 should be dropped and nothing should replace it.
r~