qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] w32: Fix compilation and replace non-portable u


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH] w32: Fix compilation and replace non-portable usage of ulong
Date: Sun, 15 May 2011 12:36:12 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, May 15, 2011 at 11:38:04AM +0200, Stefan Weil wrote:
> ulong is undefined for w32 (and maybe other) compilations.
> Replace it by uintptr_t (which also fixes compilation for w64
> and is a better choice for pointer to integer conversions).
> 
> Cc: Aurelien Jarno <address@hidden>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
>  target-ppc/cpu.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Aurelien Jarno <address@hidden>
 
> diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
> index 7a6a7df..8e4582f 100644
> --- a/target-ppc/cpu.h
> +++ b/target-ppc/cpu.h
> @@ -1929,8 +1929,8 @@ static inline void cpu_set_tls(CPUState *env, 
> target_ulong newtls)
>  #if !defined(CONFIG_USER_ONLY)
>  static inline int booke206_tlbe_id(CPUState *env, ppcemb_tlb_t *tlbe)
>  {
> -    ulong tlbel = (ulong)tlbe;
> -    ulong tlbl = (ulong)env->tlb;
> +    uintptr_t tlbel = (uintptr_t)tlbe;
> +    uintptr_t tlbl = (uintptr_t)env->tlb;
>  
>      return (tlbel - tlbl) / sizeof(env->tlb[0]);
>  }
> -- 
> 1.5.6.5
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

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