* [Qemu-devel] [PATCH] s390x: use CONFIG_INT128 to detect __uint128_t
@ 2013-04-23 17:15 Gabriel Kerneis
2013-04-23 20:37 ` Richard Henderson
2013-04-26 9:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Gabriel Kerneis @ 2013-04-23 17:15 UTC (permalink / raw)
To: Richard Henderson, Alexander Graf
Cc: qemu-trivial, Gabriel Kerneis, qemu-devel
Target s390x uses ad-hoc macro magic to guess if the compiler
supports the GCC extension __uint128_t. This patch uses the
the dedicated macro CONFIG_INT128 defined by configure instead.
This fixes compilation with the CIL source code analyzer, which
uses GCC as a preprocessor but does not support __uint128_t.
Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info>
---
target-s390x/int_helper.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/target-s390x/int_helper.c b/target-s390x/int_helper.c
index af16b21..85e49aa 100644
--- a/target-s390x/int_helper.c
+++ b/target-s390x/int_helper.c
@@ -97,8 +97,7 @@ uint64_t HELPER(divu64)(CPUS390XState *env, uint64_t ah, uint64_t al,
ret = al / b;
} else {
/* ??? Move i386 idivq helper to host-utils. */
-#if HOST_LONG_BITS == 64 && defined(__GNUC__)
- /* assuming 64-bit hosts have __uint128_t */
+#ifdef CONFIG_INT128
__uint128_t a = ((__uint128_t)ah << 64) | al;
__uint128_t q = a / b;
env->retxl = a % b;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] s390x: use CONFIG_INT128 to detect __uint128_t
2013-04-23 17:15 [Qemu-devel] [PATCH] s390x: use CONFIG_INT128 to detect __uint128_t Gabriel Kerneis
@ 2013-04-23 20:37 ` Richard Henderson
2013-04-26 9:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2013-04-23 20:37 UTC (permalink / raw)
To: Gabriel Kerneis; +Cc: qemu-trivial, Alexander Graf, qemu-devel
On 2013-04-23 18:15, Gabriel Kerneis wrote:
> Target s390x uses ad-hoc macro magic to guess if the compiler
> supports the GCC extension __uint128_t. This patch uses the
> the dedicated macro CONFIG_INT128 defined by configure instead.
>
> This fixes compilation with the CIL source code analyzer, which
> uses GCC as a preprocessor but does not support __uint128_t.
>
> Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info>
Reviewed-by: Richard Henderson <rth@twiddle.net>
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] s390x: use CONFIG_INT128 to detect __uint128_t
2013-04-23 17:15 [Qemu-devel] [PATCH] s390x: use CONFIG_INT128 to detect __uint128_t Gabriel Kerneis
2013-04-23 20:37 ` Richard Henderson
@ 2013-04-26 9:58 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-04-26 9:58 UTC (permalink / raw)
To: Gabriel Kerneis
Cc: qemu-trivial, qemu-devel, Alexander Graf, Richard Henderson
On Tue, Apr 23, 2013 at 06:15:12PM +0100, Gabriel Kerneis wrote:
> Target s390x uses ad-hoc macro magic to guess if the compiler
> supports the GCC extension __uint128_t. This patch uses the
> the dedicated macro CONFIG_INT128 defined by configure instead.
>
> This fixes compilation with the CIL source code analyzer, which
> uses GCC as a preprocessor but does not support __uint128_t.
>
> Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info>
> ---
> target-s390x/int_helper.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-26 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23 17:15 [Qemu-devel] [PATCH] s390x: use CONFIG_INT128 to detect __uint128_t Gabriel Kerneis
2013-04-23 20:37 ` Richard Henderson
2013-04-26 9:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).