]> git.proxmox.com Git - qemu.git/commitdiff
tcg: Define TCG_TYPE_PTR properly
authorRichard Henderson <rth@twiddle.net>
Tue, 20 Aug 2013 21:48:46 +0000 (14:48 -0700)
committerRichard Henderson <rth@twiddle.net>
Mon, 2 Sep 2013 16:08:29 +0000 (09:08 -0700)
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/tcg.h

index 8a5e55bcc475c64d38e12d9d924be77ff57a88ce..7a6f2e5f1176729f77aa0556c1fbeb7dd8c6b3ea 100644 (file)
--- 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