meson: Split test for __int128_t type from __int128_t arithmetic
commit6479dd74f14d51f207509aa1b77b039b7bd32bff
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 24 May 2023 15:14:41 +0000 (24 08:14 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 30 May 2023 16:51:11 +0000 (30 09:51 -0700)
treeb2dc0c1ad09c6f5f0488ec031b301a678fbdeef9
parent9e0e6a7e8e2351ca757f08f491ef99bbc2afd548
meson: Split test for __int128_t type from __int128_t arithmetic

Older versions of clang have missing runtime functions for arithmetic
with -fsanitize=undefined (see 464e3671f9d5c), so we cannot use
__int128_t for implementing Int128.  But __int128_t is present,
data movement works, and it can be used for atomic128.

Probe for both CONFIG_INT128_TYPE and CONFIG_INT128, adjust
qemu/int128.h to define Int128Alias if CONFIG_INT128_TYPE,
and adjust the meson probe for atomics to use has_int128_type.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/qemu/int128.h
meson.build