qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 03/17] w64: Fix type casts used in some macros in cp


From: Stefan Weil
Subject: [Qemu-devel] [PATCH 03/17] w64: Fix type casts used in some macros in cpu-all.h
Date: Sun, 15 Apr 2012 21:55:09 +0200

Instead of type casts to long, w64 needs type casts to intptr_t.
For other hosts, this changes nothing.

Signed-off-by: Stefan Weil <address@hidden>
---
 cpu-all.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpu-all.h b/cpu-all.h
index 4512518..58420be 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -222,8 +222,8 @@ extern unsigned long reserved_va;
 #else /* !CONFIG_USER_ONLY */
 /* NOTE: we use double casts if pointers and target_ulong have
    different sizes */
-#define saddr(x) (uint8_t *)(long)(x)
-#define laddr(x) (uint8_t *)(long)(x)
+#define saddr(x) (uint8_t *)(intptr_t)(x)
+#define laddr(x) (uint8_t *)(intptr_t)(x)
 #endif
 
 #define ldub_raw(p) ldub_p(laddr((p)))
-- 
1.7.0.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]