From: Aurelien Jarno <aurelien@aurel32.net>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-mips: Fix compiler warnings caused by very large constants
Date: Mon, 5 Nov 2012 08:03:40 +0100 [thread overview]
Message-ID: <20121105070340.GH31495@ohm.aurel32.net> (raw)
In-Reply-To: <1352060975-18646-1-git-send-email-sw@weilnetz.de>
On Sun, Nov 04, 2012 at 09:29:35PM +0100, Stefan Weil wrote:
> 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);
> }
Blue Swirl proposed the same patch a bit earlier then you, and I have
just applied it.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2012-11-05 7:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-04 20:29 [Qemu-devel] [PATCH] target-mips: Fix compiler warnings caused by very large constants Stefan Weil
2012-11-05 7:03 ` Aurelien Jarno [this message]
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=20121105070340.GH31495@ohm.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.de \
/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).