OSDN Git Service

include/qemu/int128: Use Int128 structure for TCI
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 16 Oct 2022 23:17:20 +0000 (09:17 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Sat, 4 Feb 2023 16:19:42 +0000 (06:19 -1000)
commitb959822c94e6d32b36fad038e79c14f841e585c1
treeb2c201a190f542726172ee62d6b4738dd14b0568
parentc6556aa0c8de8718813fea0ca61232632bf33c42
include/qemu/int128: Use Int128 structure for TCI

We are about to allow passing Int128 to/from tcg helper functions,
but libffi doesn't support __int128_t, so use the structure.

In order for atomic128.h to continue working, we must provide
a mechanism to frob between real __int128_t and the structure.
Provide a new union, Int128Alias, for this.  We cannot modify
Int128 itself, as any changed alignment would also break libffi.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/qemu/atomic128.h
include/qemu/int128.h
util/int128.c