From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGX0V-0002Ws-OH for qemu-devel@nongnu.org; Mon, 02 Sep 2013 12:29:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGX0Q-0005jw-VC for qemu-devel@nongnu.org; Mon, 02 Sep 2013 12:29:39 -0400 Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]:52858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGX0Q-0005jj-Nk for qemu-devel@nongnu.org; Mon, 02 Sep 2013 12:29:34 -0400 Received: by mail-pa0-f54.google.com with SMTP id kx10so5377595pab.41 for ; Mon, 02 Sep 2013 09:29:33 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 2 Sep 2013 09:28:55 -0700 Message-Id: <1378139354-28602-11-git-send-email-rth@twiddle.net> In-Reply-To: <1378139354-28602-1-git-send-email-rth@twiddle.net> References: <1378139354-28602-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 10/29] 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, anthony@codemonkey.ws 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 8a5e55b..7a6f2e5 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -178,9 +178,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