From patchwork Thu Aug 22 16:58:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 269112 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 68B3B2C00B6 for ; Fri, 23 Aug 2013 03:03:16 +1000 (EST) Received: from localhost ([::1]:60931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCYHy-0000YP-Ek for incoming@patchwork.ozlabs.org; Thu, 22 Aug 2013 13:03:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCYEV-0003xL-MR for qemu-devel@nongnu.org; Thu, 22 Aug 2013 12:59:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCYEO-0005gY-JZ for qemu-devel@nongnu.org; Thu, 22 Aug 2013 12:59:39 -0400 Received: from mail-qe0-x236.google.com ([2607:f8b0:400d:c02::236]:36359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCYEO-0005gO-FQ for qemu-devel@nongnu.org; Thu, 22 Aug 2013 12:59:32 -0400 Received: by mail-qe0-f54.google.com with SMTP id i11so1267095qej.27 for ; Thu, 22 Aug 2013 09:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Po1OUezEtPf7+X956rZMXHnBIZ068E/7r2AATJXvz9M=; b=oZbTj4w+qXkd5Z6HQeV2YUY3yJiot1Qo+Yqg9WS71uAt7Frg8rNgZwRuB2IU/Fblhs cE119Ag2D288K7G1UZNpteVIWtqvuskwuVL2382WZEBqFVsi3198aubhS06U+laJSF5C 2/XVTpL6CBFZIySwD97ka+rSH4KEf+4/DCwWct34MPYdqRjqKyhSY70RwqSJkP9rB7h3 XiDWCAq2ZkVvRa6h8nOhv1LJJjPl4aoBQZRcVkRgC7HA9+G4q7Nah82EuQXpxzEb6Z/O 25NczhnStkItYEpd1GH0OQTGC9g1KtGTbtjTreKF/oQqoD6Eb00UHxfD6oKnG4vpcsdt cNUQ== X-Received: by 10.49.25.167 with SMTP id d7mr16932161qeg.35.1377190772020; Thu, 22 Aug 2013 09:59:32 -0700 (PDT) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id m8sm19338651qay.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 22 Aug 2013 09:59:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 22 Aug 2013 09:58:36 -0700 Message-Id: <1377190729-14008-6-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1377190729-14008-1-git-send-email-rth@twiddle.net> References: <1377190729-14008-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::236 Cc: aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 05/18] tcg: Define TCG_TYPE_PTR properly 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 Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- tcg/tcg.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index bfe420a..b71dcf4 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -173,9 +173,12 @@ typedef enum TCGType { TCG_TYPE_REG = TCG_TYPE_I64, #endif - /* An alias for the size of the native pointer. We don't currently - support any hosts with 64-bit registers and 32-bit pointers. */ - TCG_TYPE_PTR = TCG_TYPE_REG, + /* An alias for the size of the native pointer. */ +#if UINTPTR_MAX == UINT32_MAX + TCG_TYPE_PTR = TCG_TYPE_I32, +#else + TCG_TYPE_PTR = TCG_TYPE_I64, +#endif /* An alias for the size of the target "long", aka register. */ #if TARGET_LONG_BITS == 64