On 18 July 2016 at 14:22, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 18/07/2016 14:50, Peter Maydell wrote: >> On 18 July 2016 at 12:59, Paolo Bonzini <pbonz...@redhat.com> wrote: >>> >>> >>> On 18/07/2016 13:57, Peter Maydell wrote: >>>> On 18 July 2016 at 12:54, Paolo Bonzini <pbonz...@redhat.com> wrote: >>>>> On 18/07/2016 13:51, Peter Maydell wrote: >>>>>> Looks like an attempt to do an atomic op on a larger-than-host-pointer >>>>>> type. >>>>> >>>>> Hmm, atomic_set should be acceptable even on 64-bit. >>>> >>>> How does that work, when the host might not have an atomic >>>> 64-bit write? >>> >>> All hosts we support should have it. >> >> 32-bit ARM does not guarantee that you can have 64-bit atomic >> operations. > > Doesn't it have LDRDEX and STRDEX?
Yes, you could use a LDREXD/STREXD sequence for ARMv7 (and it looks like gcc does so). Doesn't work on ARMv5, though. MIPS32 and PPC32 are the hosts where attempted 64-bit atomics generally fail (they want to call out to libatomic), so those would be the other ones to test before widening the use of atomic_set. thanks -- PMM