[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 01/30] softmmu: add cmpxchg helpers
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC 01/30] softmmu: add cmpxchg helpers |
Date: |
Mon, 27 Jun 2016 22:48:24 +0100 |
On 27 June 2016 at 22:43, Richard Henderson <address@hidden> wrote:
> All you need to do is byte-reverse the data.
>
> bswap(a + b) == bswap(a) + bswap(b).
?
0xFF + 0xFF == 0x1FE, bswap(0x1FE) == 0xFE010000
bswap(0xFF) + bswap(0xFF) == 0xFF000000 + 0xFF000000 == 0x1FE000000
(or 0xFE000000 with truncate to 32-bit).
Or am I missing something?
thanks
-- PMM
[Qemu-devel] [RFC 03/30] cpu_ldst: add cpu_cmpxchg helpers, Emilio G. Cota, 2016/06/27
[Qemu-devel] [RFC 02/30] tcg: add tcg_cmpxchg_lock, Emilio G. Cota, 2016/06/27
[Qemu-devel] [RFC 12/30] target-i386: emulate LOCK'ed OP instructions using atomic helpers, Emilio G. Cota, 2016/06/27
[Qemu-devel] [RFC 09/30] softmmu: add atomic helpers, Emilio G. Cota, 2016/06/27
[Qemu-devel] [RFC 07/30] atomics: add atomic_xor, Emilio G. Cota, 2016/06/27
[Qemu-devel] [RFC 08/30] atomics: add atomic_op_fetch variants, Emilio G. Cota, 2016/06/27