[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH] translate.c: Fix usermode big-endian AArch32 LDRE
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [PATCH] translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD |
Date: |
Fri, 20 Oct 2017 11:15:46 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/20/2017 10:56 AM, Peter Maydell wrote:
> + if (s->be_data) {
> + tcg_gen_extr_i64_i32(tmp2, tmp, t64);
> + } else {
> + tcg_gen_extr_i64_i32(tmp, tmp2, t64);
> + }
The test against be_data must be of the form s->be_data == MO_BE/LE.
The actual bits have MO_BSWAP non-zero, and then set MO_BE/LE to either 0 or
MO_BSWAP depending on the host endianness.
> - 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?
r~