From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Tom Musta <tommusta@gmail.com>,
qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] target-ppc/translate.c: Use ULL suffix for 64 bit constants
Date: Thu, 20 Feb 2014 22:33:39 +0100 [thread overview]
Message-ID: <530674B3.8050903@weilnetz.de> (raw)
In-Reply-To: <1392925647-14649-1-git-send-email-peter.maydell@linaro.org>
Am 20.02.2014 20:47, schrieb Peter Maydell:
> 64 bit constants need the "ULL" suffix, not just "UL", because
> on 32 bit platforms 'long' is not large enough and this will
> cause a compiler warning.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I think plain "UL" as a suffix is pretty much never right;
> it should either be "U" or "ULL".
>
> target-ppc/translate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index c5c1108..54013a2 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -7179,8 +7179,8 @@ static void gen_xxpermdi(DisasContext *ctx)
> #define OP_NABS 2
> #define OP_NEG 3
> #define OP_CPSGN 4
> -#define SGN_MASK_DP 0x8000000000000000ul
> -#define SGN_MASK_SP 0x8000000080000000ul
> +#define SGN_MASK_DP 0x8000000000000000ull
> +#define SGN_MASK_SP 0x8000000080000000ull
>
> #define VSX_SCALAR_MOVE(name, op, sgn_mask) \
> static void glue(gen_, name)(DisasContext * ctx) \
>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
(I personally prefer ULL instead of ull because it avoids constants
ending with 'full', and if we ignore the disas code, ULL is also more
common in QEMU)
next prev parent reply other threads:[~2014-02-20 21:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 19:47 [Qemu-devel] [PATCH] target-ppc/translate.c: Use ULL suffix for 64 bit constants Peter Maydell
2014-02-20 21:33 ` Stefan Weil [this message]
2014-02-20 22:16 ` Peter Maydell
2014-02-21 9:30 ` Alexander Graf
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=530674B3.8050903@weilnetz.de \
--to=sw@weilnetz.de \
--cc=agraf@suse.de \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=tommusta@gmail.com \
/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).