Re: [Qemu-devel] [PATCH v2 1/5] tcg: Split CONFIG_ATOMIC128

2018-08-21 Thread Emilio G. Cota
On Tue, Aug 21, 2018 at 07:27:00 -0700, Richard Henderson wrote: (snip) > +++ b/accel/tcg/atomic_template.h (snip) > +#else > +/* Fallback definitions that must be optimized away, or error. */ > +Int128 __attribute__((error("unsupported atomic"))) > +atomic16_read(Int128 *ptr); > +Int128 __att

[Qemu-devel] [PATCH v2 1/5] tcg: Split CONFIG_ATOMIC128

2018-08-21 Thread Richard Henderson
GCC7+ will no longer advertise support for 16-byte __atomic operations if only cmpxchg is supported, as for x86_64. Fortunately, x86_64 still has support for __sync_compare_and_swap_16 and we can make use of that. AArch64 does not have, nor ever has had such support, so open-code it. Signed-off-b