qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: qemu-trivial@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>,
	qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH] target-mips: Fix compiler warnings caused by very large constants
Date: Sun,  4 Nov 2012 21:29:35 +0100	[thread overview]
Message-ID: <1352060975-18646-1-git-send-email-sw@weilnetz.de> (raw)

Those constants are larger than 32 bits and need a suffix to avoid
warnings from some versions of gcc.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 target-mips/dsp_helper.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c
index b59133e..2ab9956 100644
--- a/target-mips/dsp_helper.c
+++ b/target-mips/dsp_helper.c
@@ -3553,7 +3553,7 @@ target_ulong helper_dextr_rs_w(target_ulong ac, target_ulong shift,
         if (temp128 == 0) {
             temp[0] = 0x0FFFFFFFF;
         } else {
-            temp[0] = 0x0100000000;
+            temp[0] = 0x0100000000ULL;
         }
         set_DSPControl_overflow_flag(1, 23, env);
     }
@@ -3653,7 +3653,7 @@ target_ulong helper_extr_s_h(target_ulong ac, target_ulong shift,
     if (temp > (int64_t)0x7FFF) {
         temp = 0x00007FFF;
         set_DSPControl_overflow_flag(1, 23, env);
-    } else if (temp < (int64_t)0xFFFFFFFFFFFF8000) {
+    } else if (temp < (int64_t)0xFFFFFFFFFFFF8000LL) {
         temp = 0xFFFF8000;
         set_DSPControl_overflow_flag(1, 23, env);
     }
-- 
1.7.10.4

             reply	other threads:[~2012-11-04 20:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-04 20:29 Stefan Weil [this message]
2012-11-05  7:03 ` [Qemu-devel] [PATCH] target-mips: Fix compiler warnings caused by very large constants Aurelien Jarno
2012-11-05 18:41   ` Eric Blake

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=1352060975-18646-1-git-send-email-sw@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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).