On 01/07/2016 19:04, Richard Henderson wrote: > If __int128 is not supported, prefer a base type that is > returned in registers rather than memory. > > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > include/qemu/int128.h | 110 > +++++++++++++++++++++++++++++++------------------- > 1 file changed, 69 insertions(+), 41 deletions(-) > > diff --git a/include/qemu/int128.h b/include/qemu/int128.h > index 67440fa..ab67275 100644 > --- a/include/qemu/int128.h > +++ b/include/qemu/int128.h > @@ -139,27 +139,37 @@ static inline void int128_subfrom(Int128 *a, Int128 b) > > #else /* !CONFIG_INT128 */ > > -typedef struct Int128 Int128; > +/* Here we are catering to the ABI of the host. If the host returns > + 64-bit complex in registers, but the 128-bit structure in memory, > + then choose the complex representation. */ > +#if defined(__GNUC__) \ > + && (defined(__powerpc__) || defined(__sparc__)) \ > + && !defined(CONFIG_TCG_INTERPRETER) > +typedef _Complex unsigned long long Int128;
Is there any reason not to do that unconditionally? Paolo