[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 5/6] target-ppc: add lxvb16x and lxvh
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 5/6] target-ppc: add lxvb16x and lxvh8x |
Date: |
Wed, 10 Aug 2016 20:51:58 +0530 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu) |
Richard Henderson <address@hidden> writes:
> On 08/10/2016 02:51 PM, Nikunj A Dadhania wrote:
>> I can fix the BE case using following but not sure if that will be
>> correct !
>>
>> tcg_gen_qemu_ld_i64(xth, EA, ctx->mem_idx, MO_Q);
>> gen_helper_bswap32x2(xth, xth);
>> tcg_gen_addi_tl(EA, EA, 8);
>> tcg_gen_qemu_ld_i64(xtl, EA, ctx->mem_idx, MO_Q);
>> gen_helper_bswap32x2(xtl, xtl);
>
> This cannot be correct, because it assumes a host-dependent byte ordering.
> You
> should be able to see different results depending on a BE or LE host.
Forgot to mention, this was just for the BE part. Because MO_BEQ wasnt
giving result as expected.
if (ctx->le_mode) {
/* Same as before */
} else {
tcg_gen_qemu_ld_i64(xth, EA, ctx->mem_idx, MO_Q);
gen_helper_bswap32x2(xth, xth);
tcg_gen_addi_tl(EA, EA, 8);
tcg_gen_qemu_ld_i64(xtl, EA, ctx->mem_idx, MO_Q);
gen_helper_bswap32x2(xtl, xtl);
}
Regards
Nikunj
- [Qemu-ppc] [PATCH 6/6] target-ppc: add stxvb16x and stxvh8x, (continued)
Re: [Qemu-ppc] [PATCH 0/6] POWER9 TCG enablements - part4, David Gibson, 2016/08/08