qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel Kerneis <gabriel@kerneis.info>
To: Richard Henderson <rth@twiddle.net>, Alexander Graf <agraf@suse.de>
Cc: qemu-trivial@nongnu.org, Gabriel Kerneis <gabriel@kerneis.info>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] s390x: use CONFIG_INT128 to detect __uint128_t
Date: Tue, 23 Apr 2013 18:15:12 +0100	[thread overview]
Message-ID: <1366737312-8598-1-git-send-email-gabriel@kerneis.info> (raw)

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

             reply	other threads:[~2013-04-23 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 17:15 Gabriel Kerneis [this message]
2013-04-23 20:37 ` [Qemu-devel] [PATCH] s390x: use CONFIG_INT128 to detect __uint128_t Richard Henderson
2013-04-26  9:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366737312-8598-1-git-send-email-gabriel@kerneis.info \
    --to=gabriel@kerneis.info \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).