[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
- [Qemu-devel] [PATCH v2 00/27] cmpxchg-based emulation of atomics, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 04/27] int128: Use __int128 if available, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 03/27] exec: Avoid direct references to Int128 parts, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 02/27] atomics: add atomic_op_fetch variants, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 08/27] HACK: Always enable parallel_cpus, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 01/27] atomics: add atomic_xor, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 11/27] target-i386: emulate LOCK'ed cmpxchg using cmpxchg helpers, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 06/27] int128: Use complex numbers if advisable, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 10/27] tcg: Add atomic128 helpers, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 07/27] tcg: Add EXCP_ATOMIC, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 13/27] target-i386: emulate LOCK'ed INC using atomic helper, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 09/27] tcg: Add atomic helpers, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 15/27] target-i386: emulate LOCK'ed NEG using cmpxchg helper, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 16/27] target-i386: emulate LOCK'ed XADD using atomic helper, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 12/27] target-i386: emulate LOCK'ed OP instructions using atomic helpers, Richard Henderson, 2016/07/01