From patchwork Sun Apr 15 14:13:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 152641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C25D9B6FC4 for ; Mon, 16 Apr 2012 01:42:12 +1000 (EST) Received: from localhost ([::1]:51987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJQEK-0005U1-2Z for incoming@patchwork.ozlabs.org; Sun, 15 Apr 2012 10:15:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJQDV-0003PF-Iq for qemu-devel@nongnu.org; Sun, 15 Apr 2012 10:14:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJQDS-0008HJ-Aj for qemu-devel@nongnu.org; Sun, 15 Apr 2012 10:14:13 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:36169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJQDR-0008GK-VK for qemu-devel@nongnu.org; Sun, 15 Apr 2012 10:14:10 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id D281772800BA; Sun, 15 Apr 2012 16:14:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uIrihxydZLGo; Sun, 15 Apr 2012 16:14:08 +0200 (CEST) Received: by v220110690675601.yourvserver.net (Postfix, from userid 1000) id A355E72800C1; Sun, 15 Apr 2012 16:14:05 +0200 (CEST) From: Stefan Weil To: qemu-devel@nongnu.org Date: Sun, 15 Apr 2012 16:13:48 +0200 Message-Id: <1334499233-6344-16-git-send-email-sw@weilnetz.de> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1334499233-6344-1-git-send-email-sw@weilnetz.de> References: <1334499233-6344-1-git-send-email-sw@weilnetz.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 78.47.199.172 Cc: Blue Swirl , Stefan Weil , Alexander Graf Subject: [Qemu-devel] [PATCH 15/20] target-ppc: Fix type casts for w64 (uintptr_t) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This changes nothing for other hosts. Cc: Alexander Graf Signed-off-by: Stefan Weil --- target-ppc/translate_init.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) 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; }