qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 06/27] int128: Use complex numbers if advisab


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 06/27] int128: Use complex numbers if advisable
Date: Mon, 4 Jul 2016 13:51:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1


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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]