qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 30/35] target-arm: emulate aarch64's LL/SC us


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v4 30/35] target-arm: emulate aarch64's LL/SC using cmpxchg helpers
Date: Fri, 16 Sep 2016 17:40:22 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 09/16/2016 05:16 PM, Emilio G. Cota wrote:
> +        uint64_t *haddr = g2h(addr);
> +        o0 = ldq_le_p(haddr + 0);
> +        o1 = ldq_le_p(haddr + 1);
> +        oldv = int128_make128(o0, o1);
> +
> +        success = int128_eq(oldv, cmpv);
> +        if (success) {
> +            stq_le_p(haddr + 0, int128_getlo(newv));
> +            stq_le_p(haddr + 8, int128_gethi(newv));
Shouldn't this be + 1 instead, just like the above load?

If so, the same applies to the store in the _be function.

Yep, good catch.


r~



reply via email to

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