提交 d49b8e0b 编写于 作者: G Gabriel Kerneis 提交者: Stefan Hajnoczi

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: NGabriel Kerneis <gabriel@kerneis.info>
Reviewed-by: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 7edd2cf1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册