On 18 June 2015 at 16:44,  <fred.kon...@greensocs.com> wrote:
> +        uint64_t oldval, *p;
> +        p = address_space_map(cs->as, paddr, &len, true);
> +        if (len == 8 << size) {
> +            oldval = (uint64_t)env->exclusive_val;
> +            result = (atomic_cmpxchg(p, oldval, (uint64_t)newval) == oldval);

You can't do an atomic operation on a type that's larger than
the pointer size of the host system. That means that for
code that isn't host specific, like this, in practice you
can't do an atomic operation on a larger size than 4 bytes.

(It happens to work on x86, I think, but this won't build
on ppc32, for instance.)

thanks
-- PMM

Reply via email to