aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-05-24 08:14:41 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-05-30 09:51:11 -0700
commit6479dd74f14d51f207509aa1b77b039b7bd32bff (patch)
treeb2dc0c1ad09c6f5f0488ec031b301a678fbdeef9 /include/qemu
parent9e0e6a7e8e2351ca757f08f491ef99bbc2afd548 (diff)
downloadqemu-6479dd74f14d51f207509aa1b77b039b7bd32bff.zip
qemu-6479dd74f14d51f207509aa1b77b039b7bd32bff.tar.gz
qemu-6479dd74f14d51f207509aa1b77b039b7bd32bff.tar.bz2
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>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/int128.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/qemu/int128.h b/include/qemu/int128.h
index 9e46cfae..73624e8 100644
--- a/include/qemu/int128.h
+++ b/include/qemu/int128.h
@@ -481,7 +481,7 @@ static inline void bswap128s(Int128 *s)
* a possible structure and the native types. Ease parameter passing
* via use of the transparent union extension.
*/
-#ifdef CONFIG_INT128
+#ifdef CONFIG_INT128_TYPE
typedef union {
__uint128_t u;
__int128_t i;
@@ -489,6 +489,6 @@ typedef union {
} Int128Alias __attribute__((transparent_union));
#else
typedef Int128 Int128Alias;
-#endif /* CONFIG_INT128 */
+#endif /* CONFIG_INT128_TYPE */
#endif /* INT128_H */