qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH 15/20] target-ppc: Fix type casts for


From: Andreas Färber
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 15/20] target-ppc: Fix type casts for w64 (uintptr_t)
Date: Sun, 15 Apr 2012 17:36:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0

Am 15.04.2012 16:13, schrieb Stefan Weil:
> This changes nothing for other hosts.
> 
> Cc: Alexander Graf <address@hidden>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
>  target-ppc/translate_init.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

(Had you used scripts/get_maintainer.pl this would've also cc'ed qemu-ppc.)

Nice and harmless cleanup,

Acked-by: Andreas Färber <address@hidden>

I've applied this to ppc-next since I'm preparing a PULL for that:
http://repo.or.cz/w/qemu/agraf.git/shortlog/refs/heads/ppc-next

Andreas

> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index b1f8785..ff5b61a 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -9504,12 +9504,12 @@ enum {
>  
>  static inline int is_indirect_opcode (void *handler)
>  {
> -    return ((unsigned long)handler & 0x03) == PPC_INDIRECT;
> +    return ((uintptr_t)handler & 0x03) == PPC_INDIRECT;
>  }
>  
>  static inline opc_handler_t **ind_table(void *handler)
>  {
> -    return (opc_handler_t **)((unsigned long)handler & ~3);
> +    return (opc_handler_t **)((uintptr_t)handler & ~3);
>  }
>  
>  /* Instruction table creation */
> @@ -9528,7 +9528,7 @@ static int create_new_table (opc_handler_t **table, 
> unsigned char idx)
>  
>      tmp = malloc(0x20 * sizeof(opc_handler_t));
>      fill_new_table(tmp, 0x20);
> -    table[idx] = (opc_handler_t *)((unsigned long)tmp | PPC_INDIRECT);
> +    table[idx] = (opc_handler_t *)((uintptr_t)tmp | PPC_INDIRECT);
>  
>      return 0;
>  }

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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