qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target-ppc/translate.c: Use ULL suffix for 64 b


From: Stefan Weil
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
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

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 <address@hidden>
> ---
> 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 <address@hidden>

(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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]