qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]