diff options
author | Gabriel Kerneis <gabriel@kerneis.info> | 2013-04-23 18:15:12 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-04-26 11:58:14 +0200 |
commit | d49b8e0b299df3f0472945eb6d33b8413d102046 (patch) | |
tree | 8eb0356260d29a7575b0a2c9f5d5f3c7c8119757 | |
parent | 7edd2cf1a2eace84e3f8753e912449ae8871802f (diff) | |
download | qemu-d49b8e0b299df3f0472945eb6d33b8413d102046.tar.gz qemu-d49b8e0b299df3f0472945eb6d33b8413d102046.tar.bz2 qemu-d49b8e0b299df3f0472945eb6d33b8413d102046.zip |
s390x: use CONFIG_INT128 to detect __uint128_t
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>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | target-s390x/int_helper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target-s390x/int_helper.c b/target-s390x/int_helper.c index af16b21baa..85e49aafa6 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; |