]> git.proxmox.com Git - mirror_qemu.git/commit - meson.build
meson: fix CONFIG_ATOMIC128 check
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 28 Feb 2022 12:03:09 +0000 (16:03 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 22 Mar 2022 10:46:17 +0000 (14:46 +0400)
commitd2958fb0b6c7bcd8c4e6c0222554ef25d62ecef0
treef57b41524d95062f466ee046304406cf180ebfa7
parent848126d11e93ff2a13d0d816244ed82aef83854f
meson: fix CONFIG_ATOMIC128 check

The current testing code isn't correct and matching QEMU usage:

testfile.c: In function 'main':
testfile.c:5:11: error: incorrect number of arguments to function '__atomic_load'
    5 |       y = __atomic_load(&x, 0);
      |           ^~~~~~~~~~~~~
testfile.c:6:7: error: argument 2 of '__atomic_store' must be a pointer type
    6 |       __atomic_store(&x, y, 0);
      |       ^~~~~~~~~~~~~~
testfile.c:7:7: error: argument 3 of '__atomic_compare_exchange' must be a pointer type
    7 |       __atomic_compare_exchange(&x, &y, x, 0, 0, 0);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~

Replace the test with common atomics test for u64 and u128 that matches
better QEMU needs.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
meson.build