* [Qemu-devel] [PATCH] target-ppc/translate.c: Use ULL suffix for 64 bit constants
@ 2014-02-20 19:47 Peter Maydell
2014-02-20 21:33 ` Stefan Weil
2014-02-21 9:30 ` Alexander Graf
0 siblings, 2 replies; 4+ messages in thread
From: Peter Maydell @ 2014-02-20 19:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Tom Musta, Stefan Weil, qemu-ppc, Alexander Graf, patches
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) \
--
1.8.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target-ppc/translate.c: Use ULL suffix for 64 bit constants
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
2014-02-20 22:16 ` Peter Maydell
2014-02-21 9:30 ` Alexander Graf
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Weil @ 2014-02-20 21:33 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: Tom Musta, qemu-ppc, Alexander Graf, patches
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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target-ppc/translate.c: Use ULL suffix for 64 bit constants
2014-02-20 21:33 ` Stefan Weil
@ 2014-02-20 22:16 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2014-02-20 22:16 UTC (permalink / raw)
To: Stefan Weil
Cc: Tom Musta, Alexander Graf, qemu-ppc@nongnu.org, QEMU Developers,
Patch Tracking
On 20 February 2014 21:33, Stefan Weil <sw@weilnetz.de> wrote:
> (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)
I agree, as it happens, but I opted to stick with the existing case here.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target-ppc/translate.c: Use ULL suffix for 64 bit constants
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
@ 2014-02-21 9:30 ` Alexander Graf
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2014-02-21 9:30 UTC (permalink / raw)
To: Peter Maydell
Cc: Tom Musta, Stefan Weil, list@suse.de:PowerPC, QEMU Developers,
Patch Tracking
On 20.02.2014, at 20:47, Peter Maydell <peter.maydell@linaro.org> wrote:
> 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>
Thanks, applied to ppc-next.
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-21 9:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-02-20 22:16 ` Peter Maydell
2014-02-21 9:30 ` Alexander Graf
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).