diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2018-08-15 16:31:47 -0700 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2018-10-18 19:46:36 -0700 |
| commit | e6cd4bb59b8154fa00da611200beef7eb4e8ec56 (patch) | |
| tree | 092a1f3d8da6fe618602199eb7af7a6f65aa1950 /include/qemu/compiler.h | |
| parent | 383beda9cf32f795616c3b93f7d6154d70372d4b (diff) | |
| download | focaccia-qemu-e6cd4bb59b8154fa00da611200beef7eb4e8ec56.tar.gz focaccia-qemu-e6cd4bb59b8154fa00da611200beef7eb4e8ec56.zip | |
tcg: Split CONFIG_ATOMIC128
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. Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/qemu/compiler.h')
| -rw-r--r-- | include/qemu/compiler.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 66f8c241dc..6b92710487 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -146,6 +146,17 @@ # define QEMU_FLATTEN #endif +/* + * If __attribute__((error)) is present, use it to produce an error at + * compile time. Otherwise, one must wait for the linker to diagnose + * the missing symbol. + */ +#if __has_attribute(error) +# define QEMU_ERROR(X) __attribute__((error(X))) +#else +# define QEMU_ERROR(X) +#endif + /* Implement C11 _Generic via GCC builtins. Example: * * QEMU_GENERIC(x, (float, sinf), (long double, sinl), sin) (x) |