From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF9UD-0003PV-3w for qemu-devel@nongnu.org; Thu, 29 Aug 2013 17:10:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VF9U7-0001pv-HP for qemu-devel@nongnu.org; Thu, 29 Aug 2013 17:10:36 -0400 Received: from mail-qc0-x229.google.com ([2607:f8b0:400d:c01::229]:53365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF9U7-0001ph-DY for qemu-devel@nongnu.org; Thu, 29 Aug 2013 17:10:31 -0400 Received: by mail-qc0-f169.google.com with SMTP id k8so470138qcq.14 for ; Thu, 29 Aug 2013 14:10:31 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 29 Aug 2013 14:09:34 -0700 Message-Id: <1377810586-19931-7-git-send-email-rth@twiddle.net> In-Reply-To: <1377810586-19931-1-git-send-email-rth@twiddle.net> References: <1377810586-19931-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v2 06/18] tcg: Define TCG_TYPE_PTR properly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index b26e557..0c4c60e 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -176,9 +176,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 -- 1.8.1.4